Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace symbol's containerName by containerPath #112

Closed
mickaelistria opened this issue Nov 4, 2016 · 4 comments
Closed

Replace symbol's containerName by containerPath #112

mickaelistria opened this issue Nov 4, 2016 · 4 comments
Labels
info-needed Issue requires more information from poster

Comments

@mickaelistria
Copy link

Currently, it seems like the containerName in a SymbolInformation uses a convention to use . to separate the various segments. However, . is a valid character for many symbols, so resolving the containerName to a path in the hierarchy can be tricky.
Some complex example would be to have a JSon such as

{
  "a" : {
  	"b": {
  	  "c": "value1"
  	}
  },
  "a.b" : {
    "c": "value2"
  }
}

In which case the symbols for c both return a.b as containerName. A correct resolution to parent SymbolInformation requires looking at the positions.
An alternative would be to replace a containerName and the . convention by a containerPath, that would just be locating the parent as a list of symbols.

@dbaeumer
Copy link
Member

@mickaelistria at least in VS Code we only use the container name for rendering purpose. If we want to transfer a tree then I think we should add a new request to get a symbol tree. Or do I misunderstand anything?

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label Nov 21, 2016
@mickaelistria
Copy link
Author

I found that the symbols request do pass the range of the symbol, which allows to easily show a tree. So I have much less need for containerPath now. Closing this issue as range are working well and are "conceptually" much stronger.

@bruno-medeiros
Copy link

I found that the symbols request do pass the range of the symbol, which allows to easily show a tree. So I have much less need for containerPath now. Closing this issue as range are working well and are "conceptually" much stronger.

Hold on a second, is the location of the symbol mean to be the the range of the whole element, or just of the identifier? ie, for class Foo { } is the range of Foo just Foo or class Foo { }? If it's just the range of the identifier, you can't build a tree...

@bruno-medeiros
Copy link

Opened #132

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants