Community
Participate
Working Groups
If you select the Format option from the pop up menu in a Java Editor your current selection location is lost requiring you to search around for it again. STEPS 1) Open a relatively large .java file 2) Go near the bottom 3) Select format - you are sent back to the top. NOTES:
PRODUCT VERSION: 0.9
*** Bug 5559 has been marked as a duplicate of this bug. ***
I can't reproduce the exact same problem. It's true that the selection gets lost, but the cursor is put at the end of the previous selection.
ok, I reproduced it. Didn't realize that it only happens for no selection.
It's fixed from my point of view. There's currently a problem with the CodeFormatter which does not calculate mapped positions correctly if multi-line comments are involved. Once this is fixed, the range check for StyledText.setSelection() can be removed from SourceViewer.
closing this bug, since the selection validation is done in TextViewer.
*** Bug 7215 has been marked as a duplicate of this bug. ***
*** Bug 6487 has been marked as a duplicate of this bug. ***