Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/util/PropertiesUtil.java')
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/util/PropertiesUtil.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/util/PropertiesUtil.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/util/PropertiesUtil.java
index c3f9a2c46cd..59cf89e68fa 100644
--- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/util/PropertiesUtil.java
+++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/util/PropertiesUtil.java
@@ -23,6 +23,7 @@ import org.eclipse.papyrus.views.properties.Activator;
import org.eclipse.papyrus.views.properties.contexts.Context;
import org.eclipse.papyrus.views.properties.contexts.DataContextElement;
import org.eclipse.papyrus.views.properties.contexts.DataContextPackage;
+import org.eclipse.papyrus.views.properties.contexts.Property;
import org.eclipse.papyrus.views.properties.environment.Namespace;
/**
@@ -57,6 +58,20 @@ public class PropertiesUtil {
}
/**
+ * Returns the formatted label of the property
+ *
+ * @param property
+ * @return
+ */
+ public static String getLabel(Property property) {
+ if(property.getLabel() == null || property.getLabel().trim().equals("")) {
+ return getLabel(property.getName());
+ }
+
+ return property.getLabel();
+ }
+
+ /**
* @param variableName
* @return
* A formatted version of the given variable name

Back to the top