Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2014-08-12 15:52:42 +0000
committerElena Laskavaia2014-08-12 18:04:15 +0000
commit51f7d9c82920241a308e270a1c8795d1acc393fd (patch)
tree66493e0a7a3c1749fd75d9dfd33ebb633298dc27
parentc1ca67ed34b3d6bcde2feda798b8bdc68456abe8 (diff)
downloadorg.eclipse.cdt-51f7d9c82920241a308e270a1c8795d1acc393fd.tar.gz
org.eclipse.cdt-51f7d9c82920241a308e270a1c8795d1acc393fd.tar.xz
org.eclipse.cdt-51f7d9c82920241a308e270a1c8795d1acc393fd.zip
Launch Bar - label provider for config selector
If provider does not return image or text, use default provider Change-Id: I20bca6e5ef577f4e227d5e567820ba8d004cb85a Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com> Reviewed-on: https://git.eclipse.org/r/31447 Tested-by: Hudson CI
-rw-r--r--launch/org.eclipse.cdt.launchbar.ui/src/org/eclipse/cdt/launchbar/ui/internal/controls/ConfigSelector.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/launch/org.eclipse.cdt.launchbar.ui/src/org/eclipse/cdt/launchbar/ui/internal/controls/ConfigSelector.java b/launch/org.eclipse.cdt.launchbar.ui/src/org/eclipse/cdt/launchbar/ui/internal/controls/ConfigSelector.java
index bbb320269c2..9181202404f 100644
--- a/launch/org.eclipse.cdt.launchbar.ui/src/org/eclipse/cdt/launchbar/ui/internal/controls/ConfigSelector.java
+++ b/launch/org.eclipse.cdt.launchbar.ui/src/org/eclipse/cdt/launchbar/ui/internal/controls/ConfigSelector.java
@@ -110,7 +110,9 @@ public class ConfigSelector extends CSelector {
ILaunchDescriptor configDesc = (ILaunchDescriptor)element;
ILabelProvider labelProvider = uiManager.getLabelProvider(configDesc);
if (labelProvider != null) {
- return labelProvider.getImage(element);
+ Image img = labelProvider.getImage(element);
+ if (img != null)
+ return img;
}
}
return defaultProvider.getImage(element);
@@ -123,7 +125,9 @@ public class ConfigSelector extends CSelector {
ILaunchDescriptor configDesc = (ILaunchDescriptor)element;
ILabelProvider labelProvider = uiManager.getLabelProvider(configDesc);
if (labelProvider != null) {
- return labelProvider.getText(element);
+ String text = labelProvider.getText(element);
+ if (text != null)
+ return text;
}
}
return defaultProvider.getText(element);

Back to the top