Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/InheritedDecorator.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/InheritedDecorator.java34
1 files changed, 21 insertions, 13 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/InheritedDecorator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/InheritedDecorator.java
index abf19823ad5..5867a824ab3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/InheritedDecorator.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/InheritedDecorator.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2009-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
@@ -16,6 +16,7 @@ package org.eclipse.papyrus.uml.diagram.common.service;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.ImageFigure;
import org.eclipse.draw2d.Locator;
+import org.eclipse.draw2d.PositionConstants;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
@@ -51,7 +52,7 @@ import org.eclipse.uml2.uml.Type;
import org.eclipse.uml2.uml.UMLPackage;
/**
- *
+ *
* The decorator to represent inherited element This decorator adds a small
* image ( the generalization icon) next to the UML Element which are inherited.
* 3 positions are defined for the decoration :
@@ -61,7 +62,10 @@ import org.eclipse.uml2.uml.UMLPackage;
* <li>else if the element is in a compartment list : {@link PositionConstants#EAST} and margin =-1</li>
* <li>else {@link PositionConstants#SOUTH_EAST} and margin = -1</li>
* </ul>
+ *
+ * @deprecated Replaced with the generic {@link org.eclipse.papyrus.infra.gmfdiag.common.decoration.ExternalReferenceMarker}
*/
+@Deprecated
public class InheritedDecorator implements IDecorator {
/** the object to be decorated */
@@ -82,7 +86,7 @@ public class InheritedDecorator implements IDecorator {
/**
* Creates a new <code>AbstractDecorator</code> for the decorator target
* passed in.
- *
+ *
* @param decoratorTarget
* the object to be decorated
*/
@@ -92,7 +96,7 @@ public class InheritedDecorator implements IDecorator {
/**
* Gets the object to be decorated.
- *
+ *
* @return Returns the object to be decorated
*/
protected IDecoratorTarget getDecoratorTarget() {
@@ -128,7 +132,7 @@ public class InheritedDecorator implements IDecorator {
* getDecoratorTargetClassifier Utility method to determine if the
* decoratorTarget is a supported type for this decorator and return the
* associated Classifier element.
- *
+ *
* @param decoratorTarget
* IDecoratorTarget to check and return valid Classifier target.
* @return node Node if IDecoratorTarget can be supported, null otherwise.
@@ -152,6 +156,7 @@ public class InheritedDecorator implements IDecorator {
* satisfied by the view passed in.
*/
+ @Override
public void refresh() {
removeDecoration();
@@ -200,7 +205,7 @@ public class InheritedDecorator implements IDecorator {
/**
* Returns a figure corresponding to this image
- *
+ *
* @param image
* a image
* @return a figure corresponding to this image
@@ -215,7 +220,7 @@ public class InheritedDecorator implements IDecorator {
/**
* Returns the direction to set the decorator for the node
- *
+ *
* @param node
* the node
* @return the direction to set the decorator for the node direction can be
@@ -259,7 +264,7 @@ public class InheritedDecorator implements IDecorator {
/**
* Tests if the compartment is a compartment list
- *
+ *
* @param node
* the node on which we want add an Overlay
* @return <code>true</code> if the compartment is managed by an {@link XYLayoutEditPolicy}
@@ -283,7 +288,7 @@ public class InheritedDecorator implements IDecorator {
/**
* Tests if the node is an inherited element
- *
+ *
* @param node
* a node
* @return <code>true</code> if the node is an inherited element <code>false</code> if not
@@ -320,7 +325,7 @@ public class InheritedDecorator implements IDecorator {
/**
* getDescriptionStyle Accessor to retrieve the description style from a
* Node.
- *
+ *
* @param node
* Node to retrieve the description style from.
* @return DescriptionStyle style object
@@ -335,11 +340,12 @@ public class InheritedDecorator implements IDecorator {
private NotificationListener notificationListener = new NotificationListener() {
/**
- *
+ *
* @see org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener#notifyChanged(org.eclipse.emf.common.notify.Notification)
- *
+ *
* @param notification
*/
+ @Override
public void notifyChanged(Notification notification) {
if(notification.getEventType() == Notification.REMOVE) {
@@ -367,6 +373,7 @@ public class InheritedDecorator implements IDecorator {
* <li>graphical parent, when its a {@link Property} (we add the listener on its Type)</li>
* </ul>
*/
+ @Override
public void activate() {
IGraphicalEditPart gep = (IGraphicalEditPart)getDecoratorTarget().getAdapter(IGraphicalEditPart.class);
@@ -420,7 +427,7 @@ public class InheritedDecorator implements IDecorator {
/**
* Tests if the element can be inherited
- *
+ *
* @param semanticElement
* the element to test
* @return <code>true</code> if the element can be inherited
@@ -443,6 +450,7 @@ public class InheritedDecorator implements IDecorator {
/**
* Removes the listeners and the decorations
*/
+ @Override
public void deactivate() {
removeDecoration();

Back to the top