Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-07-10 04:48:26 -0400
committerUwe Stieber2013-07-10 04:48:26 -0400
commitf02b03ca0ec5b1055c5896cbadb9f2b2ece2b0bb (patch)
treef2ecd2b7d4a1090451e6c6e21e8edf99868d544f /target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf
parent1463305593bde20a65523d3fbd91cc34b803c522 (diff)
downloadorg.eclipse.tcf-f02b03ca0ec5b1055c5896cbadb9f2b2ece2b0bb.tar.gz
org.eclipse.tcf-f02b03ca0ec5b1055c5896cbadb9f2b2ece2b0bb.tar.xz
org.eclipse.tcf-f02b03ca0ec5b1055c5896cbadb9f2b2ece2b0bb.zip
Target Explorer: Fix remote file system issues
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/tabbed/BaseTitledSection.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/BaseTitledSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/BaseTitledSection.java
index e5bc10cd4..7d3e43e44 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/BaseTitledSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/BaseTitledSection.java
@@ -13,6 +13,8 @@ import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
@@ -61,8 +63,13 @@ public abstract class BaseTitledSection extends AbstractPropertySection implemen
}
Assert.isTrue(selection instanceof IStructuredSelection);
Object input = ((IStructuredSelection) selection).getFirstElement();
- if (input instanceof IPeerModelProvider) {
- this.provider = (IPeerModelProvider) input;
+
+ IPeerModelProvider provider = input instanceof IPeerModelProvider ? (IPeerModelProvider) input : null;
+ if (provider == null) provider = input instanceof IAdaptable ? (IPeerModelProvider)((IAdaptable)input).getAdapter(IPeerModelProvider.class) : null;
+ if (provider == null) provider = (IPeerModelProvider)Platform.getAdapterManager().getAdapter(input, IPeerModelProvider.class);
+
+ if (provider != null) {
+ this.provider = provider;
IPeerModel peerNode = this.provider.getPeerModel();
this.viewerInput = (IPropertyChangeProvider) peerNode.getAdapter(IPropertyChangeProvider.class);
if (this.viewerInput != null) {

Back to the top