Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlgoubet2011-05-11 15:29:02 +0000
committerlgoubet2011-05-11 15:29:02 +0000
commit312dab6231ca8e7d68b5ca6b70d266afa992a491 (patch)
treed9c5a17bcda04509071dcbcb447d9310fa86e8a4
parent1311b21c117d9aa892c3f95a1fc9f35ce0218f00 (diff)
downloadorg.eclipse.emf.compare-312dab6231ca8e7d68b5ca6b70d266afa992a491.tar.gz
org.eclipse.emf.compare-312dab6231ca8e7d68b5ca6b70d266afa992a491.tar.xz
org.eclipse.emf.compare-312dab6231ca8e7d68b5ca6b70d266afa992a491.zip
Make sure that the structure viewer delegates to the adapter factory
if AbstractDiffExtension#getText returns null.
-rw-r--r--plugins/org.eclipse.emf.compare.ui/src/org/eclipse/emf/compare/ui/viewer/structure/ModelStructureMergeViewer.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/org.eclipse.emf.compare.ui/src/org/eclipse/emf/compare/ui/viewer/structure/ModelStructureMergeViewer.java b/plugins/org.eclipse.emf.compare.ui/src/org/eclipse/emf/compare/ui/viewer/structure/ModelStructureMergeViewer.java
index 55e8ab0a6..e78e104d6 100644
--- a/plugins/org.eclipse.emf.compare.ui/src/org/eclipse/emf/compare/ui/viewer/structure/ModelStructureMergeViewer.java
+++ b/plugins/org.eclipse.emf.compare.ui/src/org/eclipse/emf/compare/ui/viewer/structure/ModelStructureMergeViewer.java
@@ -399,14 +399,13 @@ public class ModelStructureMergeViewer extends TreeViewer {
String text = null;
if (object instanceof AbstractDiffExtension) {
text = ((AbstractDiffExtension)object).getText();
- } else {
- if (object instanceof IFile) {
- text = ((IFile)object).getName();
- } else if (object instanceof Resource) {
- text = ((Resource)object).getURI().lastSegment();
- } else {
- text = adapterProvider.getText(object);
- }
+ } else if (object instanceof IFile) {
+ text = ((IFile)object).getName();
+ } else if (object instanceof Resource) {
+ text = ((Resource)object).getURI().lastSegment();
+ }
+ if (text == null || "".equals(text)) { //$NON-NLS-1$
+ text = adapterProvider.getText(object);
}
return text;
}

Back to the top