Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Rename - Refactor hotkey inserts registered trademark symbol

Tags:

Previously, using the ALT+COMMAND+R key combination after highlighting a variable name in a Java file would go into the rename refactor mode. Now, the key combination replaces the highlighted text with a registered trademark symbol. How can I get the key combination to go into the rename refactor mode instead of inserting the symbol?

The current file encoding is set to MacRoman, which is the default setting inherited from container. As far as I know, nothing here has changed.

I am using Eclipse Indigo (Build id: 20110615-0604) on Mac OS X 10.7.5. Eclipse IDE for Java EE Developers 1.4.0.20110615-0550 and FreeMarker IDE SDK 1.1.0.v201006011046R-H111-GA are installed. I don't think there are any non-standard plugins.

The only recent change I can remember making is installing PyDev a few weeks ago. With the default PyDev installed, ALT+COMMAND+R opens a context menu in the lower right corner with 2 option: rename and set next symbol (this is in addition to replace the text with the symbol). I disabled the Set Next Symbol key binding in my preferences, restarted eclipse, and tried the key combo again. The text was still replaced by the symbol but the rename refactor mode was not entered did not open. I uninstalled PyDev, restarted eclipse, and tried the key combo again. The text was still replaced by the symbol.

Update (December, 2012): Another user on eclipse forums is having a similar issue: http://www.eclipse.org/forums/index.php?t=rview&goto=990973

Update (January, 2013): I have opened APSTUD-7664 in PyDev's Jira. Hopefully, a developer will pick it up and find a solution.

like image 859
burkemw3 Avatar asked Dec 06 '12 19:12

burkemw3


People also ask

How do I Refactor a name in Eclipse?

Solution. Select the element in the JDT editor and then select Refactor→ Rename, or right-click the element and select Refactor→ Rename. Enter the new name you want to give the item, and you're set.

How do I rename something in Eclipse?

Right-click the item you want to rename in the editor, and click Refactor > Rename. Alternatively, click Refactor > Rename from the main menu or right-click the identifier in the Outline or the Program Outline views and click Refactor > Rename.

What does Refactor mean in Eclipse?

The refactor menu shows all the possible changes that are supported on the selected Java element. To rename a class, select the Rename menu item.

How do I Refactor a variable in Eclipse?

You can Also Press Alt+Shift+R in Eclipse to refactor on variable.


1 Answers

Same problem here (OS X 10.7.5, Eclipse Juno for Java, build 20120614-1722, PyDev recently installed). The following solution worked for me:

  1. Eclipse > Preferences... > General > Keys
  2. Choose Rename - Refactoring (Category: Refactor - Java)
  3. Click Unbind Command
  4. Click Binding field and type Command-Option-R
  5. Click OK

A possible clue as to what's going on (I don't know): the User column is set to "C" before fixing the binding, and set to "U" afterward.

like image 59
Ed Baskerville Avatar answered Sep 23 '22 17:09

Ed Baskerville