Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikaël Barbero2013-01-25 11:28:48 -0500
committerMikaël Barbero2013-01-25 11:28:48 -0500
commit74f23694c564cef893309ca87d24467d6d19e338 (patch)
tree69508ca9f9d95fcb0e2f4ee9c2aab0a6f03bd83a
parentc4473192453ab3bb8a4f8370645b00b01f30bfe1 (diff)
downloadorg.eclipse.emf.compare-74f23694c564cef893309ca87d24467d6d19e338.tar.gz
org.eclipse.emf.compare-74f23694c564cef893309ca87d24467d6d19e338.tar.xz
org.eclipse.emf.compare-74f23694c564cef893309ca87d24467d6d19e338.zip
handle null styled string from IItemStyledLabelProvider
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewerLabelProvider.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewerLabelProvider.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewerLabelProvider.java
index bfb6df4b1..2d4fde5a8 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewerLabelProvider.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewerLabelProvider.java
@@ -103,7 +103,12 @@ class EMFCompareStructureMergeViewerLabelProvider extends AdapterFactoryLabelPro
final StyledString ret;
if (element instanceof Adapter) {
Notifier target = ((Adapter)element).getTarget();
- ret = getStyledText(getAdapterFactory(), target);
+ StyledString styledText = getStyledText(getAdapterFactory(), target);
+ if (styledText == null) {
+ ret = new StyledString(super.getText(target));
+ } else {
+ ret = styledText;
+ }
} else if (element instanceof DifferenceGroup) {
ret = new StyledString(((DifferenceGroup)element).getName());
} else {

Back to the top