Author: koen.aers(a)jboss.com
Date: 2008-07-29 05:57:10 -0400 (Tue, 29 Jul 2008)
New Revision: 9377
Added:
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/GenericActionBarContributor.java
Removed:
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/GenericActionBarContributor.java
Log:
Deleted:
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/GenericActionBarContributor.java
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/GenericActionBarContributor.java 2008-07-29
09:56:49 UTC (rev 9376)
+++
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/GenericActionBarContributor.java 2008-07-29
09:57:10 UTC (rev 9377)
@@ -1,83 +0,0 @@
-package org.jboss.tools.flow.editor;
-
-/*
- * Copyright 2005 JBoss Inc
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *
http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.gef.ui.actions.ActionBarContributor;
-import org.eclipse.gef.ui.actions.AlignmentRetargetAction;
-import org.eclipse.gef.ui.actions.DeleteRetargetAction;
-import org.eclipse.gef.ui.actions.GEFActionConstants;
-import org.eclipse.gef.ui.actions.RedoRetargetAction;
-import org.eclipse.gef.ui.actions.UndoRetargetAction;
-import org.eclipse.gef.ui.actions.ZoomComboContributionItem;
-import org.eclipse.gef.ui.actions.ZoomInRetargetAction;
-import org.eclipse.gef.ui.actions.ZoomOutRetargetAction;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.RetargetAction;
-
-/**
- * Common implementation of a ActionBarContributor.
- *
- * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris
Verlaenen</a>
- */
-public class GenericActionBarContributor extends ActionBarContributor {
-
- protected void buildActions() {
- addRetargetAction( new UndoRetargetAction() );
- addRetargetAction( new RedoRetargetAction() );
- addRetargetAction( new DeleteRetargetAction() );
-
- addRetargetAction( new ZoomInRetargetAction() );
- addRetargetAction( new ZoomOutRetargetAction() );
-
- addRetargetAction( new AlignmentRetargetAction( PositionConstants.LEFT ) );
- addRetargetAction( new AlignmentRetargetAction( PositionConstants.CENTER ) );
- addRetargetAction( new AlignmentRetargetAction( PositionConstants.RIGHT ) );
- addRetargetAction( new AlignmentRetargetAction( PositionConstants.TOP ) );
- addRetargetAction( new AlignmentRetargetAction( PositionConstants.MIDDLE ) );
- addRetargetAction( new AlignmentRetargetAction( PositionConstants.BOTTOM ) );
-
- addRetargetAction( new RetargetAction(
- GEFActionConstants.TOGGLE_GRID_VISIBILITY, "Grid" ));
- }
-
- public void contributeToToolBar(IToolBarManager toolBarManager) {
- toolBarManager.add( getAction( ActionFactory.UNDO.getId() ) );
- toolBarManager.add( getAction( ActionFactory.REDO.getId() ) );
- toolBarManager.add( new Separator() );
- toolBarManager.add( new ZoomComboContributionItem( getPage() ) );
- toolBarManager.add( new Separator() );
-
- DropDownMenuWithDefaultAction alignMenu = new DropDownMenuWithDefaultAction(
getActionRegistry().getAction( GEFActionConstants.ALIGN_LEFT ) );
- alignMenu.add( getActionRegistry().getAction( GEFActionConstants.ALIGN_LEFT ) );
- alignMenu.add( getActionRegistry().getAction( GEFActionConstants.ALIGN_CENTER )
);
- alignMenu.add( getActionRegistry().getAction( GEFActionConstants.ALIGN_RIGHT )
);
- alignMenu.add( new Separator() );
- alignMenu.add( getActionRegistry().getAction( GEFActionConstants.ALIGN_TOP ) );
- alignMenu.add( getActionRegistry().getAction( GEFActionConstants.ALIGN_MIDDLE )
);
- alignMenu.add( getActionRegistry().getAction( GEFActionConstants.ALIGN_BOTTOM )
);
- toolBarManager.add( alignMenu );
-
- toolBarManager.add( new Separator() );
- toolBarManager.add( getAction(GEFActionConstants.TOGGLE_GRID_VISIBILITY) );
- }
-
- protected void declareGlobalActionKeys() {
- }
-}
Copied:
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/GenericActionBarContributor.java
(from rev 9374,
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/GenericActionBarContributor.java)
===================================================================
---
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/GenericActionBarContributor.java
(rev 0)
+++
trunk/flow/plugins/org.jboss.tools.flow.common.graph/src/org/jboss/tools/flow/editor/GenericActionBarContributor.java 2008-07-29
09:57:10 UTC (rev 9377)
@@ -0,0 +1,83 @@
+package org.jboss.tools.flow.editor;
+
+/*
+ * Copyright 2005 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.gef.ui.actions.ActionBarContributor;
+import org.eclipse.gef.ui.actions.AlignmentRetargetAction;
+import org.eclipse.gef.ui.actions.DeleteRetargetAction;
+import org.eclipse.gef.ui.actions.GEFActionConstants;
+import org.eclipse.gef.ui.actions.RedoRetargetAction;
+import org.eclipse.gef.ui.actions.UndoRetargetAction;
+import org.eclipse.gef.ui.actions.ZoomComboContributionItem;
+import org.eclipse.gef.ui.actions.ZoomInRetargetAction;
+import org.eclipse.gef.ui.actions.ZoomOutRetargetAction;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.actions.RetargetAction;
+
+/**
+ * Common implementation of a ActionBarContributor.
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris
Verlaenen</a>
+ */
+public class GenericActionBarContributor extends ActionBarContributor {
+
+ protected void buildActions() {
+ addRetargetAction( new UndoRetargetAction() );
+ addRetargetAction( new RedoRetargetAction() );
+ addRetargetAction( new DeleteRetargetAction() );
+
+ addRetargetAction( new ZoomInRetargetAction() );
+ addRetargetAction( new ZoomOutRetargetAction() );
+
+ addRetargetAction( new AlignmentRetargetAction( PositionConstants.LEFT ) );
+ addRetargetAction( new AlignmentRetargetAction( PositionConstants.CENTER ) );
+ addRetargetAction( new AlignmentRetargetAction( PositionConstants.RIGHT ) );
+ addRetargetAction( new AlignmentRetargetAction( PositionConstants.TOP ) );
+ addRetargetAction( new AlignmentRetargetAction( PositionConstants.MIDDLE ) );
+ addRetargetAction( new AlignmentRetargetAction( PositionConstants.BOTTOM ) );
+
+ addRetargetAction( new RetargetAction(
+ GEFActionConstants.TOGGLE_GRID_VISIBILITY, "Grid" ));
+ }
+
+ public void contributeToToolBar(IToolBarManager toolBarManager) {
+ toolBarManager.add( getAction( ActionFactory.UNDO.getId() ) );
+ toolBarManager.add( getAction( ActionFactory.REDO.getId() ) );
+ toolBarManager.add( new Separator() );
+ toolBarManager.add( new ZoomComboContributionItem( getPage() ) );
+ toolBarManager.add( new Separator() );
+
+ DropDownMenuWithDefaultAction alignMenu = new DropDownMenuWithDefaultAction(
getActionRegistry().getAction( GEFActionConstants.ALIGN_LEFT ) );
+ alignMenu.add( getActionRegistry().getAction( GEFActionConstants.ALIGN_LEFT ) );
+ alignMenu.add( getActionRegistry().getAction( GEFActionConstants.ALIGN_CENTER )
);
+ alignMenu.add( getActionRegistry().getAction( GEFActionConstants.ALIGN_RIGHT )
);
+ alignMenu.add( new Separator() );
+ alignMenu.add( getActionRegistry().getAction( GEFActionConstants.ALIGN_TOP ) );
+ alignMenu.add( getActionRegistry().getAction( GEFActionConstants.ALIGN_MIDDLE )
);
+ alignMenu.add( getActionRegistry().getAction( GEFActionConstants.ALIGN_BOTTOM )
);
+ toolBarManager.add( alignMenu );
+
+ toolBarManager.add( new Separator() );
+ toolBarManager.add( getAction(GEFActionConstants.TOGGLE_GRID_VISIBILITY) );
+ }
+
+ protected void declareGlobalActionKeys() {
+ }
+}