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.
Open any Java file and click on any widely used variable to see mark occurrences. Press Alt+Down or Alt+Up to go to the next or previous place - all ok, but carret is places at the beginning of the variable name and highlighting disappears. This does not happen inside import directive or javadoc.
The problem is with constructions like: "return userGuess.equals(|getWord(idx));" when cursor position is inside method call due to MarkOccurrencesHighlighter:353 if (!insideJavadoc) { el = info.getTrees().getElement(tp); } => equals instead of getWord is current java element as workaround for GoToMarkOccurrencesAction, I will move to the end of identifier to keep "current" object to be returned from info.getTrees().getElement(tp);
I will commit workaround in trunk and downgrade to P3
http://hg.netbeans.org/main/rev/8f417bdb256d put workaround. Please, evaluate the priority of the defect now
Integrated into 'main-golden', available in NB_Trunk_Production #243 build Changeset: http://hg.netbeans.org/main/rev/8f417bdb256d User: Vladimir Voskresensky <vv159170@netbeans.org> Log: workaround for IZ#136665: Mark occurrences is lost after goto next - move to the end of identifier, instead of start of it
Maxi, please evaluate.
Fixed: http://hg.netbeans.org/main?cmd=changeset;node=c838ebd206dd The workaround is reverted: http://hg.netbeans.org/main?cmd=changeset;node=cb45026922a8
Integrated into 'main-golden', available in build *200808081401* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/c838ebd206dd User: Jan Lahoda <jlahoda@netbeans.org> Log: #136665: mark occurrences should work when the caret is before the first letter of an identifier.
Integrated into 'main-golden', available in build *200808090201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/cb45026922a8 User: Jan Lahoda <jlahoda@netbeans.org> Log: #136665: the problem has been fixed in c838ebd206dd, so removing the workaround - changeset 8f417bdb256d