Author: vrubezhny
Date: 2008-04-25 13:50:32 -0400 (Fri, 25 Apr 2008)
New Revision: 7827
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.properties
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
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.
Actions are moved to the Search menu.
Hot-key combinations are made editor context sensitive.
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.properties
(rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.properties 2008-04-25 17:50:32 UTC
(rev 7827)
@@ -0,0 +1,2 @@
+# Menus
+searchMenu.label= Se&arch
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2008-04-25 16:30:13 UTC (rev
7826)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2008-04-25 17:50:32 UTC (rev
7827)
@@ -446,48 +446,47 @@
toolbarPath="org.eclipse.search.searchActionSet/Search"
tooltip="Open Seam Component">
</action>
+ </actionSet>
+ <actionSet
+ id="org.eclipse.search.seamSearchActionSet"
+ label="Seam Search"
+ visible="true">
+ <!-- see
http://bugs.eclipse.org/bugs/show_bug.cgi?id=15684 -->
+<!-- Note: The menu (re-) definition has to be here due to bug: -->
+<!-- =================================================================== -->
+<!-- Search Menu -->
+<!-- =================================================================== -->
+ <menu
+ label="%searchMenu.label"
+ path="navigate"
+ id="org.eclipse.search.menu">
+ <groupMarker name="internalDialogGroup"/> <!-- not to be used by
clients -->
+ <groupMarker name="dialogGroup"/> <!-- to be used by
clients -->
+ <separator name="seamSearchMenuActionsGroup"/> <!-- to be
used by clients -->
+ <separator name="fileSearchContextMenuActionsGroup"/> <!-- to be
used by clients -->
+ <separator name="contextMenuActionsGroup"/> <!-- to be used
by clients -->
+ <separator name="occurencesActionsGroup"/> <!-- to be used
by clients -->
+ <separator name="extraSearchGroup"/> <!-- to be used by
clients -->
+ </menu>
+
<action
class="org.jboss.tools.seam.ui.actions.FindSeamDeclarationsAction"
- definitionId="org.eclipse.jdt.ui.edit.text.java.search.declarations.in.workspace"
- helpContextId="org.eclipse.jdt.ui.find_declarations_action"
+ definitionId="org.jboss.tools.seam.ui.find.declarations"
icon="icons/find_seam_declarations.gif"
id="findDeclarations"
label="Find Seam Declarations"
- menubarPath="navigate/open.ext2"
+
menubarPath="org.eclipse.search.menu/seamSearchMenuActionsGroup"
tooltip="Find Seam Declarations">
</action>
<action
class="org.jboss.tools.seam.ui.actions.FindSeamReferencesAction"
- definitionId="org.eclipse.jdt.ui.edit.text.java.search.references.in.workspace"
- helpContextId="org.eclipse.jdt.ui.find_references_action"
+ definitionId="org.jboss.tools.seam.ui.find.references"
icon="icons/find_seam_references.gif"
id="findReferences"
label="Find Seam References"
- menubarPath="navigate/open.ext2"
+
menubarPath="org.eclipse.search.menu/seamSearchMenuActionsGroup"
tooltip="Find Seam References">
</action>
- <!-- action
-
class="org.jboss.tools.seam.ui.actions.FindSeamDeclarationsAction"
- definitionId="org.eclipse.jdt.ui.edit.text.java.search.declarations.in.workspace"
- helpContextId="org.eclipse.jdt.ui.find_declarations_action"
- icon="icons/find_seam_declarations.gif"
- id="findDeclarations"
- label="Find Seam Declarations"
- menubarPath="navigate/open.ext2"
- toolbarPath="org.eclipse.search.searchActionSet/Search"
- tooltip="Find Seam Declarations">
- </action>
- <action
-
class="org.jboss.tools.seam.ui.actions.FindSeamReferencesAction"
- definitionId="org.eclipse.jdt.ui.edit.text.java.search.references.in.workspace"
- helpContextId="org.eclipse.jdt.ui.find_references_action"
- icon="icons/find_seam_references.gif"
- id="findReferences"
- label="Find Seam References"
- menubarPath="navigate/open.ext2"
- toolbarPath="org.eclipse.search.searchActionSet/Search"
- tooltip="Find Seam References">
- </action -->
</actionSet>
</extension>
<extension
@@ -499,13 +498,13 @@
name="Open Seam Component">
</command>
<command
- categoryId="org.eclipse.ui.category.navigate"
+ categoryId="org.eclipse.search.ui.category.search"
description="Find Seam Declarations"
id="org.jboss.tools.seam.ui.find.declarations"
name="Find Seam Declarations">
</command>
<command
- categoryId="org.eclipse.ui.category.navigate"
+ categoryId="org.eclipse.search.ui.category.search"
description="Find Seam References"
id="org.jboss.tools.seam.ui.find.references"
name="Find Seam References">
@@ -518,16 +517,21 @@
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M1+M2+Z">
</key>
- <!-- key
+ <!--
+ contextId="org.jboss.tools.vpe.editorContext"
+ -->
+ <key
commandId="org.jboss.tools.seam.ui.find.declarations"
+ contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M1+G">
</key>
<key
commandId="org.jboss.tools.seam.ui.find.references"
+ contextId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M1+M2+G">
- </key -->
+ </key>
</extension>
<extension
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-25
16:30:13 UTC (rev 7826)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/FindSeamAction.java 2008-04-25
17:50:32 UTC (rev 7827)
@@ -53,6 +53,7 @@
import org.eclipse.ui.part.MultiPageEditorPart;
import org.eclipse.ui.progress.IProgressService;
import org.eclipse.ui.texteditor.AbstractTextEditor;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.editor.EditorPartWrapper;
import org.jboss.tools.common.model.ui.texteditors.xmleditor.XMLTextEditor;
@@ -69,6 +70,8 @@
import org.jboss.tools.seam.ui.search.SeamSearchQuery;
import org.jboss.tools.seam.ui.search.SeamSearchScope;
+import com.mchange.v2.async.StrandedTaskReporting;
+
/**
* Base class for Seam Find actions
*
@@ -124,7 +127,10 @@
if (activeEditor instanceof AbstractTextEditor) {
viewer = getSourceViewer((AbstractTextEditor)activeEditor);
}
- } else if (editor instanceof CompilationUnitEditor) {
+ } else if (editor instanceof AbstractTextEditor ) {
+ viewer = getSourceViewer((AbstractTextEditor)editor);
+ }
+ else if (editor instanceof CompilationUnitEditor) {
viewer = ((CompilationUnitEditor)editor).getViewer();
}
return viewer;