Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/editor/org.eclipse.papyrus.editor.perspectiveconfiguration/src/org/eclipse/papyrus/ui/perspectiveconfiguration/PerspectiveConfigurator.java')
-rw-r--r--plugins/editor/org.eclipse.papyrus.editor.perspectiveconfiguration/src/org/eclipse/papyrus/ui/perspectiveconfiguration/PerspectiveConfigurator.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/plugins/editor/org.eclipse.papyrus.editor.perspectiveconfiguration/src/org/eclipse/papyrus/ui/perspectiveconfiguration/PerspectiveConfigurator.java b/plugins/editor/org.eclipse.papyrus.editor.perspectiveconfiguration/src/org/eclipse/papyrus/ui/perspectiveconfiguration/PerspectiveConfigurator.java
new file mode 100644
index 00000000000..9aa5d1e5a60
--- /dev/null
+++ b/plugins/editor/org.eclipse.papyrus.editor.perspectiveconfiguration/src/org/eclipse/papyrus/ui/perspectiveconfiguration/PerspectiveConfigurator.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * 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.ui.perspectiveconfiguration;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IStartup;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * this class is used to hide unuseful menu and action Set
+ *
+ */
+public class PerspectiveConfigurator implements IStartup {
+
+ public void earlyStartup() {
+ Display.getDefault().asyncExec(new Runnable() {
+
+ public void run() {
+ final IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ //a perspective listener is added
+ workbenchWindow.addPerspectiveListener(new PapyrusPerspectiveListener(workbenchWindow));
+ }
+ });
+ }
+
+}

Back to the top