Author: vrubezhny
Date: 2008-04-29 11:12:21 -0400 (Tue, 29 Apr 2008)
New Revision: 7893
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/FindSeamAction.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2121 Different behavior(result) of actions Find
Seam Declarations and Find Seam References when call them using hot keys or selection from
Navigate menu.
Find Seam Declarations/References actions enablement is modified.
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/FindSeamAction.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/FindSeamAction.java 2008-04-29
14:06:54 UTC (rev 7892)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/FindSeamAction.java 2008-04-29
15:12:21 UTC (rev 7893)
@@ -452,33 +452,8 @@
}
}
- /*
- * Updates availability on the action delegate
- *
- * @param part
- * @param selection
- */
- private void update(IWorkbenchPart part, ISelection selection) {
- boolean enabled = false;
- try {
- if (!(part instanceof IEditorPart))
- return;
-
- ISourceViewer viewer = getEditorViewer((IEditorPart)part);
- if (viewer == null)
- return;
-
- enabled = (getTextSelection(selection) != null);
- } finally {
- setEnabled(enabled);
- if (fDelegatorAction != null) {
- fDelegatorAction.setEnabled(enabled);
- }
- }
- }
-
// ISelectionListener
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- update(selection);
+ update(getTextSelection(getEditorViewer(part)));
}
}