Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2014-09-15 02:10:38 -0400
committerTobias Schwarz2014-09-15 02:11:20 -0400
commit9cf80b30c10542abcfd3f1f3a7fcc7beff1527dc (patch)
treeb078e7e5ac856f13099a880c27477c493daf9cc9
parentacda32b53e3a90ecd21207dae9fb87c60f862f25 (diff)
downloadorg.eclipse.tcf-9cf80b30c10542abcfd3f1f3a7fcc7beff1527dc.tar.gz
org.eclipse.tcf-9cf80b30c10542abcfd3f1f3a7fcc7beff1527dc.tar.xz
org.eclipse.tcf-9cf80b30c10542abcfd3f1f3a7fcc7beff1527dc.zip
Target Explorer: handle connect state correctly
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/plugin.xml1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/TreeContentProvider.java34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/interfaces/IFileSystemUIDelegate.java77
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeElementLabelProvider.java12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/pages/FSExplorerEditorPage.java35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/pages/FSExplorerEventListener.java96
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.java26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.properties2
9 files changed, 284 insertions, 2 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 f3f2d8476..1a4a500f6 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
@@ -1678,6 +1678,7 @@
<adapter type="org.eclipse.tcf.te.ui.interfaces.ILazyLoader"/>
<adapter type="org.eclipse.tcf.te.ui.interfaces.ISearchable"/>
<adapter type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProvider"/>
+ <adapter type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode"/>
</factory>
<factory
adaptableType="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode"
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/TreeContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/TreeContentProvider.java
index 583432a41..f6de7bfd6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/TreeContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/TreeContentProvider.java
@@ -19,11 +19,16 @@ import java.util.Set;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.tcf.te.core.interfaces.IConnectable;
import org.eclipse.tcf.te.core.interfaces.IPropertyChangeProvider;
+import org.eclipse.tcf.te.runtime.model.MessageModelNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
import org.eclipse.tcf.te.ui.trees.CommonViewerListener;
import org.eclipse.tcf.te.ui.trees.Pending;
@@ -46,6 +51,9 @@ public abstract class TreeContentProvider implements ITreeContentProvider, Prope
// The pending nodes and their direct parents.
private Map<Object, Pending> pendings;
+ // The target's peer model.
+ private IPeerNode peerNode;
+
/**
* Create a tree content provider.
*/
@@ -139,8 +147,17 @@ public abstract class TreeContentProvider implements ITreeContentProvider, Prope
Assert.isTrue(viewer instanceof TreeViewer);
this.viewer = (TreeViewer) viewer;
this.commonViewerListener = new CommonViewerListener(this.viewer, this);
+ peerNode = getPeerNode(newInput);
}
+ protected IPeerNode getPeerNode(Object input) {
+ IPeerNode peerNode = input instanceof IPeerNode ? (IPeerNode)input : null;
+ if (peerNode == null && input instanceof IAdaptable) {
+ peerNode = (IPeerNode)((IAdaptable)input).getAdapter(IPeerNode.class);
+ }
+ return peerNode;
+ }
+
/**
* Install a property change listener to the specified element.
*
@@ -170,6 +187,21 @@ public abstract class TreeContentProvider implements ITreeContentProvider, Prope
*/
@Override
public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
+ if (peerNode != null && peerNode.getConnectState() == IConnectable.STATE_CONNECTED) {
+ return getChildren(inputElement);
+ }
+
+ String message = null;
+ if (peerNode != null) {
+ if (peerNode.getConnectState() == IConnectable.STATE_CONNECTION_LOST ||
+ peerNode.getConnectState() == IConnectable.STATE_CONNECTION_RECOVERING) {
+ message = Messages.getStringDelegated(peerNode, "FileSystem_ContentProvider_connectionLost"); //$NON-NLS-1$
+ }
+ if (message == null) {
+ message = Messages.getStringDelegated(peerNode, "FileSystem_ContentProvider_notConnected"); //$NON-NLS-1$
+ }
+ }
+
+ return new Object[] { new MessageModelNode(message != null ? message : Messages.ContentProvider_notConnected, IStatus.INFO, false) };
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/interfaces/IFileSystemUIDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/interfaces/IFileSystemUIDelegate.java
new file mode 100644
index 000000000..8676bfe7a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/interfaces/IFileSystemUIDelegate.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.ui.interfaces;
+
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
+import org.eclipse.tcf.te.ui.interfaces.ISearchable;
+
+
+/**
+ * Filesystem UI delegate.
+ */
+public interface IFileSystemUIDelegate {
+
+ /**
+ * Returns the message for the given key.
+ *
+ * @param key The message key. Must not be <code>null</code>.
+ * @return The message or <code>null</code>.
+ */
+ public String getMessage(String key);
+
+ /**
+ * Returns the process monitor table column text for the given column
+ * based on the given original text.
+ *
+ * @param context The context. Must not be <code>null</code>.
+ * @param columnId The column id. Must not be <code>null</code>.
+ * @param text The original text to show in the column fetched from the label provider, or <code>null</code>.
+ *
+ * @return The new text to show in the column or <code>null</code>.
+ */
+ public String getText(Object context, String columnId, String text);
+
+ /**
+ * Returns if or if not the given column is active for the given context.
+ *
+ * @param context The context. Must not be <code>null</code>.
+ * @param columnId The column id. Must not be <code>null</code>.
+ *
+ * @return <code>True</code> if the column is active for the given context, <code>false</code> otherwise.
+ */
+ public boolean isColumnActive(Object context, String columnId);
+
+ /**
+ * Returns if or if not the given filter is active for the given context.
+ *
+ * @param context The context. Must not be <code>null</code>.
+ * @param filterId The filter id. Must not be <code>null</code>.
+ *
+ * @return <code>True</code> if the filter is active for the given context, <code>false</code> otherwise.
+ */
+ public boolean isFilterActive(Object context, String filterId);
+
+ /**
+ * Returns the list of searchables to use to find processes in the
+ * process monitor.
+ *
+ * @param node The peer model node context. Must not be <code>null</code>.
+ * @return The list of searchables to use or <code>null</code>.
+ */
+ public ISearchable[] getSearchables(IPeerNode node);
+
+ /**
+ * Returns the number of levels to auto expand.
+ * If the method returns <code>0</code>, no auto expansion will happen
+ *
+ * @return The number of levels to auto expand or <code>0</code>.
+ */
+ public int getAutoExpandLevel();
+}
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 6d0895b18..6f2cf59af 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
@@ -100,6 +100,9 @@ public class FSTreeNodeAdapterFactory implements IAdapterFactory {
else if (adapterType == IPeerNodeProvider.class) {
return new FSTreeNodePeerNodeProvider(node);
}
+ else if (adapterType == IPeerNode.class) {
+ return new FSTreeNodePeerNodeProvider(node).getPeerNode();
+ }
else if (adapterType == ISearchable.class) {
return new FSTreeNodeSearchable(node);
}
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 d42c75291..6c3071f09 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
@@ -10,8 +10,10 @@
package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
import org.eclipse.tcf.te.runtime.utils.Host;
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.ui.trees.PendingAwareLabelProvider;
/**
@@ -20,7 +22,7 @@ import org.eclipse.tcf.te.ui.trees.PendingAwareLabelProvider;
public class FSTreeElementLabelProvider extends PendingAwareLabelProvider {
// The image provider to provide platform specific images.
private ImageProvider imgProvider;
-
+
/**
* Constructor.
*/
@@ -42,6 +44,10 @@ public class FSTreeElementLabelProvider extends PendingAwareLabelProvider {
if (element instanceof FSTreeNode) {
return ((FSTreeNode) element).name;
}
+ else if (element instanceof IModelNode) {
+ return ((IModelNode)element).getName();
+ }
+
return super.getText(element);
}
@@ -55,6 +61,10 @@ public class FSTreeElementLabelProvider extends PendingAwareLabelProvider {
FSTreeNode node = (FSTreeNode) element;
return imgProvider.getImage(node);
}
+ else if (element instanceof IModelNode) {
+ return UIPlugin.getImage(((IModelNode)element).getImageId());
+ }
+
return super.getImage(element);
}
}
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 77f665422..60f12d207 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,16 +9,35 @@
*******************************************************************************/
package org.eclipse.tcf.te.tcf.filesystem.ui.internal.pages;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.tcf.te.runtime.events.ChangeEvent;
+import org.eclipse.tcf.te.runtime.events.EventManager;
import org.eclipse.tcf.te.tcf.filesystem.core.model.ModelManager;
import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
import org.eclipse.tcf.te.tcf.ui.editor.AbstractTreeViewerExplorerEditorPage;
+import org.eclipse.tcf.te.ui.trees.TreeControl;
/**
* The editor page for the file system explorer.
*/
public class FSExplorerEditorPage extends AbstractTreeViewerExplorerEditorPage {
+ // The event listener instance
+ private FSExplorerEventListener listener = null;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractTreeViewerExplorerEditorPage#dispose()
+ */
+ @Override
+ public void dispose() {
+ if (listener != null) {
+ EventManager.getInstance().removeEventListener(listener);
+ listener = null;
+ }
+ super.dispose();
+ }
+
/*
* (non-Javadoc)
* @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractTreeViewerExplorerEditorPage#getDoubleClickCommandId()
@@ -68,4 +87,20 @@ public class FSExplorerEditorPage extends AbstractTreeViewerExplorerEditorPage {
}
return peerNode != null ? ModelManager.getRuntimeModel(peerNode).getRoot() : null;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.editor.pages.AbstractTreeViewerExplorerEditorPage#doCreateTreeControl()
+ */
+ @Override
+ protected TreeControl doCreateTreeControl() {
+ TreeControl treeControl = super.doCreateTreeControl();
+ Assert.isNotNull(treeControl);
+
+ if (listener == null) {
+ listener = new FSExplorerEventListener(treeControl);
+ EventManager.getInstance().addEventListener(listener, ChangeEvent.class);
+ }
+
+ return treeControl;
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/pages/FSExplorerEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/pages/FSExplorerEventListener.java
new file mode 100644
index 000000000..d53464870
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/pages/FSExplorerEventListener.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.pages;
+
+import java.util.EventObject;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.tcf.te.core.interfaces.IConnectable;
+import org.eclipse.tcf.te.runtime.events.ChangeEvent;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.runtime.IRuntimeModel;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.ModelManager;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProperties;
+import org.eclipse.tcf.te.ui.events.AbstractEventListener;
+import org.eclipse.tcf.te.ui.trees.TreeControl;
+
+/**
+ * Filesystem page event listener implementation.
+ */
+public class FSExplorerEventListener extends AbstractEventListener {
+ // Reference to the parent tree control
+ /* default */ final TreeControl treeControl;
+
+ /**
+ * Constructor.
+ *
+ * @param treeControl The parent tree control. Must not be <code>null</code>.
+ */
+ public FSExplorerEventListener(TreeControl treeControl) {
+ Assert.isNotNull(treeControl);
+ this.treeControl = treeControl;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
+ */
+ @Override
+ public void eventFired(EventObject event) {
+ if (event instanceof ChangeEvent) {
+ final ChangeEvent changeEvent = (ChangeEvent)event;
+ final Object source = changeEvent.getSource();
+
+ if (treeControl.getViewer() != null) {
+ // Property changes for the runtime model refreshes the whole tree.
+ if (source instanceof IRuntimeModel) {
+ treeControl.getViewer().refresh();
+ }
+
+ // Property changes for individual context nodes refreshes the node only
+ else if (source instanceof FSTreeNode) {
+ if ("expanded".equals(changeEvent.getEventId())) { //$NON-NLS-1$
+ // Expansion state of the node changed.
+ boolean expanded = ((Boolean)changeEvent.getNewValue()).booleanValue();
+ // Update the nodes expansion state
+ ((TreeViewer)treeControl.getViewer()).setExpandedState(source, expanded);
+ } else {
+ ((TreeViewer)treeControl.getViewer()).refresh(source, true);
+ }
+ }
+
+ else if (source instanceof IPeerNode && source == getPeerNode()) {
+ if (IPeerNodeProperties.PROP_CONNECT_STATE.equals(changeEvent.getEventId())) {
+ // Peer node connect state changed to connected
+ if (changeEvent.getNewValue().equals(Integer.valueOf(IConnectable.STATE_CONNECTED))) {
+ // Get the new runtime model
+ final IRuntimeModel model = ModelManager.getRuntimeModel(getPeerNode());
+ // Update the tree viewer input element
+ treeControl.getViewer().setInput(model.getRoot());
+ }
+ // Trigger a refresh on the whole viewer to show the "Please connect ..." text
+ treeControl.getViewer().refresh();
+ }
+ }
+ }
+ }
+ }
+
+ protected IPeerNode getPeerNode() {
+ Object element = treeControl.getViewer().getInput();
+ IPeerNode peerNode = element instanceof IPeerNode ? (IPeerNode)element : null;
+ if (peerNode == null && element instanceof IAdaptable) {
+ peerNode = (IPeerNode)((IAdaptable)element).getAdapter(IPeerNode.class);
+ }
+ return peerNode;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.java
index 2ba9008de..f8db185ea 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.java
@@ -13,6 +13,9 @@ package org.eclipse.tcf.te.tcf.filesystem.ui.nls;
import java.lang.reflect.Field;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.runtime.services.interfaces.IUIService;
+import org.eclipse.tcf.te.tcf.filesystem.ui.interfaces.IFileSystemUIDelegate;
/**
* File System plug-in externalized strings management.
@@ -65,6 +68,26 @@ public class Messages extends NLS {
return null;
}
+
+ /**
+ * Returns the corresponding string for the given externalized strings key via
+ * the {@link IFileSystemUIDelegate}.
+ *
+ * @param context The context or <code>null</code>.
+ * @param key The externalized strings key or <code>null</code>.
+ *
+ * @return The corresponding string or <code>null</code>.
+ */
+ public static String getStringDelegated(Object context, String key) {
+ if (key != null) {
+ IUIService service = ServiceManager.getInstance().getService(context, IUIService.class);
+ IFileSystemUIDelegate delegate = service != null ? service.getDelegate(context, IFileSystemUIDelegate.class) : null;
+ return delegate != null ? delegate.getMessage(key) : null;
+ }
+
+ return null;
+ }
+
public static String FSFolderSelectionDialog_MoveDialogMessage;
public static String FSFolderSelectionDialog_MoveDialogTitle;
public static String FSFolderSelectionDialog_Refresh_menu;
@@ -224,4 +247,7 @@ public class Messages extends NLS {
public static String TreeViewerSearchDialog_GrpOptionsText;
public static String TreeViewerSearchDialog_BtnCaseText;
public static String TreeViewerSearchDialog_BtnPreciseText;
+
+ public static String ContentProvider_notConnected;
+
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.properties
index 8c805fe13..17171148a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.properties
@@ -167,3 +167,5 @@ TreeViewerSearchDialog_LblCancelText=Find:
TreeViewerSearchDialog_GrpOptionsText=Options
TreeViewerSearchDialog_BtnCaseText=Case sensitive
TreeViewerSearchDialog_BtnPreciseText=Precise matching
+
+ContentProvider_notConnected=Please connect to see the filesystem on the target.

Back to the top