Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/ChildReferenceItemProvider.java3
-rw-r--r--plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/GMFMapEditPlugin.java17
-rw-r--r--plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/LinkMappingItemProvider.java25
-rw-r--r--plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/TopNodeReferenceItemProvider.java3
4 files changed, 42 insertions, 6 deletions
diff --git a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/ChildReferenceItemProvider.java b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/ChildReferenceItemProvider.java
index d88bec27b..4a7acc1bb 100644
--- a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/ChildReferenceItemProvider.java
+++ b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/ChildReferenceItemProvider.java
@@ -162,9 +162,8 @@ public class ChildReferenceItemProvider
if (reference.isSetChild()) {
NodeMapping mapping = reference.getChild();
if (mapping.getDomainMetaElement() != null) {
- result += "(";
+ result += ":";
result += mapping.getDomainMetaElement().getName();
- result += ")";
}
result += "/";
if (mapping.getDiagramNode() != null) {
diff --git a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/GMFMapEditPlugin.java b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/GMFMapEditPlugin.java
index ccfad3b9c..ffc0f24e2 100644
--- a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/GMFMapEditPlugin.java
+++ b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/GMFMapEditPlugin.java
@@ -9,6 +9,8 @@ package org.eclipse.gmf.mappings.provider;
import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.ui.EclipseUIPlugin;
import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gmf.gmfgraph.provider.GMFGraphEditPlugin;
import org.eclipse.gmf.tooldef.provider.GMFToolEditPlugin;
@@ -71,6 +73,21 @@ public final class GMFMapEditPlugin extends EMFPlugin {
return plugin;
}
+ static String getFeatureLabel(EStructuralFeature feature) {
+ StringBuffer sb = new StringBuffer();
+ if (feature.getEContainingClass() != null) {
+ sb.append(feature.getEContainingClass().getName());
+ sb.append('.');
+ }
+ sb.append(feature.getName());
+ EClassifier type = feature.getEType();
+ if (type != null) {
+ sb.append(':');
+ sb.append(type.getName());
+ }
+ return sb.toString();
+ }
+
/**
* The actual implementation of the Eclipse <b>Plugin</b>.
* <!-- begin-user-doc -->
diff --git a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/LinkMappingItemProvider.java b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/LinkMappingItemProvider.java
index 5fd011d4a..74f56d3fc 100644
--- a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/LinkMappingItemProvider.java
+++ b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/LinkMappingItemProvider.java
@@ -267,10 +267,31 @@ public class LinkMappingItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
public String getText(Object object) {
- return getString("_UI_LinkMapping_type");
+ StringBuffer sb = new StringBuffer();
+ LinkMapping mapping = (LinkMapping) object;
+ sb.append('<');
+ if (mapping.getDomainMetaElement() != null) {
+ sb.append(mapping.getDomainMetaElement().getName());
+ }
+ sb.append('{');
+ if (mapping.getSourceMetaFeature() != null) {
+ sb.append(GMFMapEditPlugin.getFeatureLabel(mapping.getSourceMetaFeature()));
+ sb.append('-');
+ sb.append('>');
+ }
+ if (mapping.getLinkMetaFeature() != null) {
+ sb.append(GMFMapEditPlugin.getFeatureLabel(mapping.getLinkMetaFeature()));
+ }
+ sb.append('}');
+ sb.append('/');
+ if (mapping.getDiagramLink() != null) {
+ sb.append(mapping.getDiagramLink().getName());
+ }
+ sb.append('>');
+ return getString("_UI_LinkMapping_type") + ' ' + sb;
}
/**
diff --git a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/TopNodeReferenceItemProvider.java b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/TopNodeReferenceItemProvider.java
index aff950ef6..c7dea6b8a 100644
--- a/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/TopNodeReferenceItemProvider.java
+++ b/plugins/org.eclipse.gmf.map.edit/src/org/eclipse/gmf/mappings/provider/TopNodeReferenceItemProvider.java
@@ -109,9 +109,8 @@ public class TopNodeReferenceItemProvider
if (reference.isSetChild()) {
NodeMapping mapping = reference.getChild();
if (mapping.getDomainMetaElement() != null) {
- result += "(";
+ result += ":";
result += mapping.getDomainMetaElement().getName();
- result += ")";
}
result += "/";
if (mapping.getDiagramNode() != null) {

Back to the top