Navigating from struts.xml to occurrence of action in Eclipse
I have some code within struts.xml like:
<action name="vie开发者_JAVA百科wApplicationPDF"
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?
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 selectReferences
-->Workspace
.
This does the same search as what you mentioned.
Create a shortcut for File Search:
Window > Customize perspective > Command Groups Availability > Search > Menubar details > File.
You'll get a tool tip for Key bindings. Click on the link and select the Binding input field. Click a combination of keys, say Shift+F and hit Apply.
Now you can select the text in the file and hit Shift+F+Enter and the search is on.
You can modify the File name patterns in the search dialog to suit.
(I'm using Helios distribution)
Also useful:
Install the AnyEdit tools plugin for Eclipse from http://andrei.gmxhome.de/anyedit/
Allows you to navigate to file under cursor (ctrl+alt+R) or open type under cursor (ctrl+alt+T).
Well its past a decade, still I am writing this for someone who just started using Eclipse. You may download the Plugin StrutsClipse.
精彩评论