Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Chen2012-06-11 08:35:38 +0000
committerWilliam Chen2012-06-11 08:37:36 +0000
commit79aaf307c16adb7b8c7f09eaf2db3f96cbd4dc7d (patch)
tree60769af7f1e3bd52bb82d864eee823ef7a842786 /target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui
parent0347c4674688f90fe1ca5d56c6fd5cc376676d5a (diff)
downloadorg.eclipse.tcf-79aaf307c16adb7b8c7f09eaf2db3f96cbd4dc7d.tar.gz
org.eclipse.tcf-79aaf307c16adb7b8c7f09eaf2db3f96cbd4dc7d.tar.xz
org.eclipse.tcf-79aaf307c16adb7b8c7f09eaf2db3f96cbd4dc7d.zip
Target Explorer: Changes of Quick Filter based on the feedbacks
received.
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/plugin.xml21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/NavigatorContentProvider.java10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/LabelProviderUpdateDaemon.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/pages/FSExplorerEditorPage.java12
5 files changed, 33 insertions, 18 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/plugin.xml
index 5047836a3..242a51852 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/plugin.xml
@@ -537,20 +537,6 @@
label="%command.search.label"
style="push">
</command>
- <separator
- name="group.filter"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.tcf.te.ui.views.command.quickfilter"
- label="%command.filter.label"
- style="push">
- </command>
- <command
- commandId="org.eclipse.tcf.te.ui.views.command.resetfilter"
- label="%command.reset.label"
- style="push">
- </command>
<separator name="group.properties" visible="true"/>
<command
commandId="org.eclipse.ui.file.properties"
@@ -1924,6 +1910,9 @@
<adapter
type="org.eclipse.tcf.te.ui.interfaces.ILazyLoader">
</adapter>
+ <adapter
+ type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ </adapter>
</factory>
<factory
adaptableType="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"
@@ -2121,7 +2110,9 @@
visibleInUI="true">
<activation>
<with variable="input">
- <test property="org.eclipse.tcf.te.tcf.filesystem.propertytester.peer.isWindows"/>
+ <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ <test property="org.eclipse.tcf.te.tcf.filesystem.propertytester.peer.isWindows" />
+ </adapt>
</with>
</activation>
</filter>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/NavigatorContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/NavigatorContentProvider.java
index c123f968c..ba500863c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/NavigatorContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/NavigatorContentProvider.java
@@ -34,7 +34,15 @@ public abstract class NavigatorContentProvider extends TreeContentProvider impl
public Object getParent(Object element) {
if (element instanceof AbstractTreeNode) {
AbstractTreeNode node = (AbstractTreeNode) element;
- return node.getParent() != null ? node.getParent() : (isRootNodeVisible()? node.peerNode : null);
+ AbstractTreeNode parent = node.getParent();
+ if (parent != null) {
+ if (parent.isSystemRoot()) {
+ if (isRootNodeVisible()) return parent;
+ return null;
+ }
+ return parent;
+ }
+ if (isRootNodeVisible()) return node.peerNode;
}
return null;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java
index ce12fb273..686d89aee 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java
@@ -19,6 +19,7 @@ import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
import org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.FSTreeElementLabelProvider;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.ui.interfaces.ILazyLoader;
import org.eclipse.ui.IActionFilter;
import org.eclipse.ui.IPersistableElement;
@@ -62,6 +63,9 @@ public class FSTreeNodeAdapterFactory implements IAdapterFactory {
else if(adapterType == ILazyLoader.class) {
return new FSTreeNodeLoader(node);
}
+ else if(adapterType == IPeerModel.class) {
+ return node.getPeerModel();
+ }
}
return null;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/LabelProviderUpdateDaemon.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/LabelProviderUpdateDaemon.java
index b11891d16..de1a06158 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/LabelProviderUpdateDaemon.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/LabelProviderUpdateDaemon.java
@@ -29,7 +29,7 @@ import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tcf.te.core.interfaces.IViewerInput;
+import org.eclipse.tcf.te.core.interfaces.IPropertyChangeProvider;
import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
@@ -282,7 +282,7 @@ public class LabelProviderUpdateDaemon extends Thread {
*/
private void sendNotification(FSTreeNode node, String key, ImageDescriptor oldImg, ImageDescriptor newImg) {
if (node.peerNode != null) {
- IViewerInput viewerInput = (IViewerInput) node.peerNode.getAdapter(IViewerInput.class);
+ IPropertyChangeProvider viewerInput = (IPropertyChangeProvider) node.peerNode.getAdapter(IPropertyChangeProvider.class);
viewerInput.firePropertyChange(new PropertyChangeEvent(node, key, oldImg, newImg));
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/pages/FSExplorerEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/pages/FSExplorerEditorPage.java
index 74099e68d..ed76450c4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/pages/FSExplorerEditorPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/pages/FSExplorerEditorPage.java
@@ -9,7 +9,9 @@
*******************************************************************************/
package org.eclipse.tcf.te.tcf.filesystem.ui.internal.pages;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSModel;
import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.ui.views.editor.pages.TreeViewerExplorerEditorPage;
/**
* The editor page for the file system explorer.
@@ -51,4 +53,14 @@ public class FSExplorerEditorPage extends TreeViewerExplorerEditorPage {
protected String getContextHelpId() {
return "org.eclipse.tcf.te.tcf.filesystem.FSExplorerEditorPage"; //$NON-NLS-1$
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.TreeViewerExplorerEditorPage#getViewerInput()
+ */
+ @Override
+ protected Object getViewerInput() {
+ IPeerModel peerModel = (IPeerModel) getEditorInputNode();
+ return FSModel.getFSModel(peerModel).getRoot();
+ }
}

Back to the top