Author: dazarov
Date: 2008-06-30 06:04:12 -0400 (Mon, 30 Jun 2008)
New Revision: 9010
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-2348
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java 2008-06-30
09:47:12 UTC (rev 9009)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java 2008-06-30
10:04:12 UTC (rev 9010)
@@ -34,6 +34,11 @@
import org.eclipse.gef.requests.SelectionRequest;
import org.eclipse.swt.accessibility.AccessibleControlEvent;
import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.jboss.tools.common.meta.action.XAction;
+import org.jboss.tools.common.model.XModelException;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.ui.dnd.DnDUtil;
+import org.jboss.tools.seam.ui.pages.SeamUiPagesPlugin;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Page;
import org.jboss.tools.seam.ui.pages.editor.figures.NodeFigure;
@@ -63,7 +68,7 @@
public void removingChild(EditPart child, int index) {
}
-
+
public void selectedStateChanged(EditPart editpart) {
if (this.getSelected() == EditPart.SELECTED_PRIMARY) {
((PagesDiagramEditPart) PageEditPart.this.getParent())
@@ -117,6 +122,17 @@
getPageModel().setParamsVisible(!getPageModel().isParamsVisible());
refresh();
fig.repaint();
+ }else{
+ try {
+ XAction action = DnDUtil.getEnabledAction(
+ (XModelObject) getPageModel().getData(), null,
+ "OpenPage");
+ if (action != null)
+ action.executeHandler((XModelObject) getPageModel()
+ .getData(), null);
+ } catch (XModelException e) {
+ SeamUiPagesPlugin.log(e);
+ }
}
}
}