Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCéline Janssens2015-04-03 15:48:34 +0000
committerCéline Janssens2015-05-06 16:02:12 +0000
commitd967634da6d51b18504fe6571bf590ae4da2026c (patch)
tree6198bf5c651776560ba9473bb7d1c5347420fca2 /plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock
parent6cf730c33da825452060cbc50a4cddeb35905c2e (diff)
downloadorg.eclipse.papyrus-d967634da6d51b18504fe6571bf590ae4da2026c.tar.gz
org.eclipse.papyrus-d967634da6d51b18504fe6571bf590ae4da2026c.tar.xz
org.eclipse.papyrus-d967634da6d51b18504fe6571bf590ae4da2026c.zip
Bug 463903: [Stereotype Display] Objective 7: Plan a model
transformation for a compatibility with old models using EAnnotation. https://bugs.eclipse.org/bugs/show_bug.cgi?id=463903 Creation of Command for Migration of Stereotype Label - Allow "AllDiagrams" in the DiagramType field - Properties Migration - Create new Helper for CommandExecution - Enrich the CommandUtil class with additional method to execute Commands - Make the Applied Stereotype Helper as Deprecated - Remove the EAnnotation Update when applying or unappling Stereotype - Rename StereotypeDisplayUtils into StereotypeDisplayConstant - Rename StereotypeDisplayHelper into StereotypeDisplayUtil - Create StereotypeUserActionHelper - Create StereotypeDisplayMigrationConstant - Create Edit Policies for Migration - Create Migration Edit Policies Provider - Create Command to migrate Comment - Disable the Delete Command on the Stereotype Comment Edit Part - CSS match on StereotypeComment instead of [type = StereotypeComment] - CSS match on Label[kind=StereotypeLabel] - Avoid "This element is Imported" decoration for invisible Stereotype View. - Sychronise the Depth of the compartment Name with the Label Depth. The Commands of AppliedStereotypeHelper have been dupplicated into oep.uml.diagram.common.stereotype.diplay by changing the way those Commands manipulate the Stereotype Display Object using the new Structure. Change-Id: I72eb4b7610774b05502b2908ee9071628c3087cb Signed-off-by: Céline Janssens <Celine.Janssens@all4tec.net>
Diffstat (limited to 'plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock')
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ParserProvider.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ParserProvider.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ParserProvider.java
index 3e1843019d3..170f851b47b 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ParserProvider.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/provider/ParserProvider.java
@@ -30,6 +30,7 @@ import org.eclipse.papyrus.uml.diagram.common.parser.ConnectorLabelParser;
import org.eclipse.papyrus.uml.diagram.common.parser.MultiplicityElementLabelParser;
import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser;
import org.eclipse.papyrus.uml.diagram.common.parser.PropertyLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser;
import org.eclipse.papyrus.uml.diagram.common.utils.UMLGraphicalTypes;
/**
@@ -46,6 +47,8 @@ public class ParserProvider extends AbstractProvider implements IParserProvider
graphicalHintToParser.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_PORT_LABEL_ID, new PropertyLabelParser());
graphicalHintToParser.put(SysMLGraphicalTypes.AFFIXEDLABEL_SYSML_FLOWPORT_LABEL_ID, new FlowPortLabelParser());
+ graphicalHintToParser.put(UMLGraphicalTypes.AFFIXEDLABEL_UML_APPLIEDSTEREOTYPE_ID, new AppliedStereotypeParser());
+
graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_NAMEDELEMENT_NAME_ID, new NamedElementLabelParser());
graphicalHintToParser.put(UMLGraphicalTypes.LINKLABEL_UML_CONNECTOR_LABEL_ID, new ConnectorLabelParser());
@@ -73,7 +76,7 @@ public class ParserProvider extends AbstractProvider implements IParserProvider
* {@inheritDoc}
*/
public IParser getParser(IAdaptable hint) {
- String parserHint = (String) hint.getAdapter(String.class);
+ String parserHint = hint.getAdapter(String.class);
if (parserHint != null) {
IParser parser = graphicalHintToParser.get(parserHint);
if (parser != null) {
@@ -81,7 +84,7 @@ public class ParserProvider extends AbstractProvider implements IParserProvider
}
}
- View view = (View) hint.getAdapter(View.class);
+ View view = hint.getAdapter(View.class);
if (view != null) {
IParser parser = graphicalHintToParser.get(view.getType());
if (parser != null) {
@@ -93,7 +96,7 @@ public class ParserProvider extends AbstractProvider implements IParserProvider
}
private String getDiagramType(IAdaptable hint) {
- Diagram diagram = (Diagram) hint.getAdapter(Diagram.class);
+ Diagram diagram = hint.getAdapter(Diagram.class);
if (diagram != null) {
return diagram.getType();
}

Back to the top