Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratischenko2014-11-28 11:02:58 +0000
committerRemi Schnekenburger2014-12-08 09:21:49 +0000
commitf07b7c724fbdbd793f3ed9e345d9e9782ac2f221 (patch)
tree8451f9bd2032e35c74f4cf57578de7d66b1449f2 /plugins/uml
parent1586bcdc163b7513d39f0a55d9b9bf011b4a170e (diff)
downloadorg.eclipse.papyrus-f07b7c724fbdbd793f3ed9e345d9e9782ac2f221.tar.gz
org.eclipse.papyrus-f07b7c724fbdbd793f3ed9e345d9e9782ac2f221.tar.xz
org.eclipse.papyrus-f07b7c724fbdbd793f3ed9e345d9e9782ac2f221.zip
Bug 452217 - [All Diagrams] "display as a subject" should not be present
on all diagrams. Signed-off-by: atischenko <montages.t7@gmail.com> Change-Id: I82f7b400ee04b7a6679aa735961028263de0b5be (cherry picked from commit bd023004ced1b7f6315107bee68df904a69faa1a)
Diffstat (limited to 'plugins/uml')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/handler/SubjectHandler.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/handler/SubjectHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/handler/SubjectHandler.java
index 71e46a6babf..06a392316a0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/handler/SubjectHandler.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/handler/SubjectHandler.java
@@ -15,8 +15,10 @@ package org.eclipse.papyrus.uml.diagram.usecase.handler;
import org.eclipse.core.commands.IHandler;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.usecase.command.ChangetoDefaultShapeCommand;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.SubjectClassifierEditPartTN;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseDiagramEditPart;
import org.eclipse.uml2.uml.Actor;
import org.eclipse.uml2.uml.UseCase;
@@ -35,6 +37,13 @@ public class SubjectHandler extends ChangeShapeHandler implements IHandler {
return false;
}
+
+ Diagram diagram = editPart.getNotationView().getDiagram();
+ String diagramType = diagram.getType();
+ if (false == UseCaseDiagramEditPart.MODEL_ID.equals(diagramType)) {
+ return false;
+ }
+
if ((editPart.resolveSemanticElement() instanceof org.eclipse.uml2.uml.Classifier && (!(editPart.resolveSemanticElement() instanceof Actor)) && (!(editPart.resolveSemanticElement() instanceof UseCase)))) {
if ((editPart instanceof SubjectClassifierEditPartTN)) {
return false;

Back to the top