Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Chen2012-05-14 03:16:41 +0000
committerWilliam Chen2012-05-14 03:16:41 +0000
commitc4bc14d4cdf1a5ebdc02d68f67f41650b9bd9015 (patch)
treedf25b3e97214dcfb73b7533f1ef9452655799819 /target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui
parent8fe4065149508c27544ddfe343104400156b74c2 (diff)
downloadorg.eclipse.tcf-c4bc14d4cdf1a5ebdc02d68f67f41650b9bd9015.tar.gz
org.eclipse.tcf-c4bc14d4cdf1a5ebdc02d68f67f41650b9bd9015.tar.xz
org.eclipse.tcf-c4bc14d4cdf1a5ebdc02d68f67f41650b9bd9015.zip
Target Explorer: Extract a pending-aware label provider to remove the
dependency of Pending class from a column label provider.
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeElementLabelProvider.java13
1 files changed, 2 insertions, 11 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeElementLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeElementLabelProvider.java
index 84eca9133..bff1d03aa 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeElementLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeElementLabelProvider.java
@@ -9,16 +9,15 @@
*******************************************************************************/
package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
-import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
import org.eclipse.tcf.te.runtime.utils.Host;
import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
-import org.eclipse.tcf.te.ui.trees.Pending;
+import org.eclipse.tcf.te.ui.trees.PendingAwareLabelProvider;
/**
* The label provider for the tree column "name".
*/
-public class FSTreeElementLabelProvider extends LabelProvider {
+public class FSTreeElementLabelProvider extends PendingAwareLabelProvider {
// The image provider to provide platform specific images.
private ImageProvider imgProvider;
@@ -43,10 +42,6 @@ public class FSTreeElementLabelProvider extends LabelProvider {
if (element instanceof FSTreeNode) {
return ((FSTreeNode) element).name;
}
- if (element instanceof Pending) {
- Pending pending = (Pending) element;
- return pending.getText();
- }
return super.getText(element);
}
@@ -60,10 +55,6 @@ public class FSTreeElementLabelProvider extends LabelProvider {
FSTreeNode node = (FSTreeNode) element;
return imgProvider.getImage(node);
}
- if (element instanceof Pending) {
- Pending pending = (Pending) element;
- return pending.getImage();
- }
return super.getImage(element);
}
}

Back to the top