9

I have lot of legacy models in MVC application and there are lot of redundant properties in model classes.

Using CTRL + SHIFT + G in Eclipse I can find references in Java code, but not in my views, which are mostly JSP or JSF pages. Therefore, I cannot safely refactor code.

The only option then is plain String search which is not comfortable and more error prone. Is there solution?

Xorty
  • 18,367
  • 27
  • 104
  • 155

1 Answers1

3

The JBoss Tools 3.3 plugin has this capability (and many more, such as tag and EL autocompletion). Note that it's currently still in development (beta) stage. You can get it in Eclipse Indigo (3.7.x) by Help > Install New Software and then entering the URL of this update site. In the list of available plugins components, just pick the "JBoss Web and Java EE Development" option (others are not required). No, this does not require a JBoss AS server as your project's target runtime.

enter image description here

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • Doesn't seem to work for me. I have @ManagedBean called "NumberGenerator" with "number" property (get,set) and it is used in JSF2 page like this: – Xorty Jan 08 '12 at 10:04
  • Okay I don't know what was wrong, I restared computer and it does work as expected. Thanks BalusC! – Xorty Jan 08 '12 at 11:33
  • I added a screenshot as evidence. – BalusC Jan 08 '12 at 11:35
  • Will this work if the search is performed in a .jsp file? It already works in a .java file without this plugin inside Eclipse, which is what your screenshot is showing so I'm confused. – Xonatron Jan 24 '12 at 17:09