Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-02-03 15:17:50 +0000
committerCamille Letavernier2014-02-03 15:19:12 +0000
commitc1202c44c6c0396f2a1c09646893e1cc87b049df (patch)
treed8dc6b6258bc6826b7da76271fb5642b96fe4d0e
parentc814b500c7064b593d028e2589c3889b0e1bdfc0 (diff)
downloadorg.eclipse.papyrus-c1202c44c6c0396f2a1c09646893e1cc87b049df.tar.gz
org.eclipse.papyrus-c1202c44c6c0396f2a1c09646893e1cc87b049df.tar.xz
org.eclipse.papyrus-c1202c44c6c0396f2a1c09646893e1cc87b049df.zip
417396: [CSS] The CSS Engine shall support label visibility & mask
https://bugs.eclipse.org/bugs/show_bug.cgi?id=417396 - Fix minor issues - Fix a typo in the ICustomAppearance interface name
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/CustomPropertyLabelEditPolicy.java4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ConstraintPropertyPreferencePage.java12
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/preferences/ILabelPreferenceConstants.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationNameLabelEditPolicy.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationBranchEndMultiplicityEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndSourceMultiplicityEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndTargetMultiplicityEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/OperationLabelEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/PortLabelEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/PropertyLabelEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/OperationLabelHelper.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/PortLabelHelper.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/PropertyLabelHelper.java16
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationUseLabelEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/ParameterLabelEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/helper/CollaborationUseLabelHelper.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/helper/ParameterLabelHelper.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageLabelHelper.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/MessageCustomParser.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperationUtil.java42
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SignalUtil.java24
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CollaborationUseUtil.java6
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ICustomAppearance.java (renamed from plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ICustomAppearence.java)17
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/InstanceSpecificationUtil.java19
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/OperationUtil.java32
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ParameterUtil.java16
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PortUtil.java18
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PropertyUtil.java16
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/SignalUtil.java4
30 files changed, 195 insertions, 183 deletions
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/CustomPropertyLabelEditPolicy.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/CustomPropertyLabelEditPolicy.java
index 185007f4e2d..2e3f8cf6f17 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/CustomPropertyLabelEditPolicy.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/CustomPropertyLabelEditPolicy.java
@@ -17,13 +17,13 @@ import java.util.Arrays;
import java.util.Collection;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
public class CustomPropertyLabelEditPolicy extends PropertyLabelEditPolicy {
- public final static Collection<String> DEFAULT_ROBOTML_PROPERTY = Arrays.asList(ICustomAppearence.DISP_NAME, ICustomAppearence.DISP_TYPE);
+ public final static Collection<String> DEFAULT_ROBOTML_PROPERTY = Arrays.asList(ICustomAppearance.DISP_NAME, ICustomAppearance.DISP_TYPE);
@Override
public Collection<String> getDefaultDisplayValue() {
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ConstraintPropertyPreferencePage.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ConstraintPropertyPreferencePage.java
index fb3909935ed..78664c735e9 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ConstraintPropertyPreferencePage.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/preferences/ConstraintPropertyPreferencePage.java
@@ -15,12 +15,12 @@ package org.eclipse.papyrus.sysml.diagram.blockdefinition.preferences;
import static org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants.DISP_DEFAULT_MULTIPLICITY;
import static org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants.DISP_UNDEFINED_TYPE;
-import static org.eclipse.papyrus.uml.tools.utils.ICustomAppearence.DISP_DERIVE;
-import static org.eclipse.papyrus.uml.tools.utils.ICustomAppearence.DISP_MODIFIERS;
-import static org.eclipse.papyrus.uml.tools.utils.ICustomAppearence.DISP_MULTIPLICITY;
-import static org.eclipse.papyrus.uml.tools.utils.ICustomAppearence.DISP_NAME;
-import static org.eclipse.papyrus.uml.tools.utils.ICustomAppearence.DISP_TYPE;
-import static org.eclipse.papyrus.uml.tools.utils.ICustomAppearence.DISP_VISIBILITY;
+import static org.eclipse.papyrus.uml.tools.utils.ICustomAppearance.DISP_DERIVE;
+import static org.eclipse.papyrus.uml.tools.utils.ICustomAppearance.DISP_MODIFIERS;
+import static org.eclipse.papyrus.uml.tools.utils.ICustomAppearance.DISP_MULTIPLICITY;
+import static org.eclipse.papyrus.uml.tools.utils.ICustomAppearance.DISP_NAME;
+import static org.eclipse.papyrus.uml.tools.utils.ICustomAppearance.DISP_TYPE;
+import static org.eclipse.papyrus.uml.tools.utils.ICustomAppearance.DISP_VISIBILITY;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/preferences/ILabelPreferenceConstants.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/preferences/ILabelPreferenceConstants.java
index 50571ee812f..051fb3a681c 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/preferences/ILabelPreferenceConstants.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/preferences/ILabelPreferenceConstants.java
@@ -13,12 +13,12 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.preferences;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
/**
* Label constants for label mask preferences.
*/
-public interface ILabelPreferenceConstants extends ICustomAppearence {
+public interface ILabelPreferenceConstants extends ICustomAppearance {
/** preference id for display labels */
public String LABEL_DISPLAY_PREFERENCE = "label.display"; //$NON-NLS-1$
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationNameLabelEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationNameLabelEditPolicy.java
index 1b5bce4fdd0..b0577a8d5f9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationNameLabelEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationNameLabelEditPolicy.java
@@ -24,7 +24,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractMaskManagedEditPolicy;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.InstanceSpecificationUtil;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.InstanceSpecification;
@@ -39,8 +39,8 @@ public class InstanceSpecificationNameLabelEditPolicy extends AbstractMaskManage
public InstanceSpecificationNameLabelEditPolicy() {
super();
- masks.put(ICustomAppearence.DISP_NAME, "Name");
- masks.put(ICustomAppearence.DISP_TYPE, "Type");
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ICustomAppearance.DISP_TYPE, "Type");
}
@Override
@@ -65,16 +65,6 @@ public class InstanceSpecificationNameLabelEditPolicy extends AbstractMaskManage
super.deactivate();
}
- /**
- * @see org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy#getMaskLabel(int)
- *
- * @param value
- * @return
- */
- public String getMaskLabel(int value) {
- return masks.get(value);
- }
-
@Override
public InstanceSpecification getUMLElement() {
EObject element = super.getUMLElement();
@@ -96,7 +86,7 @@ public class InstanceSpecificationNameLabelEditPolicy extends AbstractMaskManage
@Override
protected Collection<String> getDefaultDisplayValue() {
- return ICustomAppearence.DEFAULT_UML_INSTANCESPECIFICATION;
+ return ICustomAppearance.DEFAULT_UML_INSTANCESPECIFICATION;
}
@Override
@@ -108,7 +98,7 @@ public class InstanceSpecificationNameLabelEditPolicy extends AbstractMaskManage
// - the annotation corresponding to the display of the stereotype changes
// - the stereotype application list has changed
Object object = notification.getNotifier();
- InstanceSpecification instance = getUMLElement();
+
if(notification.getEventType() == Notification.ADD) {
if(notification.getFeature().equals(UMLPackage.eINSTANCE.getInstanceSpecification_Classifier())) {
getDiagramEventBroker().addNotificationListener((EObject)notification.getNewValue(), this);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationBranchEndMultiplicityEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationBranchEndMultiplicityEditPolicy.java
index ed8479743cd..8db0d876a58 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationBranchEndMultiplicityEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationBranchEndMultiplicityEditPolicy.java
@@ -16,7 +16,7 @@ package org.eclipse.papyrus.uml.diagram.common.editpolicies;
import java.util.Collection;
import java.util.Collections;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
/**
* this class enables to refresh the multiplicity label of the association end (target)
@@ -31,6 +31,6 @@ public class DisplayAssociationBranchEndMultiplicityEditPolicy extends DisplayAs
*/
@Override
protected Collection<String> getDefaultDisplayValue() {
- return Collections.singleton(ICustomAppearence.DISP_MULTIPLICITY);
+ return Collections.singleton(ICustomAppearance.DISP_MULTIPLICITY);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndEditPolicy.java
index 5570724241c..dc4481a2ae2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndEditPolicy.java
@@ -24,7 +24,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.papyrus.uml.diagram.common.helper.PropertyLabelHelper;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Type;
@@ -68,7 +68,7 @@ public class DisplayAssociationEndEditPolicy extends AbstractMaskManagedEditPoli
*/
@Override
protected Collection<String> getDefaultDisplayValue() {
- return Arrays.asList(ICustomAppearence.DISP_VISIBILITY, ICustomAppearence.DISP_DERIVE, ICustomAppearence.DISP_NAME);
+ return Arrays.asList(ICustomAppearance.DISP_VISIBILITY, ICustomAppearance.DISP_DERIVE, ICustomAppearance.DISP_NAME);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndSourceMultiplicityEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndSourceMultiplicityEditPolicy.java
index dda6d255a12..cc0c6ac55e4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndSourceMultiplicityEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndSourceMultiplicityEditPolicy.java
@@ -16,7 +16,7 @@ package org.eclipse.papyrus.uml.diagram.common.editpolicies;
import java.util.Collection;
import java.util.Collections;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
/**
* this class enables to refresh the multiplicity label of the association end (source)
@@ -31,6 +31,6 @@ public class DisplayAssociationEndSourceMultiplicityEditPolicy extends DisplayAs
*/
@Override
public Collection<String> getDefaultDisplayValue() {
- return Collections.singleton(ICustomAppearence.DISP_MULTIPLICITY);
+ return Collections.singleton(ICustomAppearance.DISP_MULTIPLICITY);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndTargetMultiplicityEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndTargetMultiplicityEditPolicy.java
index 1ac26a0bf8f..8efbe59d50c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndTargetMultiplicityEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/DisplayAssociationEndTargetMultiplicityEditPolicy.java
@@ -16,7 +16,7 @@ package org.eclipse.papyrus.uml.diagram.common.editpolicies;
import java.util.Collection;
import java.util.Collections;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
/**
* this class enables to refresh the multiplicity label of the association end (target)
@@ -31,6 +31,6 @@ public class DisplayAssociationEndTargetMultiplicityEditPolicy extends DisplayAs
*/
@Override
public Collection<String> getDefaultDisplayValue() {
- return Collections.singleton(ICustomAppearence.DISP_MULTIPLICITY);
+ return Collections.singleton(ICustomAppearance.DISP_MULTIPLICITY);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/OperationLabelEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/OperationLabelEditPolicy.java
index cb946675b7c..1b2bf07eb1d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/OperationLabelEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/OperationLabelEditPolicy.java
@@ -21,7 +21,7 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.papyrus.uml.diagram.common.helper.OperationLabelHelper;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Parameter;
import org.eclipse.uml2.uml.Type;
@@ -66,7 +66,7 @@ public class OperationLabelEditPolicy extends AbstractMaskManagedEditPolicy {
*/
@Override
public Collection<String> getDefaultDisplayValue() {
- return ICustomAppearence.DEFAULT_UML_OPERATION;
+ return ICustomAppearance.DEFAULT_UML_OPERATION;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/PortLabelEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/PortLabelEditPolicy.java
index f0f82beafe6..ebcda33d110 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/PortLabelEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/PortLabelEditPolicy.java
@@ -8,7 +8,7 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.papyrus.uml.diagram.common.helper.PortLabelHelper;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.UMLPackage;
@@ -20,7 +20,7 @@ public class PortLabelEditPolicy extends PropertyLabelEditPolicy {
*/
@Override
public Collection<String> getDefaultDisplayValue() {
- return ICustomAppearence.DEFAULT_UML_PORT;
+ return ICustomAppearance.DEFAULT_UML_PORT;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/PropertyLabelEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/PropertyLabelEditPolicy.java
index ef29d9fd758..3d16b696366 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/PropertyLabelEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/PropertyLabelEditPolicy.java
@@ -22,7 +22,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.papyrus.uml.diagram.common.Activator;
import org.eclipse.papyrus.uml.diagram.common.helper.PropertyLabelHelper;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Type;
import org.eclipse.uml2.uml.UMLPackage;
@@ -65,7 +65,7 @@ public class PropertyLabelEditPolicy extends AbstractMaskManagedEditPolicy {
*/
@Override
public Collection<String> getDefaultDisplayValue() {
- return ICustomAppearence.DEFAULT_UML_PROPERTY;
+ return ICustomAppearance.DEFAULT_UML_PROPERTY;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/OperationLabelHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/OperationLabelHelper.java
index 4e145937f41..da67378b3b1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/OperationLabelHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/OperationLabelHelper.java
@@ -20,7 +20,7 @@ import java.util.Map;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.OperationUtil;
import org.eclipse.uml2.uml.Operation;
@@ -54,16 +54,16 @@ public class OperationLabelHelper extends StereotypedElementLabelHelper {
*/
protected OperationLabelHelper() {
// initialize the map
- masks.put(ICustomAppearence.DISP_VISIBILITY, "Visibility");
- masks.put(ICustomAppearence.DISP_NAME, "Name");
- masks.put(ICustomAppearence.DISP_PARAMETER_NAME, "Parameters Name");
- masks.put(ICustomAppearence.DISP_PARAMETER_DIRECTION, "Parameters Direction");
- masks.put(ICustomAppearence.DISP_PARAMETER_TYPE, "Parameters Type");
- masks.put(ICustomAppearence.DISP_RT_TYPE, "Return Type");
- masks.put(ICustomAppearence.DISP_PARAMETER_MULTIPLICITY, "Parameters Multiplicity");
- masks.put(ICustomAppearence.DISP_PARAMETER_DEFAULT, "Parameters Default Value");
- masks.put(ICustomAppearence.DISP_PARAMETER_MODIFIERS, "Parameters Modifiers");
- masks.put(ICustomAppearence.DISP_MODIFIERS, "Modifiers");
+ masks.put(ICustomAppearance.DISP_VISIBILITY, "Visibility");
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ICustomAppearance.DISP_PARAMETER_NAME, "Parameters Name");
+ masks.put(ICustomAppearance.DISP_PARAMETER_DIRECTION, "Parameters Direction");
+ masks.put(ICustomAppearance.DISP_PARAMETER_TYPE, "Parameters Type");
+ masks.put(ICustomAppearance.DISP_RT_TYPE, "Return Type");
+ masks.put(ICustomAppearance.DISP_PARAMETER_MULTIPLICITY, "Parameters Multiplicity");
+ masks.put(ICustomAppearance.DISP_PARAMETER_DEFAULT, "Parameters Default Value");
+ masks.put(ICustomAppearance.DISP_PARAMETER_MODIFIERS, "Parameters Modifiers");
+ masks.put(ICustomAppearance.DISP_MODIFIERS, "Modifiers");
}
@@ -80,7 +80,7 @@ public class OperationLabelHelper extends StereotypedElementLabelHelper {
*/
@Override
protected String elementLabel(GraphicalEditPart editPart) {
- Collection<String> displayValue = ICustomAppearence.DEFAULT_UML_OPERATION;
+ Collection<String> displayValue = ICustomAppearance.DEFAULT_UML_OPERATION;
IMaskManagedLabelEditPolicy policy = (IMaskManagedLabelEditPolicy)editPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
if(policy != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/PortLabelHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/PortLabelHelper.java
index 6a00481b928..25e2d4d243c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/PortLabelHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/PortLabelHelper.java
@@ -17,7 +17,7 @@ import java.util.Collection;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.PortUtil;
import org.eclipse.uml2.uml.Port;
@@ -36,7 +36,7 @@ public class PortLabelHelper extends PropertyLabelHelper {
protected PortLabelHelper() {
super();
- masks.put(ICustomAppearence.DISP_CONJUGATED, "Conjugated");
+ masks.put(ICustomAppearance.DISP_CONJUGATED, "Conjugated");
}
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/PropertyLabelHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/PropertyLabelHelper.java
index 3122707b69e..65b7a5423d9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/PropertyLabelHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/PropertyLabelHelper.java
@@ -21,7 +21,7 @@ import java.util.Map;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
import org.eclipse.uml2.uml.Property;
@@ -45,13 +45,13 @@ public class PropertyLabelHelper extends StereotypedElementLabelHelper {
protected PropertyLabelHelper() {
// initialize the map
- masks.put(ICustomAppearence.DISP_VISIBILITY, "Visibility");
- masks.put(ICustomAppearence.DISP_DERIVE, "Is Derived");
- masks.put(ICustomAppearence.DISP_NAME, "Name");
- masks.put(ICustomAppearence.DISP_TYPE, "Type");
- masks.put(ICustomAppearence.DISP_MULTIPLICITY, "Multiplicity");
- masks.put(ICustomAppearence.DISP_DEFAULT_VALUE, "Default Value");
- masks.put(ICustomAppearence.DISP_MODIFIERS, "Modifiers");
+ masks.put(ICustomAppearance.DISP_VISIBILITY, "Visibility");
+ masks.put(ICustomAppearance.DISP_DERIVE, "Is Derived");
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ICustomAppearance.DISP_TYPE, "Type");
+ masks.put(ICustomAppearance.DISP_MULTIPLICITY, "Multiplicity");
+ masks.put(ICustomAppearance.DISP_DEFAULT_VALUE, "Default Value");
+ masks.put(ICustomAppearance.DISP_MODIFIERS, "Modifiers");
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationUseLabelEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationUseLabelEditPolicy.java
index 13271d6af7b..b3513969670 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationUseLabelEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationUseLabelEditPolicy.java
@@ -22,7 +22,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.helper.CollaborationUseLabelHelper;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.uml2.uml.Collaboration;
import org.eclipse.uml2.uml.CollaborationUse;
import org.eclipse.uml2.uml.UMLPackage;
@@ -63,7 +63,7 @@ public class CollaborationUseLabelEditPolicy extends AbstractMaskManagedEditPoli
*/
@Override
public Collection<String> getDefaultDisplayValue() {
- return ICustomAppearence.DEFAULT_UML_PROPERTY;
+ return ICustomAppearance.DEFAULT_UML_PROPERTY;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/ParameterLabelEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/ParameterLabelEditPolicy.java
index 3cf1552925c..b6e342c4eeb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/ParameterLabelEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/ParameterLabelEditPolicy.java
@@ -22,7 +22,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractMaskManagedEditPolicy;
import org.eclipse.papyrus.uml.diagram.composite.custom.helper.ParameterLabelHelper;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.uml2.uml.Parameter;
import org.eclipse.uml2.uml.Type;
import org.eclipse.uml2.uml.UMLPackage;
@@ -55,7 +55,7 @@ public class ParameterLabelEditPolicy extends AbstractMaskManagedEditPolicy {
*/
@Override
public Collection<String> getDefaultDisplayValue() {
- return ICustomAppearence.DEFAULT_UML_PARAMETER;
+ return ICustomAppearance.DEFAULT_UML_PARAMETER;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/helper/CollaborationUseLabelHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/helper/CollaborationUseLabelHelper.java
index 92568d2c71b..b6c3a12449e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/helper/CollaborationUseLabelHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/helper/CollaborationUseLabelHelper.java
@@ -22,7 +22,7 @@ import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.helper.StereotypedElementLabelHelper;
import org.eclipse.papyrus.uml.tools.utils.CollaborationUseUtil;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.uml2.uml.CollaborationUse;
/**
@@ -76,9 +76,9 @@ public class CollaborationUseLabelHelper extends StereotypedElementLabelHelper {
super();
// initialize the map
masks.clear();
- masks.put(ICustomAppearence.DISP_VISIBILITY, "Visibility");
- masks.put(ICustomAppearence.DISP_NAME, "Name");
- masks.put(ICustomAppearence.DISP_TYPE, "Type");
+ masks.put(ICustomAppearance.DISP_VISIBILITY, "Visibility");
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ICustomAppearance.DISP_TYPE, "Type");
}
/**
@@ -86,7 +86,7 @@ public class CollaborationUseLabelHelper extends StereotypedElementLabelHelper {
*/
@Override
protected String elementLabel(GraphicalEditPart editPart) {
- Collection<String> displayValue = ICustomAppearence.DEFAULT_UML_PROPERTY;
+ Collection<String> displayValue = ICustomAppearance.DEFAULT_UML_PROPERTY;
IMaskManagedLabelEditPolicy policy = (IMaskManagedLabelEditPolicy)editPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
if(policy != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/helper/ParameterLabelHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/helper/ParameterLabelHelper.java
index 44912dbb8d7..d23ffacaf31 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/helper/ParameterLabelHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/helper/ParameterLabelHelper.java
@@ -21,7 +21,7 @@ import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.helper.StereotypedElementLabelHelper;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.ParameterUtil;
import org.eclipse.uml2.uml.Parameter;
@@ -67,9 +67,9 @@ public class ParameterLabelHelper extends StereotypedElementLabelHelper {
super();
// initialize the map
masks.clear();
- masks.put(ICustomAppearence.DISP_DIRECTION, "Direction");
- masks.put(ICustomAppearence.DISP_NAME, "Name");
- masks.put(ICustomAppearence.DISP_TYPE, "Type");
+ masks.put(ICustomAppearance.DISP_DIRECTION, "Direction");
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ICustomAppearance.DISP_TYPE, "Type");
}
/**
@@ -77,7 +77,7 @@ public class ParameterLabelHelper extends StereotypedElementLabelHelper {
*/
@Override
protected String elementLabel(GraphicalEditPart editPart) {
- Collection<String> displayValue = ICustomAppearence.DEFAULT_UML_PARAMETER;
+ Collection<String> displayValue = ICustomAppearance.DEFAULT_UML_PARAMETER;
IMaskManagedLabelEditPolicy policy = (IMaskManagedLabelEditPolicy)editPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
if(policy != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageLabelHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageLabelHelper.java
index 543108af2bc..590f7f801dd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageLabelHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageLabelHelper.java
@@ -15,7 +15,7 @@ import org.eclipse.papyrus.infra.tools.util.StringHelper;
import org.eclipse.papyrus.uml.diagram.common.helper.StereotypedElementLabelHelper;
import org.eclipse.papyrus.uml.diagram.sequence.util.OperationUtil;
import org.eclipse.papyrus.uml.diagram.sequence.util.SignalUtil;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.TypedElementUtil;
import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
import org.eclipse.uml2.uml.Message;
@@ -26,7 +26,7 @@ import org.eclipse.uml2.uml.ValueSpecification;
public class MessageLabelHelper extends StereotypedElementLabelHelper {
- public static final Collection<String> DEFAULT_LABEL_DISPLAY = Arrays.asList(ICustomAppearence.DISP_NAME, ICustomAppearence.DISP_PARAMETER_NAME, ICustomAppearence.DISP_PARAMETER_TYPE, ICustomAppearence.DISP_RT_TYPE);
+ public static final Collection<String> DEFAULT_LABEL_DISPLAY = Arrays.asList(ICustomAppearance.DISP_NAME, ICustomAppearance.DISP_PARAMETER_NAME, ICustomAppearance.DISP_PARAMETER_TYPE, ICustomAppearance.DISP_RT_TYPE);
/**
* singelton instance
@@ -38,17 +38,17 @@ public class MessageLabelHelper extends StereotypedElementLabelHelper {
protected MessageLabelHelper() {
// initialize the map
- masks.put(ICustomAppearence.DISP_VISIBILITY, "Visibility");
- masks.put(ICustomAppearence.DISP_NAME, "Name");
- masks.put(ICustomAppearence.DISP_PARAMETER_NAME, "Parameters Name");
- masks.put(ICustomAppearence.DISP_PARAMETER_DIRECTION, "Parameters Direction");
- masks.put(ICustomAppearence.DISP_PARAMETER_TYPE, "Parameters Type");
- masks.put(ICustomAppearence.DISP_RT_TYPE, "Return Type");
- masks.put(ICustomAppearence.DISP_PARAMETER_MULTIPLICITY, "Parameters Multiplicity");
- masks.put(ICustomAppearence.DISP_PARAMETER_DEFAULT, "Parameters Default Value");
- masks.put(ICustomAppearence.DISP_DERIVE, "Parameters Value");
- masks.put(ICustomAppearence.DISP_PARAMETER_MODIFIERS, "Parameters Modifiers");
- masks.put(ICustomAppearence.DISP_MODIFIERS, "Modifiers");
+ masks.put(ICustomAppearance.DISP_VISIBILITY, "Visibility");
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+ masks.put(ICustomAppearance.DISP_PARAMETER_NAME, "Parameters Name");
+ masks.put(ICustomAppearance.DISP_PARAMETER_DIRECTION, "Parameters Direction");
+ masks.put(ICustomAppearance.DISP_PARAMETER_TYPE, "Parameters Type");
+ masks.put(ICustomAppearance.DISP_RT_TYPE, "Return Type");
+ masks.put(ICustomAppearance.DISP_PARAMETER_MULTIPLICITY, "Parameters Multiplicity");
+ masks.put(ICustomAppearance.DISP_PARAMETER_DEFAULT, "Parameters Default Value");
+ masks.put(ICustomAppearance.DISP_DERIVE, "Parameters Value");
+ masks.put(ICustomAppearance.DISP_PARAMETER_MODIFIERS, "Parameters Modifiers");
+ masks.put(ICustomAppearance.DISP_MODIFIERS, "Modifiers");
}
/**
@@ -103,7 +103,7 @@ public class MessageLabelHelper extends StereotypedElementLabelHelper {
buffer.append(message.getName());
// parameters : '(' parameter-list ')'
EList<ValueSpecification> arguments = message.getArguments();
- if(arguments.size() > 0 && (displayValue.contains(ICustomAppearence.DISP_PARAMETER_NAME) || displayValue.contains(ICustomAppearence.DISP_DERIVE))) {
+ if(arguments.size() > 0 && (displayValue.contains(ICustomAppearance.DISP_PARAMETER_NAME) || displayValue.contains(ICustomAppearance.DISP_DERIVE))) {
buffer.append("(");
for(int i = 0; i < arguments.size(); i++) {
if(i > 0) {
@@ -111,7 +111,7 @@ public class MessageLabelHelper extends StereotypedElementLabelHelper {
}
ValueSpecification arg = arguments.get(i);
//type
- if(displayValue.contains(ICustomAppearence.DISP_PARAMETER_TYPE)) {
+ if(displayValue.contains(ICustomAppearance.DISP_PARAMETER_TYPE)) {
String type = TypedElementUtil.getTypeAsString(arg);
if(type != null) {
buffer.append(type);
@@ -119,7 +119,7 @@ public class MessageLabelHelper extends StereotypedElementLabelHelper {
}
boolean showEqualMark = false;
// name
- if(displayValue.contains(ICustomAppearence.DISP_PARAMETER_NAME)) {
+ if(displayValue.contains(ICustomAppearance.DISP_PARAMETER_NAME)) {
buffer.append(" ");
String name = StringHelper.trimToEmpty(arg.getName());
buffer.append(name);
@@ -128,7 +128,7 @@ public class MessageLabelHelper extends StereotypedElementLabelHelper {
}
}
// value
- if(displayValue.contains(ICustomAppearence.DISP_DERIVE)) {
+ if(displayValue.contains(ICustomAppearance.DISP_DERIVE)) {
String value = ValueSpecificationUtil.getSpecificationValue(arg);
if(value != null) {
if(showEqualMark) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/MessageCustomParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/MessageCustomParser.java
index 80ccc7de4cd..72b6f82121c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/MessageCustomParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/MessageCustomParser.java
@@ -22,7 +22,7 @@ import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
import org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.OperationUtil;
import org.eclipse.papyrus.uml.tools.utils.SignalUtil;
import org.eclipse.uml2.uml.Element;
@@ -59,14 +59,14 @@ public class MessageCustomParser extends MessageFormatParser implements ISemanti
if(signature instanceof Operation) {
Operation operation = (Operation)signature;
if(MessageSort.REPLY_LITERAL.equals(message.getMessageSort())) {
- result = OperationUtil.getCustomLabel(operation, Arrays.asList(ICustomAppearence.DISP_NAME, ICustomAppearence.DISP_RT_TYPE));
+ result = OperationUtil.getCustomLabel(operation, Arrays.asList(ICustomAppearance.DISP_NAME, ICustomAppearance.DISP_RT_TYPE));
} else if(MessageSort.SYNCH_CALL_LITERAL.equals(message.getMessageSort())) {
- result = OperationUtil.getCustomLabel(operation, Arrays.asList(ICustomAppearence.DISP_NAME, ICustomAppearence.DISP_PARAMETER_NAME, ICustomAppearence.DISP_PARAMETER_TYPE));
+ result = OperationUtil.getCustomLabel(operation, Arrays.asList(ICustomAppearance.DISP_NAME, ICustomAppearance.DISP_PARAMETER_NAME, ICustomAppearance.DISP_PARAMETER_TYPE));
} else {
- result = OperationUtil.getCustomLabel(operation, Arrays.asList(ICustomAppearence.DISP_NAME, ICustomAppearence.DISP_PARAMETER_NAME, ICustomAppearence.DISP_PARAMETER_TYPE, ICustomAppearence.DISP_RT_TYPE));
+ result = OperationUtil.getCustomLabel(operation, Arrays.asList(ICustomAppearance.DISP_NAME, ICustomAppearance.DISP_PARAMETER_NAME, ICustomAppearance.DISP_PARAMETER_TYPE, ICustomAppearance.DISP_RT_TYPE));
}
} else if(signature instanceof Signal) {
- result = SignalUtil.getCustomLabel((Signal)signature, Arrays.asList(ICustomAppearence.DISP_NAME, ICustomAppearence.DISP_TYPE));
+ result = SignalUtil.getCustomLabel((Signal)signature, Arrays.asList(ICustomAppearance.DISP_NAME, ICustomAppearance.DISP_TYPE));
} else if(signature != null) {
result = signature.getName();
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperationUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperationUtil.java
index 2031788ef36..e00ab984b1c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperationUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperationUtil.java
@@ -5,7 +5,7 @@ import java.util.Iterator;
import org.eclipse.emf.common.util.EList;
import org.eclipse.papyrus.infra.tools.util.StringHelper;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.MultiplicityElementUtil;
import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
import org.eclipse.papyrus.uml.tools.utils.ParameterUtil;
@@ -25,17 +25,17 @@ public class OperationUtil {
StringBuffer buffer = new StringBuffer();
// visibility
buffer.append(" ");
- if(displayValue.contains(ICustomAppearence.DISP_VISIBILITY)) {
+ if(displayValue.contains(ICustomAppearance.DISP_VISIBILITY)) {
buffer.append(NamedElementUtil.getVisibilityAsSign(parameter));
}
// direction property
- if(displayValue.contains(ICustomAppearence.DISP_PARAMETER_DIRECTION)) {
+ if(displayValue.contains(ICustomAppearance.DISP_PARAMETER_DIRECTION)) {
buffer.append(" ");
buffer.append(parameter.getDirection().getLiteral());
}
boolean showEqualMark = false;
// name
- if(displayValue.contains(ICustomAppearence.DISP_PARAMETER_NAME)) {
+ if(displayValue.contains(ICustomAppearance.DISP_PARAMETER_NAME)) {
buffer.append(" ");
String name = StringHelper.trimToEmpty(parameter.getName());
if(name.trim().length() > 0) {
@@ -43,7 +43,7 @@ public class OperationUtil {
}
buffer.append(name);
}
- if(displayValue.contains(ICustomAppearence.DISP_PARAMETER_TYPE)) {
+ if(displayValue.contains(ICustomAppearance.DISP_PARAMETER_TYPE)) {
// type
if(parameter.getType() != null) {
buffer.append(": " + StringHelper.trimToEmpty(parameter.getType().getName()));
@@ -52,12 +52,12 @@ public class OperationUtil {
}
showEqualMark = true;
}
- if(displayValue.contains(ICustomAppearence.DISP_PARAMETER_MULTIPLICITY)) {
+ if(displayValue.contains(ICustomAppearance.DISP_PARAMETER_MULTIPLICITY)) {
// multiplicity -> do not display [1]
String multiplicity = MultiplicityElementUtil.getMultiplicityAsString(parameter);
buffer.append(multiplicity);
}
- if(displayValue.contains(ICustomAppearence.DISP_DERIVE)) {
+ if(displayValue.contains(ICustomAppearance.DISP_DERIVE)) {
String value = getValue(e, paramIndex, parameter);
if(value != null) {
if(showEqualMark) {
@@ -65,7 +65,7 @@ public class OperationUtil {
}
buffer.append(value);
}
- } else if(displayValue.contains(ICustomAppearence.DISP_PARAMETER_DEFAULT)) {
+ } else if(displayValue.contains(ICustomAppearance.DISP_PARAMETER_DEFAULT)) {
// default value
if(parameter.getDefault() != null) {
if(showEqualMark) {
@@ -74,8 +74,8 @@ public class OperationUtil {
buffer.append(parameter.getDefault());
}
}
- if(displayValue.contains(ICustomAppearence.DISP_MODIFIERS)) {
- boolean multiLine = displayValue.contains(ICustomAppearence.DISP_MULTI_LINE);
+ if(displayValue.contains(ICustomAppearance.DISP_MODIFIERS)) {
+ boolean multiLine = displayValue.contains(ICustomAppearance.DISP_MULTI_LINE);
// property modifiers
String modifiers = ParameterUtil.getModifiersAsString(parameter, multiLine);
if(!modifiers.equals("")) {
@@ -103,11 +103,11 @@ public class OperationUtil {
StringBuffer buffer = new StringBuffer();
buffer.append(" "); // adds " " first for correct display considerations
// visibility
- if(displayValue.contains(ICustomAppearence.DISP_VISIBILITY)) {
+ if(displayValue.contains(ICustomAppearance.DISP_VISIBILITY)) {
buffer.append(NamedElementUtil.getVisibilityAsSign(operation));
}
// name
- if(displayValue.contains(ICustomAppearence.DISP_NAME)) {
+ if(displayValue.contains(ICustomAppearance.DISP_NAME)) {
buffer.append(" ");
buffer.append(StringHelper.trimToEmpty(operation.getName()));
}
@@ -117,11 +117,11 @@ public class OperationUtil {
buffer.append(getParametersAsString(message, operation, displayValue));
buffer.append(")");
// return type
- if(displayValue.contains(ICustomAppearence.DISP_RT_TYPE)) {
+ if(displayValue.contains(ICustomAppearance.DISP_RT_TYPE) || displayValue.contains(ICustomAppearance.DISP_TYPE)) {
buffer.append(getReturnTypeAsString(operation, displayValue));
}
// modifiers
- if(displayValue.contains(ICustomAppearence.DISP_MODIFIERS)) {
+ if(displayValue.contains(ICustomAppearance.DISP_MODIFIERS)) {
String modifiers = getModifiersAsString(operation);
if(!modifiers.equals("")) {
buffer.append("{");
@@ -134,7 +134,7 @@ public class OperationUtil {
/**
* Returns operation modifiers as string, separated with comma.
- *
+ *
* @return a string containing the modifiers
*/
private static String getModifiersAsString(Operation operation) {
@@ -193,14 +193,14 @@ public class OperationUtil {
/**
* Returns return parameter label as a string, string parametrized with a style mask.
- *
+ *
* @param style
* the mask that indicates which element to display
* @return a string containing the return parameter type
*/
private static String getReturnTypeAsString(Operation operation, Collection<String> displayValue) {
- boolean displayType = displayValue.contains(ICustomAppearence.DISP_RT_TYPE);
- boolean displayMultiplicity = displayValue.contains(ICustomAppearence.DISP_RT_MULTIPLICITY);
+ boolean displayType = displayValue.contains(ICustomAppearance.DISP_RT_TYPE) || displayValue.contains(ICustomAppearance.DISP_TYPE);
+ boolean displayMultiplicity = displayValue.contains(ICustomAppearance.DISP_RT_MULTIPLICITY) || displayValue.contains(ICustomAppearance.DISP_MULTIPLICITY);
StringBuffer label = new StringBuffer("");
// Retrieve the return parameter (assume to be unique if defined)
Parameter returnParameter = getReturnParameter(operation);
@@ -223,7 +223,7 @@ public class OperationUtil {
/**
* Gives the return parameter for this operation, or <code>null</code> if none exists.
- *
+ *
* @return the return parameter of the operation or <code>null</code>
*/
private static Parameter getReturnParameter(Operation operation) {
@@ -241,9 +241,9 @@ public class OperationUtil {
/**
* Returns operation parameters as a string, the label is customized using a bit mask
- *
+ *
* @param e
- *
+ *
* @return a string containing all parameters separated by commas
*/
private static String getParametersAsString(Message e, Operation operation, Collection<String> displayValue) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SignalUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SignalUtil.java
index d0da44e611a..529cf21f86a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SignalUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SignalUtil.java
@@ -4,7 +4,7 @@ import java.util.Collection;
import org.eclipse.emf.common.util.EList;
import org.eclipse.papyrus.infra.tools.util.StringHelper;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearence;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.MultiplicityElementUtil;
import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
@@ -21,18 +21,18 @@ public class SignalUtil {
StringBuffer buffer = new StringBuffer();
// visibility
buffer.append(" ");
- if(displayValue.contains(ICustomAppearence.DISP_VISIBILITY)) {
+ if(displayValue.contains(ICustomAppearance.DISP_VISIBILITY)) {
buffer.append(NamedElementUtil.getVisibilityAsSign(property));
}
// derived property
- if(displayValue.contains(ICustomAppearence.DISP_DERIVE)) {
+ if(displayValue.contains(ICustomAppearance.DISP_DERIVE)) {
if(property.isDerived()) {
buffer.append("/");
}
}
boolean showEqualMark = false;
// name
- if(displayValue.contains(ICustomAppearence.DISP_PARAMETER_NAME)) {
+ if(displayValue.contains(ICustomAppearance.DISP_PARAMETER_NAME)) {
buffer.append(" ");
String name = StringHelper.trimToEmpty(property.getName());
if(name.trim().length() > 0) {
@@ -40,7 +40,7 @@ public class SignalUtil {
}
buffer.append(name);
}
- if(displayValue.contains(ICustomAppearence.DISP_PARAMETER_TYPE)) {
+ if(displayValue.contains(ICustomAppearance.DISP_PARAMETER_TYPE)) {
// type
if(property.getType() != null) {
buffer.append(": " + StringHelper.trimToEmpty(property.getType().getName()));
@@ -49,12 +49,12 @@ public class SignalUtil {
}
showEqualMark = true;
}
- if(displayValue.contains(ICustomAppearence.DISP_MULTIPLICITY)) {
+ if(displayValue.contains(ICustomAppearance.DISP_MULTIPLICITY)) {
// multiplicity -> do not display [1]
String multiplicity = MultiplicityElementUtil.getMultiplicityAsString(property);
buffer.append(multiplicity);
}
- if(displayValue.contains(ICustomAppearence.DISP_DERIVE)) {
+ if(displayValue.contains(ICustomAppearance.DISP_DERIVE)) {
String value = getValue(e, property);
if(value != null) {
if(showEqualMark) {
@@ -62,7 +62,7 @@ public class SignalUtil {
}
buffer.append(value);
}
- } else if(displayValue.contains(ICustomAppearence.DISP_PARAMETER_DEFAULT)) {
+ } else if(displayValue.contains(ICustomAppearance.DISP_PARAMETER_DEFAULT)) {
// default value
if(property.getDefault() != null) {
if(showEqualMark) {
@@ -71,8 +71,8 @@ public class SignalUtil {
buffer.append(property.getDefault());
}
}
- if(displayValue.contains(ICustomAppearence.DISP_MODIFIERS)) {
- boolean multiLine = displayValue.contains(ICustomAppearence.DISP_MULTI_LINE);
+ if(displayValue.contains(ICustomAppearance.DISP_MODIFIERS)) {
+ boolean multiLine = displayValue.contains(ICustomAppearance.DISP_MULTI_LINE);
// property modifiers
String modifiers = PropertyUtil.getModifiersAsString(property, multiLine);
if(!modifiers.equals("")) {
@@ -115,11 +115,11 @@ public class SignalUtil {
StringBuffer buffer = new StringBuffer();
buffer.append(" "); // adds " " first for correct display considerations
// visibility
- if(displayValue.contains(ICustomAppearence.DISP_VISIBILITY)) {
+ if(displayValue.contains(ICustomAppearance.DISP_VISIBILITY)) {
buffer.append(NamedElementUtil.getVisibilityAsSign(signal));
}
// name
- if(displayValue.contains(ICustomAppearence.DISP_NAME)) {
+ if(displayValue.contains(ICustomAppearance.DISP_NAME)) {
buffer.append(" ");
buffer.append(StringHelper.trimToEmpty(signal.getName()));
}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CollaborationUseUtil.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CollaborationUseUtil.java
index 31a21c2dd62..750b9d4d1d8 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CollaborationUseUtil.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CollaborationUseUtil.java
@@ -63,17 +63,17 @@ public class CollaborationUseUtil {
// visibility
buffer.append(" ");
- if(maskValues.contains(ICustomAppearence.DISP_VISIBILITY)) {
+ if(maskValues.contains(ICustomAppearance.DISP_VISIBILITY)) {
buffer.append(NamedElementUtil.getVisibilityAsSign(collaborationUse));
}
// name
- if(maskValues.contains(ICustomAppearence.DISP_NAME)) {
+ if(maskValues.contains(ICustomAppearance.DISP_NAME)) {
buffer.append(" ");
buffer.append(collaborationUse.getName());
}
- if(maskValues.contains(ICustomAppearence.DISP_TYPE)) {
+ if(maskValues.contains(ICustomAppearance.DISP_TYPE)) {
// type
if(collaborationUse.getType() != null) {
buffer.append(": " + collaborationUse.getType().getName());
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ICustomAppearence.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ICustomAppearance.java
index 955348f3120..646da6f7480 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ICustomAppearence.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ICustomAppearance.java
@@ -20,7 +20,7 @@ import java.util.Collection;
* Interface that manages display constants for custom labels (ex: operations label in a class
* diagram).
*/
-public interface ICustomAppearence {
+public interface ICustomAppearance {
/**
* key for the appearance property of graph nodes.
@@ -69,26 +69,29 @@ public interface ICustomAppearence {
/** Style constant for carriage return in labels */
public final static String DISP_MULTI_LINE = "multiline";
+ /** Prefix used to distinguish parameter-specific values (e.g. name vs parametersName, for an Operation) */
+ public final static String PARAMETERS_PREFIX = "parameters";
+
/** Style constant for operation#parameter direction display in labels */
- public final String DISP_PARAMETER_DIRECTION = "parametersDirection";
+ public final String DISP_PARAMETER_DIRECTION = PARAMETERS_PREFIX + "Direction";
/** Style constant for direction display in labels */
public final String DISP_DIRECTION = "direction";
/** Style constant for operation#parameter name display in labels */
- public final String DISP_PARAMETER_NAME = "parametersName";
+ public final String DISP_PARAMETER_NAME = PARAMETERS_PREFIX + "Name";
/** Style constant for operation#parameter type display in labels */
- public final String DISP_PARAMETER_TYPE = "parametersType";
+ public final String DISP_PARAMETER_TYPE = PARAMETERS_PREFIX + "Type";
/** Style constant for operation#parameter multiplicity display in labels */
- public final String DISP_PARAMETER_MULTIPLICITY = "parametersMultiplicity";
+ public final String DISP_PARAMETER_MULTIPLICITY = PARAMETERS_PREFIX + "Multiplicity";
/** Style constant for operation#parameter default value display in labels */
- public final String DISP_PARAMETER_DEFAULT = "parametersDefault";
+ public final String DISP_PARAMETER_DEFAULT = PARAMETERS_PREFIX + "Default";
/** Style constant for operation#parameter modifiers display in labels */
- public final String DISP_PARAMETER_MODIFIERS = "parametersModifiers";
+ public final String DISP_PARAMETER_MODIFIERS = PARAMETERS_PREFIX + "Modifiers";
/** Style constant for return type display in labels */
public final String DISP_RT_TYPE = "returnType";
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/InstanceSpecificationUtil.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/InstanceSpecificationUtil.java
index 418f3c81e2b..5810a415b71 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/InstanceSpecificationUtil.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/InstanceSpecificationUtil.java
@@ -20,42 +20,47 @@ import org.eclipse.uml2.uml.InstanceSpecification;
/**
* util class to display name of instancespecification
- *
+ *
*/
public class InstanceSpecificationUtil {
/**
* return the custom label of the operation, given UML2 specification and a custom style.
- *
+ *
* @param style
* the integer representing the style of the label
- *
+ *
* @return the string corresponding to the label of the operation
*/
public static String getCustomLabel(InstanceSpecification instance, Collection<String> maskValues) {
StringBuffer buffer = new StringBuffer();
- buffer.append(" "); // adds " " first for correct display considerations
// name
- if(maskValues.contains(ICustomAppearence.DISP_NAME)) {
+ if(maskValues.contains(ICustomAppearance.DISP_NAME)) {
buffer.append(NamedElementUtil.getName(instance));
}
// classifier
- if(maskValues.contains(ICustomAppearence.DISP_TYPE)) {
+ if(maskValues.contains(ICustomAppearance.DISP_TYPE)) {
if(!getTypesAsString(instance).equals("")) {
buffer.append(": ");
buffer.append(getTypesAsString(instance));
}
}
+ //Workaround: empty label leads to invalid layout.
+ //FIXME: Fix the layout instead
+ if(buffer.length() == 0) {
+ buffer.append(" "); //Add a whitespace to avoid layout issues
+ }
+ //
return buffer.toString();
}
/**
* Returns the list of classifier for an instance specification as a string
- *
+ *
* @return a string containing all classifier separated by commas
*/
private static String getTypesAsString(InstanceSpecification instance) {
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/OperationUtil.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/OperationUtil.java
index d7b59c2a9dc..93489391c17 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/OperationUtil.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/OperationUtil.java
@@ -14,8 +14,11 @@
package org.eclipse.papyrus.uml.tools.utils;
import java.util.Collection;
+import java.util.HashSet;
import java.util.Iterator;
+import java.util.Set;
+import org.eclipse.papyrus.infra.tools.util.StringHelper;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Parameter;
@@ -39,12 +42,12 @@ public class OperationUtil {
buffer.append(" "); // adds " " first for correct display considerations
// visibility
- if(maskValues.contains(ICustomAppearence.DISP_VISIBILITY)) {
+ if(maskValues.contains(ICustomAppearance.DISP_VISIBILITY)) {
buffer.append(NamedElementUtil.getVisibilityAsSign(operation));
}
// name
- if(maskValues.contains(ICustomAppearence.DISP_NAME)) {
+ if(maskValues.contains(ICustomAppearance.DISP_NAME)) {
buffer.append(" ");
buffer.append(operation.getName());
}
@@ -56,12 +59,12 @@ public class OperationUtil {
buffer.append(")");
// return type
- if(maskValues.contains(ICustomAppearence.DISP_RT_TYPE)) {
+ if(maskValues.contains(ICustomAppearance.DISP_RT_TYPE) || maskValues.contains(ICustomAppearance.DISP_TYPE)) {
buffer.append(OperationUtil.getReturnTypeAsString(operation, maskValues));
}
// modifiers
- if(maskValues.contains(ICustomAppearence.DISP_MODIFIERS)) {
+ if(maskValues.contains(ICustomAppearance.DISP_MODIFIERS)) {
String modifiers = OperationUtil.getModifiersAsString(operation);
if(!modifiers.equals("")) {
buffer.append("{");
@@ -80,8 +83,8 @@ public class OperationUtil {
* @return a string containing the return parameter type
*/
private static String getReturnTypeAsString(Operation operation, Collection<String> maskValues) {
- boolean displayType = maskValues.contains(ICustomAppearence.DISP_RT_TYPE);
- boolean displayMultiplicity = maskValues.contains(ICustomAppearence.DISP_RT_MULTIPLICITY);
+ boolean displayType = maskValues.contains(ICustomAppearance.DISP_RT_TYPE) || maskValues.contains(ICustomAppearance.DISP_TYPE);
+ boolean displayMultiplicity = maskValues.contains(ICustomAppearance.DISP_RT_MULTIPLICITY) || maskValues.contains(ICustomAppearance.DISP_MULTIPLICITY);
StringBuffer label = new StringBuffer("");
// Retrieve the return parameter (assume to be unique if defined)
@@ -120,10 +123,8 @@ public class OperationUtil {
// Do not include return parameters
if(!parameter.getDirection().equals(ParameterDirectionKind.RETURN_LITERAL)) {
-
-
// get the label for this parameter
- String parameterString = ParameterUtil.getCustomLabel(parameter, maskValues);
+ String parameterString = ParameterUtil.getCustomLabel(parameter, extractParameterMaskValues(maskValues));
if(!parameterString.trim().equals("")) {
if(!firstParameter) {
paramString.append(", ");
@@ -136,6 +137,19 @@ public class OperationUtil {
return paramString.toString();
}
+ private static Collection<String> extractParameterMaskValues(Collection<String> operationMaskValues) {
+ Set<String> result = new HashSet<String>();
+
+ for(String maskValue : operationMaskValues) {
+ if(maskValue.startsWith(ICustomAppearance.PARAMETERS_PREFIX)) {
+ String newValue = StringHelper.firstToLower(maskValue.replace(ICustomAppearance.PARAMETERS_PREFIX, ""));
+ result.add(newValue);
+ }
+ }
+
+ return result;
+ }
+
/**
* Returns operation modifiers as string, separated with comma.
*
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ParameterUtil.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ParameterUtil.java
index 6ec5265eb8d..06dd12c5e7e 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ParameterUtil.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ParameterUtil.java
@@ -139,23 +139,23 @@ public class ParameterUtil {
StringBuffer buffer = new StringBuffer();
// visibility
buffer.append(" ");
- if(maskValues.contains(ICustomAppearence.DISP_VISIBILITY)) {
+ if(maskValues.contains(ICustomAppearance.DISP_VISIBILITY)) {
buffer.append(NamedElementUtil.getVisibilityAsSign(parameter));
}
// direction property
- if(maskValues.contains(ICustomAppearence.DISP_PARAMETER_DIRECTION) || maskValues.contains(ICustomAppearence.DISP_DIRECTION)) {
+ if(maskValues.contains(ICustomAppearance.DISP_PARAMETER_DIRECTION) || maskValues.contains(ICustomAppearance.DISP_DIRECTION)) {
buffer.append(" ");
buffer.append(parameter.getDirection().getLiteral());
}
// name
- if(maskValues.contains(ICustomAppearence.DISP_PARAMETER_NAME) || maskValues.contains(ICustomAppearence.DISP_NAME)) {
+ if(maskValues.contains(ICustomAppearance.DISP_PARAMETER_NAME) || maskValues.contains(ICustomAppearance.DISP_NAME)) {
buffer.append(" ");
buffer.append(parameter.getName());
}
- if(maskValues.contains(ICustomAppearence.DISP_PARAMETER_TYPE) || maskValues.contains(ICustomAppearence.DISP_TYPE)) {
+ if(maskValues.contains(ICustomAppearance.DISP_PARAMETER_TYPE) || maskValues.contains(ICustomAppearance.DISP_TYPE)) {
// type
if(parameter.getType() != null) {
buffer.append(": " + parameter.getType().getName());
@@ -164,13 +164,13 @@ public class ParameterUtil {
}
}
- if(maskValues.contains(ICustomAppearence.DISP_PARAMETER_MULTIPLICITY) || maskValues.contains(ICustomAppearence.DISP_MULTIPLICITY)) {
+ if(maskValues.contains(ICustomAppearance.DISP_PARAMETER_MULTIPLICITY) || maskValues.contains(ICustomAppearance.DISP_MULTIPLICITY)) {
// multiplicity -> do not display [1]
String multiplicity = MultiplicityElementUtil.getMultiplicityAsString(parameter);
buffer.append(multiplicity);
}
- if(maskValues.contains(ICustomAppearence.DISP_PARAMETER_DEFAULT) || maskValues.contains(ICustomAppearence.DISP_DEFAULT_VALUE)) {
+ if(maskValues.contains(ICustomAppearance.DISP_PARAMETER_DEFAULT) || maskValues.contains(ICustomAppearance.DISP_DEFAULT_VALUE)) {
// default value
if(parameter.getDefault() != null) {
buffer.append(" = ");
@@ -178,8 +178,8 @@ public class ParameterUtil {
}
}
- if(maskValues.contains(ICustomAppearence.DISP_MODIFIERS)) {
- boolean multiLine = (maskValues.contains(ICustomAppearence.DISP_MULTI_LINE));
+ if(maskValues.contains(ICustomAppearance.DISP_MODIFIERS)) {
+ boolean multiLine = (maskValues.contains(ICustomAppearance.DISP_MULTI_LINE));
// property modifiers
String modifiers = ParameterUtil.getModifiersAsString(parameter, multiLine);
if(!modifiers.equals("")) {
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PortUtil.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PortUtil.java
index 2bfb067f5c0..4a33954f162 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PortUtil.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PortUtil.java
@@ -34,24 +34,24 @@ public class PortUtil extends PropertyUtil {
// visibility
buffer.append(" ");
- if(maskValues.contains(ICustomAppearence.DISP_VISIBILITY)) {
+ if(maskValues.contains(ICustomAppearance.DISP_VISIBILITY)) {
buffer.append(NamedElementUtil.getVisibilityAsSign(property));
}
// derived property
- if(maskValues.contains(ICustomAppearence.DISP_DERIVE)) {
+ if(maskValues.contains(ICustomAppearance.DISP_DERIVE)) {
if(property.isDerived()) {
buffer.append("/");
}
}
// name
- if(maskValues.contains(ICustomAppearence.DISP_NAME)) {
+ if(maskValues.contains(ICustomAppearance.DISP_NAME)) {
buffer.append(" ");
buffer.append(property.getName());
}
- if(maskValues.contains(ICustomAppearence.DISP_TYPE)) {
- if(maskValues.contains(ICustomAppearence.DISP_CONJUGATED)) {
+ if(maskValues.contains(ICustomAppearance.DISP_TYPE)) {
+ if(maskValues.contains(ICustomAppearance.DISP_CONJUGATED)) {
if(((Port)property).isConjugated()) {
buffer.append(": ~");
} else {
@@ -68,13 +68,13 @@ public class PortUtil extends PropertyUtil {
}
}
- if(maskValues.contains(ICustomAppearence.DISP_MULTIPLICITY)) {
+ if(maskValues.contains(ICustomAppearance.DISP_MULTIPLICITY)) {
// multiplicity -> do not display [1]
String multiplicity = MultiplicityElementUtil.getMultiplicityAsString(property);
buffer.append(multiplicity);
}
- if(maskValues.contains(ICustomAppearence.DISP_DEFAULT_VALUE)) {
+ if(maskValues.contains(ICustomAppearance.DISP_DEFAULT_VALUE)) {
// default value
if(property.getDefault() != null) {
buffer.append(" = ");
@@ -82,8 +82,8 @@ public class PortUtil extends PropertyUtil {
}
}
- if(maskValues.contains(ICustomAppearence.DISP_MODIFIERS)) {
- boolean multiLine = maskValues.contains(ICustomAppearence.DISP_MULTI_LINE);
+ if(maskValues.contains(ICustomAppearance.DISP_MODIFIERS)) {
+ boolean multiLine = maskValues.contains(ICustomAppearance.DISP_MULTI_LINE);
// property modifiers
String modifiers = PropertyUtil.getModifiersAsString(property, multiLine);
if(!modifiers.equals("")) {
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PropertyUtil.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PropertyUtil.java
index 33a2169ca22..4c7b24a93b8 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PropertyUtil.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PropertyUtil.java
@@ -221,23 +221,23 @@ public class PropertyUtil {
// visibility
buffer.append(" ");
- if(style.contains(ICustomAppearence.DISP_VISIBILITY)) {
+ if(style.contains(ICustomAppearance.DISP_VISIBILITY)) {
buffer.append(NamedElementUtil.getVisibilityAsSign(property));
}
// derived property
- if(style.contains(ICustomAppearence.DISP_DERIVE)) {
+ if(style.contains(ICustomAppearance.DISP_DERIVE)) {
if(property.isDerived()) {
buffer.append("/");
}
}
// name
- if(style.contains(ICustomAppearence.DISP_NAME)) {
+ if(style.contains(ICustomAppearance.DISP_NAME)) {
buffer.append(" ");
buffer.append(property.getName());
}
- if(style.contains(ICustomAppearence.DISP_TYPE)) {
+ if(style.contains(ICustomAppearance.DISP_TYPE)) {
// type
if(property.getType() != null) {
buffer.append(": " + property.getType().getName());
@@ -246,13 +246,13 @@ public class PropertyUtil {
}
}
- if(style.contains(ICustomAppearence.DISP_MULTIPLICITY)) {
+ if(style.contains(ICustomAppearance.DISP_MULTIPLICITY)) {
// multiplicity -> do not display [1]
String multiplicity = MultiplicityElementUtil.getMultiplicityAsString(property);
buffer.append(multiplicity);
}
- if(style.contains(ICustomAppearence.DISP_DEFAULT_VALUE)) {
+ if(style.contains(ICustomAppearance.DISP_DEFAULT_VALUE)) {
// default value
if(property.getDefault() != null) {
buffer.append(" = ");
@@ -260,8 +260,8 @@ public class PropertyUtil {
}
}
- if(style.contains(ICustomAppearence.DISP_MODIFIERS)) {
- boolean multiLine = style.contains(ICustomAppearence.DISP_MULTI_LINE);
+ if(style.contains(ICustomAppearance.DISP_MODIFIERS)) {
+ boolean multiLine = style.contains(ICustomAppearance.DISP_MULTI_LINE);
// property modifiers
String modifiers = PropertyUtil.getModifiersAsString(property, multiLine);
if(!modifiers.equals("")) {
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/SignalUtil.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/SignalUtil.java
index 0abc0be2ba0..4e56e37e5d6 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/SignalUtil.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/SignalUtil.java
@@ -36,12 +36,12 @@ public class SignalUtil {
buffer.append(" "); // adds " " first for correct display considerations
// visibility
- if(maskValues.contains(ICustomAppearence.DISP_VISIBILITY)) {
+ if(maskValues.contains(ICustomAppearance.DISP_VISIBILITY)) {
buffer.append(NamedElementUtil.getVisibilityAsSign(signal));
}
// name
- if(maskValues.contains(ICustomAppearence.DISP_NAME)) {
+ if(maskValues.contains(ICustomAppearance.DISP_NAME)) {
buffer.append(" ");
buffer.append(signal.getName());
}

Back to the top