This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 254097

Summary: Navigation/go to declaration for aliases, doesn't move cursor to function declaration
Product: php Reporter: mrpc
Component: EditorAssignee: Tomas Mysik <tmysik>
Status: RESOLVED INVALID    
Severity: normal CC: junichi11
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
See Also: https://netbeans.org/bugzilla/show_bug.cgi?id=268020
Issue Type: DEFECT Exception Reporter:

Description mrpc 2015-08-03 02:58:31 UTC
Example code (comes from php sanity test cases in synergy, aliases test):
<?php
function reallyLongNameForUselessFunction() {

}

use reallyLongNameForUselessFunction as shortName;


shortName();


When I hold ctrl and click on shortName() or I right click on it and select navigation->go to declaration, cursor moves to he alias line (user reallyLongNameForUselessFunction). 

Expected result:
Hold Ctrl and left click on calling of shortName, cursor should be moved to the line with reallyLongNameForUselessFunction declaration.



Product Version: NetBeans IDE 8.1 Beta (Build 201507302201)
Java: 1.8.0_51; Java HotSpot(TM) 64-Bit Server VM 25.51-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_51-b16
System: Windows 8.1 version 6.3 running on amd64; Cp1253; el_GR (nb)
User directory: C:\Users\Yannis\AppData\Roaming\NetBeans\8.1beta
Cache directory: C:\Users\Yannis\AppData\Local\NetBeans\Cache\8.1beta
Comment 1 mrpc 2015-08-03 03:09:23 UTC
Also tried it on linux (on a virtual machine I use):

Product Version: NetBeans IDE Dev (Build 201508010002)
Java: 1.8.0_51; Java HotSpot(TM) 64-Bit Server VM 25.51-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_51-b16
System: Linux version 3.16.0-38-generic running on amd64; UTF-8; en_US (nb)
User directory: /home/mrpc/.netbeans/dev
Cache directory: /home/mrpc/.cache/netbeans/dev

same results
Comment 2 junichi11 2015-10-30 04:53:05 UTC
You can click the "rereallyLongNameForUselessFunction" after cursor moves to the "shortName".

Probably, "function" has to be added to "use reallyLongNameForUselessFunction as shortName;" i.e. "use function reallyLongNameForUselessFunction as shortName;"
Comment 3 Tomas Mysik 2016-06-07 14:27:13 UTC
It works as designed - you click on an _alias_ so NetBeans navigates you to its declaration.

Thanks for reporting.