Search code examples
eclipsestruts2eclipse-plugin

Navigating from struts.xml to occurrence of action in Eclipse


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>

In spite 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?


Solution

  • 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.