Author: dazarov
Date: 2007-07-24 10:04:14 -0400 (Tue, 24 Jul 2007)
New Revision: 2629
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java
Log:
http://jira.jboss.com/jira/browse/EXIN-402
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java 2007-07-24
13:22:25 UTC (rev 2628)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java 2007-07-24
14:04:14 UTC (rev 2629)
@@ -17,8 +17,11 @@
import org.eclipse.gef.editparts.ScalableFreeformRootEditPart;
import org.eclipse.gef.requests.CreationFactory;
import org.eclipse.gef.requests.SimpleFactory;
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.gef.ui.actions.PrintAction;
import org.eclipse.gef.ui.actions.WorkbenchPartAction;
import org.eclipse.gef.ui.parts.GraphicalEditor;
+import org.eclipse.jface.action.IAction;
import org.eclipse.jface.util.TransferDropTargetListener;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -54,6 +57,7 @@
}
protected void createActions() {
+
getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(),new
WorkbenchPartAction(this){
protected boolean calculateEnabled() {
@@ -63,7 +67,10 @@
ormDiagram.refresh();
}
});
+
super.createActions();
+
+ getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.PRINT.getId(),
getActionRegistry().getAction(ActionFactory.PRINT.getId()));
}
private TransferDropTargetListener createTransferDropTargetListener() {