Author: scabanovich
Date: 2007-07-17 08:32:44 -0400 (Tue, 17 Jul 2007)
New Revision: 2461
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/actions/SeamActionProvider.java
Log:
EXIN-218 - double click implemented
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/actions/SeamActionProvider.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/actions/SeamActionProvider.java 2007-07-17
12:18:02 UTC (rev 2460)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/actions/SeamActionProvider.java 2007-07-17
12:32:44 UTC (rev 2461)
@@ -13,8 +13,10 @@
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IActionBars;
import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.ICommonActionConstants;
import org.jboss.tools.seam.core.IOpenableElement;
import org.jboss.tools.seam.core.ISeamElement;
@@ -42,4 +44,20 @@
}
}
+ public void fillActionBars(IActionBars actionBars) {
+ ActionContext c = getContext();
+ ISelection s = c.getSelection();
+ if(s == null || s.isEmpty() || !(s instanceof IStructuredSelection)) return;
+ Object e = ((IStructuredSelection)s).getFirstElement();
+ if(e instanceof ISeamElement) {
+ ISeamElement element = (ISeamElement)e;
+
+ if(element instanceof IOpenableElement) {
+ SeamOpenAction action = new SeamOpenAction((IOpenableElement)element);
+ actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, action);
+ }
+
+ }
+
+ }
}