Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Le Fevre2017-06-16 08:27:03 +0000
committerPatrick Tessier2017-08-03 15:50:39 +0000
commit93b2632ddbff13e6c0c2386a1619e50a8043dfec (patch)
treee82a2b4f1e9edac4620193bd135412aaca6d3cae /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus
parentff6e28da205a32354f78e0b927417ccba8010ca0 (diff)
downloadorg.eclipse.papyrus-93b2632ddbff13e6c0c2386a1619e50a8043dfec.tar.gz
org.eclipse.papyrus-93b2632ddbff13e6c0c2386a1619e50a8043dfec.tar.xz
org.eclipse.papyrus-93b2632ddbff13e6c0c2386a1619e50a8043dfec.zip
Bug 480423: [Class Diagram] Relationship keyword labels missing the
guillemets Actions -add reference to the norm -open the API -add a new parser dedicated to manage the keyword Tests -starting a remote eclipse and check the package relationship with use keyword -apply an ecore stereotype on the use relationship and check also the result Change-Id: Id106a7862dd980ec3f33f52ba008d1dd358222f6 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=480423 Signed-off-by: Francois Le Fevre <francois.le-fevre@cea.fr>
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java22
1 files changed, 14 insertions, 8 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java
index 2a8dd12324d..d6d97f5152d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/providers/CustomUMLParserProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
+ * Copyright (c) 2008, 2017 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
@@ -48,15 +48,17 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PropertyforDataTypeEditP
import org.eclipse.papyrus.uml.diagram.clazz.parsers.MessageFormatParser;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.keyword.KeywordLabel;
import org.eclipse.papyrus.uml.diagram.common.parser.custom.AssociationEndParser;
import org.eclipse.papyrus.uml.diagram.common.parser.custom.AssociationMultiplicityParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedKeywordParser;
import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser;
import org.eclipse.uml2.uml.UMLPackage;
/**
* this class is used to overload specific parsers
*
- * @author patrick Tessier
+ * @author Patrick Tessier
*/
public class CustomUMLParserProvider extends UMLParserProvider {
@@ -75,6 +77,10 @@ public class CustomUMLParserProvider extends UMLParserProvider {
protected IParser getAppliedStereotypeParser(String defaultPrintString) {
return new AppliedStereotypeParser(defaultPrintString);
}
+
+ protected IParser getAppliedKeywordParser(String defaultPrintString) {
+ return new AppliedKeywordParser(defaultPrintString);
+ }
protected IParser getAssociationBranchRole() {
EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name(), };
@@ -173,25 +179,25 @@ public class CustomUMLParserProvider extends UMLParserProvider {
case AppliedStereotypeInterfaceRealizationEditPart.VISUAL_ID:
return getAppliedStereotypeParser();
case AppliedStereotypeSubstitutionEditPart.VISUAL_ID:
- return getAppliedStereotypeParser();
+ return getAppliedKeywordParser(KeywordLabel.SUBSTITUTE);
case AppliedStereotypeRealizationEditPart.VISUAL_ID:
return getAppliedStereotypeParser();
case AppliedStereotypeAbstractionEditPart.VISUAL_ID:
- return getAppliedStereotypeParser("abstraction"); //$NON-NLS-1$
+ return getAppliedKeywordParser(KeywordLabel.ABSTRACTION);
case AppliedStereotypeUsageEditPart.VISUAL_ID:
- return getAppliedStereotypeParser("use"); //$NON-NLS-1$
+ return getAppliedKeywordParser(KeywordLabel.USE);
case AppliedStereotypeDependencyEditPart.VISUAL_ID:
return getAppliedStereotypeParser();
case AppliedStereotypeElementImportEditPart.VISUAL_ID:
- return getAppliedStereotypeParser("Import"); //$NON-NLS-1$
+ return getAppliedKeywordParser(KeywordLabel.IMPORT);
case AppliedStereotypePackageImportEditPart.VISUAL_ID:
return getAppliedStereotypeParser();
case InformationFlowAppliedStereotypeEditPart.VISUAL_ID:
- return getAppliedStereotypeParser("flow"); //$NON-NLS-1$
+ return getAppliedKeywordParser(KeywordLabel.FLOW);
case ContextLinkAppliedStereotypeEditPart.VISUAL_ID:
return getAppliedStereotypeParser(CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy.APPLIED_STEREOTYPE_LABEL);
case AppliedStereotypePackageMergeEditPart.VISUAL_ID:
- return getAppliedStereotypeParser("merge"); //$NON-NLS-1$
+ return getAppliedKeywordParser(KeywordLabel.MERGE);
}
return super.getParser(visualID);
}

Back to the top