Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2014-07-23 06:04:27 -0400
committerMickael ADAM2014-08-27 09:22:00 -0400
commit9b896217b5c8540e4f4cfc26df2338e9ea0bf474 (patch)
treebb727a2a80d1cffc2ba40094599c0d395317fca5 /plugins/developer/org.eclipse.papyrus.gmfgenextension
parent73b2d59da56b02727f5ce312d4b15c6f43e75bca (diff)
downloadorg.eclipse.papyrus-9b896217b5c8540e4f4cfc26df2338e9ea0bf474.tar.gz
org.eclipse.papyrus-9b896217b5c8540e4f4cfc26df2338e9ea0bf474.tar.xz
org.eclipse.papyrus-9b896217b5c8540e4f4cfc26df2338e9ea0bf474.zip
440201: [Diagram] Class diagram shapes shall be refactored
https://bugs.eclipse.org/bugs/show_bug.cgi?id=440201 Patch set 1: -Use RoundedCompartmentEP to TopNode Edit Part: -AssociationClass -Class -Component -DataType -DurationObservation -TimeObservation -Enumeration -Information -InstanceSpecification -Interface -Signal -Add class which implement IControlParserForDirectEdit after code generation Patch Set 2: -Change the VisualID of Time/DurationObservation to the VisualID of previous external label. this to be compatible with existing model. Patch Set 3: -Add layout Edit Policy for feedback -Used of roundedCompartment for childNode: • ClassEditPartCN • ComponentEditPartCN • DataTypeEditPartCN • EnumerationEditPartCN • InformationItemEditPartCN • InstanceSpecificationEditPartCN • InterfaceEditPartCN • PrimitiveTypeEditPartCN • SignalEditPartCN -Change Name of FloatingNameEP to FloatingLabelEP -Add ClassFigure to manage active status -some Fix Patch Set 4: -remove wrong edit Policy to enumEP -override svg shape display to maintain ratio -add CSS attribute to indicate the maximum number of symbol to display -change timeObs icon to a svg file -use of RoundedCompartment Edit Part for timeObs -move of FigureUtils from timing to common -Change BorderDisplayEditPolicy to setBorder to null of the first Compartment of an editPart. Patch Set 5: -fixbug on BorderDisplayEditPolicy to setBorder to null of the first Compartment of an editPart and OneLineBorder for the others. -Used of roundedCompartment for DurationObservationEP -Delete old classe used by Duration/TimeObservation -Fix symbol Compartment height Patch Set 6: -Some encoding issue Change-Id: Iccc9dfa156669c2fc30488143faaf77898fc00b0 Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.gmfgenextension')
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingNameDisplayBehavior.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingNameDisplayBehavior.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingNameDisplayBehavior.java
index ad1d01688c4..fe32541565f 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingNameDisplayBehavior.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingNameDisplayBehavior.java
@@ -39,9 +39,9 @@ public class AddExternalNodeFloatingNameDisplayBehavior extends Action {
public static final String FIGURE_VIEWMAP_PATH = "org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"; //$NON-NLS-1$
- public static final String STEREOTYPE_LABEL_POLICY_KEY = "org.eclipse.papyrus.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"; //$NON-NLS-1$
+ public static final String LABEL_POLICY_CLASS = "org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"; //$NON-NLS-1$
- public static final String STEREOTYPE_LABEL_POLICY_CLASS = "org.eclipse.papyrus.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"; //$NON-NLS-1$
+ public static final String LABEL_POLICY_KEY = "org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"; //$NON-NLS-1$
public static final String DEFAULT_GETTER_NAME = "getFloatingNameLabel"; //$NON-NLS-1$
@@ -142,6 +142,9 @@ public class AddExternalNodeFloatingNameDisplayBehavior extends Action {
label.setViewmap(viewmap);
label.setModelFacet(facet);
+ //Add custom Policy to have feedback
+ addCustomBehavior(label, LABEL_POLICY_KEY, LABEL_POLICY_CLASS);
+
eObject.getLabels().add(label);
}

Back to the top