-
Notifications
You must be signed in to change notification settings - Fork 124
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
Location information for tags #87
Comments
This should easy with |
The docblock class itself has a location. But tags do not. Since tags we don't use the location of the tags ourselfs. Beside that all other elements of our reflection component have a location. So I don't see any needs to add this at the moment. I think you want to jump to the actual element which should be posible in combination with our reflection component. |
Of course, for the docblock itself it's trivial. The use case (as described above) is, given an offset, which tag is at that position. Example: /**
* @param ClassA $a
* @param ClassB $b
*/ The user clicks on |
Ok, I understand your usecase. It might work to use the position of a tag in the array returned by From a phpdocumentor point of view we would implement this in the project itself and not in this library. |
hey, any progress on this one? It's been one year already... can we somehow contribute? thanks |
We will accept a pr for this issue. As I wrote before, from a phpdocumentor perspective this does not have priority. So it won't be picked up very soon by any member of the team. |
Thinking about this request purely from the ReflectionDocBlock perspective, maybe it would be useful to have this capability in here, since locations inside the docblock are still "metadata about the docblock". |
I am using this package in the open PHP language server, which provides static analysis for any IDE through the open language server protocol. One of these features is "Go to Definition". This is currently implemented for the actual PHP code through nikic's great PHPParser, where every node has a file start/end offset so I can calculate which node the user clicked. It would be nice to have this feature for types in docblock tags like
@var
too, but the tags don't have any start/end offset data. Would it be possible to add this?The text was updated successfully, but these errors were encountered: