Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-04-17 05:05:31 -0400
committerUwe Stieber2013-04-17 05:05:31 -0400
commitb9b1be06adb5d5e7cdc8c41ff5754fab156962c0 (patch)
treee11704a4a399a04edc7da395e12c53f92c2dc17d /target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf
parenteda8cb286354d02a4eab220bf634022be2a9302f (diff)
downloadorg.eclipse.tcf-b9b1be06adb5d5e7cdc8c41ff5754fab156962c0.tar.gz
org.eclipse.tcf-b9b1be06adb5d5e7cdc8c41ff5754fab156962c0.tar.xz
org.eclipse.tcf-b9b1be06adb5d5e7cdc8c41ff5754fab156962c0.zip
Target Explorer: Extended service manager to access a service by id too
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionContentProvider.java26
1 files changed, 20 insertions, 6 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionContentProvider.java
index 14a54e51b..f0e856917 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionContentProvider.java
@@ -28,6 +28,7 @@ import org.eclipse.tcf.te.runtime.services.ServiceManager;
import org.eclipse.tcf.te.runtime.services.interfaces.IUIService;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.ui.tables.properties.NodePropertiesTableTableNode;
+import org.eclipse.tcf.te.ui.views.extensions.LabelProviderDelegateExtensionPointManager;
import org.eclipse.ui.forms.widgets.Section;
@@ -88,13 +89,26 @@ public class PeerGeneralSectionContentProvider implements IStructuredContentProv
if (name.endsWith(".silent") || name.contains(".transient")) continue; //$NON-NLS-1$ //$NON-NLS-2$
// Create the properties node
NodePropertiesTableTableNode propertiesNode = new NodePropertiesTableTableNode(name, entry.getValue() != null ? entry.getValue().toString() : ""); //$NON-NLS-1$
- // Check the label provider if the value to show is replaced
- if (provider != null) {
- String text = provider.getText(propertiesNode);
- if (text != null && !"".equals(text)) { //$NON-NLS-1$
- propertiesNode = new NodePropertiesTableTableNode(name, text);
- }
+
+ // Possible replacement for the node properties table table node value
+ String text = null;
+
+ // Get the label provider delegate for the input element
+ ILabelProvider[] delegates = LabelProviderDelegateExtensionPointManager.getInstance().getDelegates(inputElement, false);
+ if (delegates != null && delegates.length > 0) {
+ text = delegates[0].getText(propertiesNode);
+ }
+
+ // Fallback to the label provider
+ if (text == null && provider != null) {
+ text = provider.getText(propertiesNode);
+ }
+
+ // Replace the node properties table table node value
+ if (text != null && !"".equals(text)) { //$NON-NLS-1$
+ propertiesNode = new NodePropertiesTableTableNode(name, text);
}
+
// Add the properties node
nodes.add(propertiesNode);
}

Back to the top