Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-06-15 07:10:42 +0000
committerUwe Stieber2012-06-15 07:10:42 +0000
commitf8337021de49b9b70d8a32bb22d7bb4d1d5837fe (patch)
treee8de50be016c7a0f51394be84cd315ebfbe76947 /target_explorer/plugins
parent16c1a1d886ea7cb2a09226c641fcc8712ac4d2d9 (diff)
downloadorg.eclipse.tcf-f8337021de49b9b70d8a32bb22d7bb4d1d5837fe.tar.gz
org.eclipse.tcf-f8337021de49b9b70d8a32bb22d7bb4d1d5837fe.tar.xz
org.eclipse.tcf-f8337021de49b9b70d8a32bb22d7bb4d1d5837fe.zip
Target Explorer: Change context selector control back to a flat list
Diffstat (limited to 'target_explorer/plugins')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/launchcontext/ContextSelectorControl.java42
1 files changed, 4 insertions, 38 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/launchcontext/ContextSelectorControl.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/launchcontext/ContextSelectorControl.java
index c0b49b183..9d1d9f748 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/launchcontext/ContextSelectorControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/launchcontext/ContextSelectorControl.java
@@ -12,51 +12,17 @@ package org.eclipse.tcf.te.tcf.launch.ui.remote.app.launchcontext;
import org.eclipse.jface.dialogs.IDialogPage;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.tcf.te.launch.ui.tabs.launchcontext.AbstractContextSelectorControl;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
import org.eclipse.tcf.te.tcf.ui.navigator.ContentProviderDelegate;
import org.eclipse.tcf.te.tcf.ui.navigator.LabelProviderDelegate;
-import org.eclipse.tcf.te.ui.views.interfaces.ICategory;
-import org.eclipse.tcf.te.ui.views.interfaces.IRoot;
-import org.eclipse.tcf.te.ui.views.internal.ViewRoot;
/**
* Locator model launch context selector control.
*/
-@SuppressWarnings("restriction")
public class ContextSelectorControl extends AbstractContextSelectorControl {
- protected static class ContentProvider extends ContentProviderDelegate {
- private ITreeContentProvider catContentProvider = new org.eclipse.tcf.te.ui.views.navigator.ContentProviderDelegate();
- @Override
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof IRoot) {
- return catContentProvider.getElements(inputElement);
- }
- return super.getElements(inputElement);
- }
- }
-
- protected static class LabelProvider extends LabelProviderDelegate {
- private ILabelProvider catLabelProvider = new org.eclipse.tcf.te.ui.views.navigator.LabelProviderDelegate();
- @Override
- public String getText(Object element) {
- if (element instanceof ICategory) {
- return catLabelProvider.getText(element);
- }
- return super.getText(element);
- }
- @Override
- public Image getImage(Object element) {
- if (element instanceof ICategory) {
- return catLabelProvider.getImage(element);
- }
- return super.getImage(element);
- }
- }
/**
* Constructor.
@@ -71,7 +37,7 @@ public class ContextSelectorControl extends AbstractContextSelectorControl {
*/
@Override
protected Object getInitialViewerInput() {
- return ViewRoot.getInstance();
+ return Model.getModel();
}
/* (non-Javadoc)
@@ -79,8 +45,8 @@ public class ContextSelectorControl extends AbstractContextSelectorControl {
*/
@Override
protected void doConfigureTreeContentAndLabelProvider(TreeViewer viewer) {
- viewer.setContentProvider(new ContentProvider());
- LabelProvider labelProvider = new LabelProvider();
+ viewer.setContentProvider(new ContentProviderDelegate());
+ LabelProviderDelegate labelProvider = new LabelProviderDelegate();
viewer.setLabelProvider(new DecoratingLabelProvider(labelProvider, labelProvider));
}
}

Back to the top