5

I have just installed eclipse (indigo-web) on my computer.

I know that there is supposed to be a menu item called "refactoring" but it just isn't there.

Does anybody know how to add it?

Thanks a lot

lital maatuk
  • 5,921
  • 20
  • 57
  • 79
  • 1
    Right click in a source file, go to source and then refactor; do you see it? – Blaskovicz Dec 05 '11 at 14:36
  • @Blaskovicz when I click on the script explorer i see a refactor option in the menu that can only rename and move. I want the refactor to arrange and indent the code. when I press back in the code itself the refactor option dissappears. But I tried the right click like you said, and found the Format option which did the indentation i wanted. So thanks. – lital maatuk Dec 05 '11 at 15:02
  • 1
    also, in the preferences, there are key-combos to do a ton of things. To format code, ctrl+shift+f, to comment/uncomment code ctrl+shift+c, delete a line ctrl+d, etc. Hope this helps. – Blaskovicz Dec 05 '11 at 15:25
  • As a point of information, "formatting" has nothing to do with "refactoring". – Dave Newton Dec 05 '11 at 15:27
  • I have this same issue. I understand where the refactoring menu is supposed to show in what perspective. My issue is that in my Eclipse for JEE Juno installation, I just do not see this menu item. – sdesciencelover Sep 16 '12 at 17:45
  • Try Alt + Shift + T, opens the quick refactoring menu – Diego Pino Feb 14 '13 at 16:18

3 Answers3

3

This is symptomatic of your src folder not being on your build path. See the accepted answer of this question

Community
  • 1
  • 1
HellishHeat
  • 2,280
  • 4
  • 31
  • 37
3

From the Eclipse wiki article

In the Java perspective, a menu called Refactor is enabled. It contains all possible refactoring operations currently implemented by the JDT. All operations are listed, even though they may not be applicable to the current selection.

Some more from the Eclipse help site

Refactoring commands are available from the context menus of several Java views (e.g. Package Explorer, Outline) and editors.

nulltoken
  • 64,429
  • 20
  • 138
  • 130
1

I have just had this same problem occur and it seems you must be in the Package Explorer view in order to execute many of the options in the Refactor menu and classes. Try this: click Window -> Show View -> select Package Explorer from the list and then open the Refactor menu from within that view.

Moot
  • 321
  • 4
  • 12