Community
Participate
Working Groups
When you right-click in the Java editor to bring up a context menu, the editor's notion of the target (the point of interest in the source code) comes from the location of the text cursor, but it should be based on the location of the mouse pointer when the right-click occured. Example: class BugDemo { static int methodOne() { return 1; } static int methodTwo() { return 2; } } 1. Left-click so the type-in cursor is inside the word "methodOne" 2. Move the mouse so it is over the word "methodTwo" 3. Right-click, choose Refactor/Move. You will see that you are moving methodOne, even though you right-clicked on methodTwo. All target-sensitive operations on the context menu suffer from this, not just refactoring: "Source/Toggle comment" and "References" both also use the text cursor location as the target location.
my two cents: - if the selection's length != 0 this is not the desired behaviour - if we do something for length == 0 then a right mouse click should move the cursor. Otherwise it will be very confusing. Moving to Text.
*** This bug has been marked as a duplicate of 19825 ***