Bug 4071 - Format option loses place in editor (1GHQFU6)
Summary: Format option loses place in editor (1GHQFU6)
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All Windows NT
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Claude Knaus CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 5559 6487 7215 (view as bug list)
Depends on: 5471
Blocks:
  Show dependency tree
 
Reported: 2001-10-10 23:05 EDT by Tod Creasey CLA
Modified: 2002-02-06 10:37 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tod Creasey CLA 2001-10-10 23:05:34 EDT
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:
Comment 1 DJ Houghton CLA 2001-10-29 17:30:20 EST
PRODUCT VERSION: 0.9


Comment 2 Claude Knaus CLA 2001-11-20 06:27:38 EST
*** Bug 5559 has been marked as a duplicate of this bug. ***
Comment 3 Claude Knaus CLA 2001-11-20 08:22:38 EST
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.
Comment 4 Claude Knaus CLA 2001-11-20 08:52:43 EST
ok, I reproduced it. Didn't realize that it only happens for no selection.
Comment 5 Claude Knaus CLA 2001-11-20 10:28:27 EST
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.
Comment 6 Claude Knaus CLA 2001-12-21 09:40:14 EST
closing this bug, since the selection validation is done in TextViewer.
Comment 7 Claude Knaus CLA 2002-02-06 10:26:56 EST
*** Bug 7215 has been marked as a duplicate of this bug. ***
Comment 8 Claude Knaus CLA 2002-02-06 10:37:14 EST
*** Bug 6487 has been marked as a duplicate of this bug. ***