Author: scabanovich
Date: 2009-03-05 11:26:31 -0500 (Thu, 05 Mar 2009)
New Revision: 14028
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/SelectOnDiagramHandler.java
Log:
JBIDE-3906
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta 2009-03-05
16:15:17 UTC (rev 14027)
+++
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta 2009-03-05
16:26:31 UTC (rev 14028)
@@ -1072,7 +1072,7 @@
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.OpenPageHandler"
ICON="action.empty" PROPERTIES="actionpath=Open"
displayName="Open Page" kind="action"
name="OpenPage"/>
- <XActionItem
+ <XActionItem HIDE="disabled"
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"
ICON="action.empty" displayName="Select on Diagram"
kind="action" name="Select"/>
<XActionItem ICON="action.copy" displayName="Copy"
kind="list" name="CopyActions">
@@ -1185,7 +1185,7 @@
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.OpenPageHandler"
ICON="action.empty" PROPERTIES="actionpath=Open"
displayName="Open Page" kind="action"
name="OpenPage"/>
- <XActionItem
+ <XActionItem HIDE="disabled"
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"
ICON="action.empty" displayName="Select on Diagram"
kind="action" name="Select"/>
<XActionItem ICON="action.copy" displayName="Copy"
kind="list" name="CopyActions">
@@ -1318,7 +1318,7 @@
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.OpenPageHandler"
ICON="action.empty" PROPERTIES="actionpath=Open"
displayName="Open Page" kind="action"
name="OpenPage"/>
- <XActionItem
+ <XActionItem HIDE="disabled"
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"
ICON="action.empty" displayName="Select on Diagram"
kind="action" name="Select"/>
<XActionItem ICON="action.copy" displayName="Copy"
kind="list" name="CopyActions">
@@ -2772,7 +2772,7 @@
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.OpenPageHandler"
ICON="action.empty" PROPERTIES="actionpath=Open"
displayName="Open Page" kind="action"
name="OpenPage"/>
- <XActionItem
+ <XActionItem HIDE="disabled"
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"
ICON="action.empty" displayName="Select on Diagram"
kind="action" name="Select"/>
<XActionItem ICON="action.copy" displayName="Copy"
kind="list" name="CopyActions">
@@ -2849,7 +2849,7 @@
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.OpenPageHandler"
ICON="action.empty" PROPERTIES="actionpath=Open"
displayName="Open Page" kind="action"
name="OpenPage"/>
- <XActionItem
+ <XActionItem HIDE="disabled"
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"
ICON="action.empty" displayName="Select on Diagram"
kind="action" name="Select"/>
<XActionItem ICON="action.copy" displayName="Copy"
kind="list" name="CopyActions">
@@ -2939,7 +2939,7 @@
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.OpenPageHandler"
ICON="action.empty" PROPERTIES="actionpath=Open"
displayName="Open Page" kind="action"
name="OpenPage"/>
- <XActionItem
+ <XActionItem HIDE="disabled"
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"
ICON="action.empty" displayName="Select on Diagram"
kind="action" name="Select"/>
<XActionItem ICON="action.copy" displayName="Copy"
kind="list" name="CopyActions">
@@ -3227,7 +3227,7 @@
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.OpenPageHandler"
ICON="action.empty" PROPERTIES="actionpath=Open"
displayName="Open Page" kind="action"
name="OpenPage"/>
- <XActionItem
+ <XActionItem HIDE="disabled"
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"
ICON="action.empty" displayName="Select on Diagram"
kind="action" name="Select"/>
<XActionItem ICON="action.copy" displayName="Copy"
kind="list" name="CopyActions">
@@ -3311,7 +3311,7 @@
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.OpenPageHandler"
ICON="action.empty" PROPERTIES="actionpath=Open"
displayName="Open Page" kind="action"
name="OpenPage"/>
- <XActionItem
+ <XActionItem HIDE="disabled"
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"
ICON="action.empty" displayName="Select on Diagram"
kind="action" name="Select"/>
<XActionItem ICON="action.copy" displayName="Copy"
kind="list" name="CopyActions">
@@ -3412,7 +3412,7 @@
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.OpenPageHandler"
ICON="action.empty" PROPERTIES="actionpath=Open"
displayName="Open Page" kind="action"
name="OpenPage"/>
- <XActionItem
+ <XActionItem HIDE="disabled"
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"
ICON="action.empty" displayName="Select on Diagram"
kind="action" name="Select"/>
<XActionItemReference entity="SeamPageRedirect20"
name="CopyActions" path="CopyActions"/>
@@ -3469,7 +3469,7 @@
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.OpenPageHandler"
ICON="action.empty" PROPERTIES="actionpath=Open"
displayName="Open Page" kind="action"
name="OpenPage"/>
- <XActionItem
+ <XActionItem HIDE="disabled"
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"
ICON="action.empty" displayName="Select on Diagram"
kind="action" name="Select"/>
<XActionItem ICON="action.copy" displayName="Copy"
kind="list" name="CopyActions">
@@ -3618,7 +3618,7 @@
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.OpenPageHandler"
ICON="action.empty" PROPERTIES="actionpath=Open"
displayName="Open Page" kind="action"
name="OpenPage"/>
- <XActionItem
+ <XActionItem HIDE="disabled"
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"
ICON="action.empty" displayName="Select on Diagram"
kind="action" name="Select"/>
<XActionItem ICON="action.copy" displayName="Copy"
kind="list" name="CopyActions">
@@ -3694,7 +3694,7 @@
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.OpenPageHandler"
ICON="action.empty" PROPERTIES="actionpath=Open"
displayName="Open Page" kind="action"
name="OpenPage"/>
- <XActionItem
+ <XActionItem HIDE="disabled"
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"
ICON="action.empty" displayName="Select on Diagram"
kind="action" name="Select"/>
<XActionItem ICON="action.copy" displayName="Copy"
kind="list" name="CopyActions">
@@ -3770,7 +3770,7 @@
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.OpenPageHandler"
ICON="action.empty" PROPERTIES="actionpath=Open"
displayName="Open Page" kind="action"
name="OpenPage"/>
- <XActionItem
+ <XActionItem HIDE="disabled"
HandlerClassName="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"
ICON="action.empty" displayName="Select on Diagram"
kind="action" name="Select"/>
<XActionItemReference entity="SeamPageRule20"
name="CopyActions" path="CopyActions"/>
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/SelectOnDiagramHandler.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/SelectOnDiagramHandler.java 2009-03-05
16:15:17 UTC (rev 14027)
+++
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/SelectOnDiagramHandler.java 2009-03-05
16:26:31 UTC (rev 14028)
@@ -28,14 +28,20 @@
public SelectOnDiagramHandler() {}
public boolean isEnabled(XModelObject object) {
- return (object != null && object.isActive());
+ if(object == null || !object.isActive()) return false;
+ XModelObject f = object.getParent();
+ while(f != null && f.getFileType() != XModelObject.FILE) f = f.getParent();
+ if(f == null ||
!f.getModelEntity().getName().startsWith(SeamPagesConstants.ENT_FILE_SEAM_PAGES)) {
+ return false;
+ }
+ return true;
}
public void executeHandler(XModelObject object, Properties p) throws XModelException {
if(object == null) return;
XModelObject item = getItemOnDiagram(object);
if(item == null) return;
- FindObjectHelper.findModelObject(item, FindObjectHelper.IN_EDITOR_ONLY,
"Diagram");
+ FindObjectHelper.findModelObject(item, FindObjectHelper.IN_EDITOR_ONLY,
"Graphical");
FindObjectHelper.findModelObject(object, FindObjectHelper.IN_EDITOR_ONLY);
}
Show replies by date