views:

41

answers:

2

I have some code within struts.xml like:

   <action name="viewApplicationPDF" 
     class="com.xxx.abc.web.action.XApplicationPDFAction">
        <result name="success">/WEB-INF/templates/xApplication.jsp</result>
       </action> 

I want to be able to quickly jump to the occurrences of the action "viewApplicationPDF" within jsp files containing the action usage, like:

   <a href="<s:url action="viewApplicationPDF"/>/s:url>Used here</a>

Inspite of the fact that this jump pattern is quite frequent, I have not found a quick way to do this in Eclipse. Currently I have to do a "File Search" for "viewApplicationPDF" and then open the directory tree within the search results -- but all this is slow. Is there a plugin or some other tool to solve my problem?

+1  A: 

Unfortunately there's no such plugins (at least that I'm aware of).

An alternative to what you've mentioned:

  • Double-click on the word you want to search.
  • Press Ctrl+Shift+G or right-click on the word and select References-->Workspace.

This does the same search as what you mentioned.

The Elite Gentleman
Unluckily Ctrl+Shift+G does not work within struts.xml (it works only within *.java) for me.
Amit Kumar
@Amit Kumar, true, sorry, you'll have to find a struts2 plugin for Eclipse or write your own.
The Elite Gentleman