Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2014-11-12 10:41:09 +0000
committerTobias Schwarz2014-11-12 10:41:09 +0000
commit0f2b147550f9be59472e7eb6eb12de075f2c65be (patch)
tree0f996ff725db239a3bb54b6f7dd80fd934e2587d /target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui
parent646b5df21ae03ffa94c836da532f65a3ceeb86d0 (diff)
downloadorg.eclipse.tcf-0f2b147550f9be59472e7eb6eb12de075f2c65be.tar.gz
org.eclipse.tcf-0f2b147550f9be59472e7eb6eb12de075f2c65be.tar.xz
org.eclipse.tcf-0f2b147550f9be59472e7eb6eb12de075f2c65be.zip
SM: add command line to properties view, fix problem after disconnect of
general connection
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/controls/TreeContentProvider.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/pages/FSExplorerEventListener.java5
2 files changed, 9 insertions, 2 deletions
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 f6de7bfd6..7a8dfd508 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
@@ -164,8 +164,10 @@ public abstract class TreeContentProvider implements ITreeContentProvider, Prope
* @param provider The element node.
*/
private void installPropertyChangeListener(IPropertyChangeProvider provider) {
- if (provider != null && !providers.contains(provider) && commonViewerListener != null) {
- provider.addPropertyChangeListener(commonViewerListener);
+ if (provider != null && !providers.contains(provider)) {
+ if (commonViewerListener != null) {
+ provider.addPropertyChangeListener(commonViewerListener);
+ }
provider.addPropertyChangeListener(this);
providers.add(provider);
}
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
index aa2757c65..909eb167e 100644
--- 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
@@ -16,6 +16,7 @@ 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.runtime.events.EventManager;
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;
@@ -51,6 +52,10 @@ public class FSExplorerEventListener extends AbstractEventListener {
final Object source = changeEvent.getSource();
if (treeControl.getViewer() != null) {
+ if (treeControl.getViewer().getControl() == null || treeControl.getViewer().getControl().isDisposed()) {
+ EventManager.getInstance().removeEventListener(this);
+ return;
+ }
// Property changes for the runtime model refreshes the whole tree.
if (source instanceof IRuntimeModel) {
treeControl.getViewer().refresh();

Back to the top