Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2013-03-08 03:34:15 -0500
committerTobias Schwarz2013-03-08 03:34:15 -0500
commitd7b4a384b0a241fc473f7e58e12fcc2920b4bc33 (patch)
tree7ac0766dd16e87217561e5857639822c521504f2 /target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core
parent4373f5450b71ddc415c7ebcdb33c3e4033abd298 (diff)
downloadorg.eclipse.tcf-d7b4a384b0a241fc473f7e58e12fcc2920b4bc33.tar.gz
org.eclipse.tcf-d7b4a384b0a241fc473f7e58e12fcc2920b4bc33.tar.xz
org.eclipse.tcf-d7b4a384b0a241fc473f7e58e12fcc2920b4bc33.zip
Target Explorer: add label provider delegate for core
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/AttachLaunchManagerDelegate.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/AttachLaunchManagerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/AttachLaunchManagerDelegate.java
index 446e3c8ca..905ec2799 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/AttachLaunchManagerDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/AttachLaunchManagerDelegate.java
@@ -25,6 +25,9 @@ import org.eclipse.tcf.te.launch.core.persistence.launchcontext.LaunchContextsPe
import org.eclipse.tcf.te.launch.core.selection.interfaces.IRemoteSelectionContext;
import org.eclipse.tcf.te.launch.core.selection.interfaces.ISelectionContext;
import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.runtime.services.interfaces.IUIService;
+import org.eclipse.tcf.te.runtime.services.interfaces.delegates.ILabelProviderDelegate;
import org.eclipse.tcf.te.tcf.launch.core.interfaces.IAttachLaunchAttributes;
/**
@@ -134,6 +137,13 @@ public class AttachLaunchManagerDelegate extends DefaultLaunchManagerDelegate {
private String getDefaultLaunchName(IModelNode context) {
if (context != null) {
+ IUIService uiService = ServiceManager.getInstance().getService(context, IUIService.class);
+ if (uiService != null) {
+ ILabelProviderDelegate labelProviderDelegate = uiService.getDelegate(context, ILabelProviderDelegate.class);
+ if (labelProviderDelegate != null) {
+ return labelProviderDelegate.getText(context);
+ }
+ }
return context.getName();
}
return ""; //$NON-NLS-1$

Back to the top