diff options
author | Christian W. Damus | 2016-02-11 02:48:20 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2016-02-12 15:31:41 +0000 |
commit | ecd4928b327f5561364c5068c9ff5f1668e92d13 (patch) | |
tree | 7c34f46cf82a1d65ac753fa92c2a5d55371b8dba /plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation | |
parent | 751a204d74e15eb2db6b41c937691fc56dcc1252 (diff) | |
download | org.eclipse.papyrus-ecd4928b327f5561364c5068c9ff5f1668e92d13.tar.gz org.eclipse.papyrus-ecd4928b327f5561364c5068c9ff5f1668e92d13.tar.xz org.eclipse.papyrus-ecd4928b327f5561364c5068c9ff5f1668e92d13.zip |
Bug 485220: [Architecture] Provide a more modular architecture
https://bugs.eclipse.org/bugs/show_bug.cgi?id=485220
Factor UI dependencies out of the UML Element Types bundle. This includes
moving some advices that interact with the user into a new
org.eclipse.papyrus.uml.service.types.ui bundle.
Pull up the PasteCommandService and IPasteCommandProvider API into the
Infra Diagram layer where the extension point is defined. Deprecate the
old API in the UML layer.
Introduce a service for participation of languages in CSS styling:
* styling reset actions in the Reset Style command
* access to semantic model classes and properties to make available to CSS
Factor PapyrusObservableValue and cohorts out of the UML Tools bundle
into the Infra Layer for more general reuse and to relieve the
Diagram Infrastructure layer of UML dependencies. The old API remains as
deprecated.
Remove the Infra Diagram Layer dependency on UML Layer for property
testers governing deletion in the diagram. Includes introduction of
a new IGraphicalDeletionHelper OSGi service for delegation of the
determination of whether an element can be deleted from the diagram and
replacement of the XML expression properties
* org.eclipse.papyrus.uml.diagram.common.isSemanticDeletion
* org.eclipse.papyrus.uml.diagram.common.isReadOnly
by
* org.eclipse.papyrus.infra.gmfdiag.common.isSemanticDeletion
* org.eclipse.papyrus.infra.gmfdiag.common.canDelete
(where the latter is the negation of the property that it supersedes)
Extract UML dependencies from the Diagram Outline and CSS Editor bundles.
Remove unused MDTUtil APIs that referenced a UML-specific annotation.
Move the Diagram Infrastructure CSS Palette bundle into the UML layer because it
serves to provide extensions on the Palette Service, which is an overtly
UML-specific capability.
All client APIs for the Properties View are moved from
org.eclipse.papyrus.views.properties bundle to a new
org.eclipse.papyrus.infra.properties.ui bundle. This
includes renaming of:
* extension points
* label-provider contexts
* XWT namespaces
Add an "all UI tests" suite.
Define a componentized hierarchical build layout of the main plug-ins
Change-Id: I43f8f3644857a18b69715f5a2f1da9b1cf286d67
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation')
5 files changed, 115 insertions, 114 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/META-INF/MANIFEST.MF index 5f10ca41dab..166f3116933 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/META-INF/MANIFEST.MF +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/META-INF/MANIFEST.MF @@ -5,7 +5,6 @@ Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.2.0", org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0", org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.2.0", org.eclipse.core.expressions;bundle-version="3.4.300", - org.eclipse.papyrus.views.modelexplorer;bundle-version="1.2.0", org.eclipse.ui.navigator;bundle-version="3.5.100", org.eclipse.core.runtime;bundle-version="3.7.0", org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/icons/separator.gif b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/icons/separator.gif Binary files differnew file mode 100644 index 00000000000..cb415064e02 --- /dev/null +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/icons/separator.gif diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/pom.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/pom.xml index 057bba664b7..5e5c8ce62f2 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/pom.xml +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/pom.xml @@ -2,13 +2,11 @@ <project> <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>org.eclipse.papyrus.releng</artifactId> - <groupId>org.eclipse.papyrus</groupId> - <version>1.2.0-SNAPSHOT</version> - <relativePath>../../../../releng/main</relativePath> + <groupId>org.eclipse.papyrus</groupId> + <artifactId>org.eclipse.papyrus.infra-gmfdiag</artifactId> + <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.papyrus.infra.gmfdiag.navigation</artifactId> - <groupId>org.eclipse.papyrus</groupId> <version>1.2.0-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> -</project>
\ No newline at end of file +</project> diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Activator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Activator.java index 9deda8aed1e..0bb77bd9de9 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Activator.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/Activator.java @@ -1,104 +1,107 @@ -/*****************************************************************************
- * 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.infra.gmfdiag.navigation;
-
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.papyrus.infra.gmfdiag.navigation.preference.NavigationPreferenceInitializer;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.gmfdiag.navigation"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- public static LogHelper log;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- log = new LogHelper(this);
- NavigationPreferenceInitializer preferenceInitializer = new NavigationPreferenceInitializer();
- preferenceInitializer.initializeDefaultPreferences();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns the active workbench shell
- *
- * @return the active workbench shell
- */
- public static Shell getActiveWorkbenchShell() {
- IWorkbenchWindow workBenchWindow = getActiveWorkbenchWindow();
- if (workBenchWindow == null) {
- return null;
- }
- return workBenchWindow.getShell();
- }
-
- /**
- * Returns the active workbench window
- *
- * @return the active workbench window
- */
- public static IWorkbenchWindow getActiveWorkbenchWindow() {
- if (getDefault() == null) {
- return null;
- }
- IWorkbench workBench = getDefault().getWorkbench();
- if (workBench == null) {
- return null;
- }
- return workBench.getActiveWorkbenchWindow();
- }
-
-}
+/***************************************************************************** + * Copyright (c) 2010, 2016 CEA LIST, Christian W. Damus, and others. + * + * 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 + * Christian W. Damus - bug 485220 + * + */ +package org.eclipse.papyrus.infra.gmfdiag.navigation; + +import org.eclipse.jface.resource.ImageRegistry; +import org.eclipse.papyrus.infra.core.log.LogHelper; +import org.eclipse.papyrus.infra.gmfdiag.navigation.preference.NavigationPreferenceInitializer; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.gmfdiag.navigation"; //$NON-NLS-1$ + + public static final String IMG_SEPARATOR = "separator"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + public static LogHelper log; + + /** + * The constructor + */ + public Activator() { + } + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + log = new LogHelper(this); + NavigationPreferenceInitializer preferenceInitializer = new NavigationPreferenceInitializer(); + preferenceInitializer.initializeDefaultPreferences(); + } + + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns the active workbench shell + * + * @return the active workbench shell + */ + public static Shell getActiveWorkbenchShell() { + IWorkbenchWindow workBenchWindow = getActiveWorkbenchWindow(); + if (workBenchWindow == null) { + return null; + } + return workBenchWindow.getShell(); + } + + /** + * Returns the active workbench window + * + * @return the active workbench window + */ + public static IWorkbenchWindow getActiveWorkbenchWindow() { + if (getDefault() == null) { + return null; + } + IWorkbench workBench = getDefault().getWorkbench(); + if (workBench == null) { + return null; + } + return workBench.getActiveWorkbenchWindow(); + } + + @Override + protected void initializeImageRegistry(ImageRegistry reg) { + super.initializeImageRegistry(reg); + + reg.put(IMG_SEPARATOR, imageDescriptorFromPlugin(PLUGIN_ID, "icons/separator.gif")); //$NON-NLS-1$ + } + + public Image getIcon(String key) { + return getImageRegistry().get(key); + } +} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/menu/button/MoreButton.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/menu/button/MoreButton.java index 2f82c7448c9..4d10a035c9b 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/menu/button/MoreButton.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/menu/button/MoreButton.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2015 CEA LIST and others. + * Copyright (c) 2015, 2016 CEA LIST, Christian W. Damus, and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -8,16 +8,17 @@ * * Contributors: * CEA LIST - Initial API and implementation + * Christian W. Damus - bug 485220 * *****************************************************************************/ package org.eclipse.papyrus.infra.gmfdiag.navigation.menu.button; +import org.eclipse.papyrus.infra.gmfdiag.navigation.Activator; import org.eclipse.papyrus.infra.services.navigation.service.NavigationMenuButton; -import org.eclipse.ui.plugin.AbstractUIPlugin; public class MoreButton extends NavigationMenuButton { public MoreButton() { - super("More...", AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.papyrus.uml.diagram.common", "/icons/separator.gif").createImage(), "More..."); + super("More...", Activator.getDefault().getIcon(Activator.IMG_SEPARATOR), "More..."); } } // end MoreButton
\ No newline at end of file |