Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java')
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java
index 0fd37969d94..89ea3a8e1d7 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java
@@ -7,8 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
- * CEA LIST - Initial API and implementation
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.parser;
@@ -28,6 +28,7 @@ import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLMultiplicityElementUtil;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
import org.eclipse.uml2.uml.Property;
@@ -113,7 +114,7 @@ public class PropertyLabelParser extends NamedElementLabelParser {
// manage name
if (maskValues.contains(ICustomAppearance.DISP_NAME) && (property.isSetName())) {
- String name = property.getName();
+ String name = UMLLabelInternationalization.getInstance().getLabel(property);
result = String.format(NAME_FORMAT, result, name);
}
@@ -121,7 +122,7 @@ public class PropertyLabelParser extends NamedElementLabelParser {
if (maskValues.contains(ICustomAppearance.DISP_TYPE)) {
String type = "<Undefined>";
if (property.getType() != null) {
- type = property.getType().getName();
+ type = UMLLabelInternationalization.getInstance().getLabel(property.getType());
}
// If type is undefined only show "<Undefined>" when explicitly asked.
@@ -143,7 +144,7 @@ public class PropertyLabelParser extends NamedElementLabelParser {
// manage default value
if (maskValues.contains(ICustomAppearance.DISP_DEFAULT_VALUE) && property.getDefaultValue() != null) {
ValueSpecification valueSpecification = property.getDefaultValue();
- result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification));
+ result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification, true));
}
// manage modifier
@@ -164,7 +165,7 @@ public class PropertyLabelParser extends NamedElementLabelParser {
EList<Property> redefinedProperties = property.getRedefinedProperties();
if (redefinedProperties != null && !redefinedProperties.isEmpty()) {
for (Property p : redefinedProperties) {
- sb.append(sb.length() == 0 ? p.getName() : ", redefines " + p.getName());
+ sb.append(sb.length() == 0 ? UMLLabelInternationalization.getInstance().getLabel(p) : ", redefines " + UMLLabelInternationalization.getInstance().getLabel(p));
}
}
if (sb.length() != 0) {

Back to the top