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 257930 - Goto declaration leads nowhere with @ModelOperation
Summary: Goto declaration leads nowhere with @ModelOperation
Status: STARTED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-11 05:01 UTC by Jaroslav Tulach
Modified: 2016-05-25 06:21 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2016-02-11 05:01:06 UTC
@ModelOperation generates safe-access method in a @Model class. Example:

http://hg.netbeans.org/releases/file/4bda945ac0d2/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/HtmlComponentTest.java#l145

then a method of the same name is generated in the bean class as documented at

http://bits.netbeans.org/html+java/1.2.3/net/java/html/json/ModelOperation.html

However, if one navigates to "pageModel.updateNames" in the example (Go to declaration in NetBeans), the IDE jumps to (an ugly) generated code rather to the original code written by user.

There has to be an easy way to navigate to the real user code skipping the generated boilerplate code.
Comment 1 Jaroslav Tulach 2016-02-11 05:01:59 UTC
Some support from the Java editor may be needed.
Comment 2 Jaroslav Tulach 2016-02-11 05:05:18 UTC
Workarounded by generating @see reference into Javadoc:
http://hg.netbeans.org/html4j/rev/f18b6cc923d8

Isn't there a better way to tell the Java editor to jump to the right method?
Comment 3 Jaroslav Tulach 2016-05-25 06:21:25 UTC
Can we agree on some text to put into the Javadoc that would automatically move the user to another source/method?