Community
Participate
Working Groups
20030703+jdtui0709 create this: package p; class A { private int var11, var2, var3; } in the outliner, select var3 notice that the selection in the outliner _automatically_ changes to var11
actually, the field don't have to be all on 1 line
can you explain what you mean with comment 1? It works for me if the fields are declared one per line. Will investigate.
Debugged the code. The position used to ask the CU for the element is correct. Moving to JDT Core for further investigation.
This happens only if the "Link with editor" option is selected. Could you please let me know what code is called at that moment?
Cannot reproduce it after getting HEAD contents of jdt.ui. I get it if I use the plugin org.eclipse.jdt.ui from the 0723 integration build. Moving back to JDT/UI to investigate if it still occurs. I suspect something was boggus in ui code.
Here are the steps to reproduce using I20031113 1. download and install the build to a new location 2. start with a fresh workspace 3. create Java project J and switch to the Java perspective 4. create class A in default package with the following content class A { private int var11, var2, var3; } 5. click into the field names in the Java editor and observe: it always selects the first field in the Outline view no matter which one you select in the editor Set a breakpoint in JavaEditor.computeHighlightRange() at the line: IJavaElement element= getElementAt(caret, false); Moved milestone target from M4 to M5 (feel free to remove it, if this cannot be done for M5).
The source range of a multiple field declaration is overlapping (the type is included for all of them).
Changed JavaElement.getSourceElementAt(int) to look at the name range in the case of a multi-fields declaration. Added regression tests CompilationUnitTests.getElementAt3() to getElementAt6()
Verified for 3.0M7