Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2011-11-09 15:23:42 +0000
committercletavernie2011-11-09 15:23:42 +0000
commit7386d7af54782ebc5ce195f3210fd3d80d0c1add (patch)
tree3b6de7195c80a7ba10f6f00c648a12cbcc2d922a /plugins/editor/org.eclipse.papyrus.editor.perspectiveconfiguration/src/org/eclipse/papyrus/editor/perspectiveconfiguration/CustomizeActionBars.java
parentb64b63012b1ef2c0d5a7ffd7d6e0df7794311fab (diff)
downloadorg.eclipse.papyrus-7386d7af54782ebc5ce195f3210fd3d80d0c1add.tar.gz
org.eclipse.papyrus-7386d7af54782ebc5ce195f3210fd3d80d0c1add.tar.xz
org.eclipse.papyrus-7386d7af54782ebc5ce195f3210fd3d80d0c1add.zip
362162: [Architecture - Refactoring] The plug-ins should be renamed to match their layer's qualified name
https://bugs.eclipse.org/bugs/show_bug.cgi?id=362162
Diffstat (limited to 'plugins/editor/org.eclipse.papyrus.editor.perspectiveconfiguration/src/org/eclipse/papyrus/editor/perspectiveconfiguration/CustomizeActionBars.java')
-rw-r--r--plugins/editor/org.eclipse.papyrus.editor.perspectiveconfiguration/src/org/eclipse/papyrus/editor/perspectiveconfiguration/CustomizeActionBars.java177
1 files changed, 177 insertions, 0 deletions
diff --git a/plugins/editor/org.eclipse.papyrus.editor.perspectiveconfiguration/src/org/eclipse/papyrus/editor/perspectiveconfiguration/CustomizeActionBars.java b/plugins/editor/org.eclipse.papyrus.editor.perspectiveconfiguration/src/org/eclipse/papyrus/editor/perspectiveconfiguration/CustomizeActionBars.java
new file mode 100644
index 00000000000..a4ec4050da0
--- /dev/null
+++ b/plugins/editor/org.eclipse.papyrus.editor.perspectiveconfiguration/src/org/eclipse/papyrus/editor/perspectiveconfiguration/CustomizeActionBars.java
@@ -0,0 +1,177 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.editor.perspectiveconfiguration;
+
+import java.util.List;
+
+import org.eclipse.jface.action.CoolBarManager;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.ICoolBarManager;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.StatusLineManager;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.jface.internal.provisional.action.IToolBarContributionItem;
+import org.eclipse.jface.internal.provisional.action.ToolBarContributionItem2;
+import org.eclipse.ui.IActionBars2;
+import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
+import org.eclipse.ui.internal.provisional.application.IActionBarConfigurer2;
+import org.eclipse.ui.internal.registry.IActionSetDescriptor;
+import org.eclipse.ui.services.IServiceLocator;
+
+
+/**
+ * this class is used to collection all information about menu, cool bar, statusline...
+ *
+ */
+public class CustomizeActionBars implements IActionBarConfigurer2, IActionBars2 {
+
+ protected List<IActionSetDescriptor> actionSet = null;
+
+
+ /**
+ * get the list of action set
+ *
+ * @return
+ */
+ public List<IActionSetDescriptor> getActionSet() {
+ return actionSet;
+ }
+
+ /**
+ * set the list of action Set
+ *
+ * @param actionSet
+ */
+ public void setActionSet(List<IActionSetDescriptor> actionSet) {
+ this.actionSet = actionSet;
+ }
+
+ protected MenuManager menuManager = new MenuManager();
+
+ protected CoolBarManager coolBarManager = new CoolBarManager();
+
+ protected StatusLineManager statusLineManager = new StatusLineManager();
+
+ protected ToolBarManager toolBarManager = new ToolBarManager();
+
+ /**
+ * Create a new instance of this class.
+ *
+ * @param configurer
+ * the configurer
+ */
+ public CustomizeActionBars(IWorkbenchWindowConfigurer configurer) {
+ }
+
+ /**
+ * do not call this method
+ */
+ public IWorkbenchWindowConfigurer getWindowConfigurer() {
+ return null;
+ }
+
+ /**
+ * get the manager in charge to display all menu
+ */
+
+ public IMenuManager getMenuManager() {
+ return menuManager;
+ }
+
+ /**
+ * the manager in charge to display the status line
+ */
+ public IStatusLineManager getStatusLineManager() {
+ return statusLineManager;
+ }
+
+ /**
+ * the manager in charge to display the cool bar, this also the tool bar in eclipse
+ */
+ public ICoolBarManager getCoolBarManager() {
+ return coolBarManager;
+ }
+
+ /**
+ * see the getCoolBarManager
+ */
+ public IToolBarManager getToolBarManager() {
+ return toolBarManager;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setGlobalActionHandler(String actionID, IAction handler) {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void updateActionBars() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void clearGlobalActionHandlers() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public IAction getGlobalActionHandler(String actionId) {
+ return null;
+ }
+
+ public void registerGlobalAction(IAction action) {
+ }
+
+ /**
+ * Clean up the action bars.
+ */
+ public void dispose() {
+ coolBarManager.dispose();
+ menuManager.dispose();
+ statusLineManager.dispose();
+ toolBarManager.dispose();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public final IServiceLocator getServiceLocator() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public IToolBarManager createToolBarManager() {
+ return toolBarManager;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public IToolBarContributionItem createToolBarContributionItem(IToolBarManager toolBarManager, String id) {
+ return new ToolBarContributionItem2(toolBarManager, id);
+ }
+
+
+
+}

Back to the top