Open ignacruiz opened 6 years ago
Hey, thanks for reporting this but Crane doesn't support go-to-definition on methods yet -- only classes. Are you using another PHP code completion plugin?
I'm confused! I was totally sure that ctrl+click feature was from your extension. I have "PHP Extension Pack". I don't know if this add the ctrl+click go-to method feature, but it's working for "$a = new a(); $a->hello();", not for "a::hello()". Sorry then, maybe not issue, a feature request :)
Hope explain correctly, example at bottom. New [new x();] instanced objects works ok, if you CTRL + mouse over the method, you have the click auto-open option and go to the class-method concrete line. The same but using static instace [x::method()] just open the class never goes to the method.
Example: one.php:
two.php
If you CTRL+click on "->test();" from "$demo->test();" line, file one.php is opened and focused on "public function test()" line.
If you do the same on "::test();" it just open one.php but no focus on the method, just the class declaration.
The silly example is a short class, but long classes (for example adding some string property with long value could be proof for testing) doesn't locate you on the file and could be nice, cause some frameworks (and me) combine static instances with object instances. Ty!