Community
Participate
Working Groups
I would like to be able to rename a variable without having to open a dialog. It could work somewhat like: - I highlight a variable - hit command key (alt-shift-z - whatever key binding) - I type in new variable name, overwriting old name (A tooltip could be displayed showing whether the current name is a valid value, i.e. does not conflict with an existing variable name) - then I hit space/enter/semicolon/click away to end the rename - if the new value is a valid name then the references would be updated and I could continue typing - if the value was not valid, the old name would reappear and the refactoring is essentially cancelled. I've been told this is a feature coming in a new version of IDEA. I'm not sure how it is (or will be) implemented in IDEA, but the above workflow seemed intuitive.
Move to JDT/UI
What we have is 'rename in file' that works like that. Ctrl + 1, Rename in file. (Shortcut Ctrl + 2 + R) As the name says, this only modifies references in your file; it's a code manipulation utility, not a refactoring. But yes, we are also looking at ways of providing more light weigth refactoring dialogs.
JBuilder has a great think like rename in file, but can be assigned to selections instead. Example: Label l1 = new Label(parent, SWT.NONE); l1.setTest("Hello World"); l1.setFont(font); l1.setColor(RED); Suppose you have to create 3 more labels with the same characteristics. In JBuilder you can copy paste the above three times. Then, select each of the 3 additional snippets, press a button, and then you can replace "l1" with "l2" in one place and it will replace the rest too. It doesn't look for java-specific stuff. Any common variable names are selected, strings are left untouched. Pretty cool. Currently in eclipse this has to be done manually, or using a search-replace thing, prone to errors.
I'm not sure how the selection happens. Can you attach a screenshot?
setting to remind until we get more information
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.