Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2013-01-30 14:57:40 +0000
committerptessier2013-01-30 14:57:40 +0000
commit61aefec1258809e041f18ca6d4ee4f3afd1ed359 (patch)
tree046cecd755b7306f34701fbda8d503e29e8dda95 /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz
parent07f80fec12ab4463d3899fa3690b7660cf9dcf12 (diff)
downloadorg.eclipse.papyrus-61aefec1258809e041f18ca6d4ee4f3afd1ed359.tar.gz
org.eclipse.papyrus-61aefec1258809e041f18ca6d4ee4f3afd1ed359.tar.xz
org.eclipse.papyrus-61aefec1258809e041f18ca6d4ee4f3afd1ed359.zip
269492: [All Diagrams] Display properties of a applied stereotypes as a " comment"
https://bugs.eclipse.org/bugs/show_bug.cgi?id=269492
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/StereotypePropertiesEditPartProvider.java91
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml29
2 files changed, 1 insertions, 119 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/StereotypePropertiesEditPartProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/StereotypePropertiesEditPartProvider.java
deleted file mode 100644
index b2151159223..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/StereotypePropertiesEditPartProvider.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.providers;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.providers.RestrictedAbstractEditPartProvider;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editparts.AppliedStereotypeConpartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editparts.AppliedStereotypeMultilinePropertyEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editparts.AppliedStereotypePropertyEditPart;
-
-
-public class StereotypePropertiesEditPartProvider extends RestrictedAbstractEditPartProvider {
-
- /** Map containing node view types supported by this provider */
- protected Map<String, Class<?>> nodeMap = new HashMap<String, Class<?>>();
-
- /** Map containing edge view types supported by this provider */
- protected Map<String, Class<?>> edgeMap = new HashMap<String, Class<?>>();
-
- /** Default constructor */
- public StereotypePropertiesEditPartProvider() {
- super();
-
- diagramType = ModelEditPart.MODEL_ID;
-
-
- nodeMap.put(AppliedStereotypeConpartmentEditPart.ID, AppliedStereotypeConpartmentEditPart.class);
- nodeMap.put(AppliedStereotypePropertyEditPart.ID, AppliedStereotypeMultilinePropertyEditPart.class);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean provides(IOperation operation) {
- if(operation instanceof CreateGraphicEditPartOperation) {
- View newView = ((IEditPartOperation)operation).getView();
- if(newView == null) {
- return false;
- }
-
- String graphicalType = newView.getType();
-
- if((newView instanceof Node) && (!nodeMap.containsKey(graphicalType))) {
- return false;
- }
-
- if((newView instanceof Edge) && (!edgeMap.containsKey(graphicalType))) {
- return false;
- }
- }
-
- return super.provides(operation);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Class<?> getNodeEditPartClass(View view) {
- return nodeMap.get(view.getType());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Class<?> getEdgeEditPartClass(View view) {
- return edgeMap.get(view.getType());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml
index 5417588a0d9..decfeb67f88 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml
@@ -2812,15 +2812,7 @@
</binding>
</extension>
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="org.eclipse.papyrus.uml.diagram.clazz.custom.providers.CustomEditPolicyProvider">
- <Priority
- name="Lowest">
- </Priority>
- </editpolicyProvider>
-</extension>
+
<extension
point="org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders">
<contributionItemProvider
@@ -2843,23 +2835,4 @@
</contributionItemProvider>
</extension>
-<!-- Custom extension point editpart provider for editing properties of stereotype-->
-
-
- <extension
- id="stereotype-ep-provider"
- point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
- <editpartProvider
- class="org.eclipse.papyrus.uml.diagram.clazz.custom.providers.StereotypePropertiesEditPartProvider">
- <Priority name="Medium"/>
-
- <object
- class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)"
- id="org.eclipse.papyrus.uml.diagram.clazz.editpart.AppliedStereotypeContainer">
- <method name="getType()" value="AppliedStereotypeContainer,AppliedStereotypeProperty"/>
- </object>
- </editpartProvider>
- </extension>
-
-
</plugin>

Back to the top