Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-10-16 13:55:00 +0000
committerUwe Stieber2012-10-16 13:55:38 +0000
commit8a27bb76aa1857c8fd911453f4a9c5773f4e3807 (patch)
treee5cd93d392b7c99592552430d1c9a155ab1cacb5 /target_explorer
parent1dc75a9c34a5b431c7905afdb5c1c97c7118c1e1 (diff)
downloadorg.eclipse.tcf-8a27bb76aa1857c8fd911453f4a9c5773f4e3807.tar.gz
org.eclipse.tcf-8a27bb76aa1857c8fd911453f4a9c5773f4e3807.tar.xz
org.eclipse.tcf-8a27bb76aa1857c8fd911453f4a9c5773f4e3807.zip
Target Explorer: Locator model listener not invoked if a peerRemoved(...) leads to a cleanup of a static configuration
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/LocatorListener.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/LocatorListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/LocatorListener.java
index f2ac8a12a..d472e2348 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/LocatorListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/listener/LocatorListener.java
@@ -23,6 +23,7 @@ import org.eclipse.tcf.services.ILocator;
import org.eclipse.tcf.te.tcf.core.peers.Peer;
import org.eclipse.tcf.te.tcf.locator.ScannerRunnable;
import org.eclipse.tcf.te.tcf.locator.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.tcf.locator.interfaces.IModelListener;
import org.eclipse.tcf.te.tcf.locator.interfaces.ITracing;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
@@ -39,7 +40,7 @@ import org.eclipse.tcf.te.tcf.locator.nodes.PeerRedirector;
*/
public class LocatorListener implements ILocator.LocatorListener {
// Reference to the parent model
- private final ILocatorModel model;
+ /* default */ final ILocatorModel model;
/**
* Constructor.
@@ -178,7 +179,7 @@ public class LocatorListener implements ILocator.LocatorListener {
if (model != null && id != null) {
// find the corresponding model node to remove
- IPeerModel peerNode = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(id);
+ final IPeerModel peerNode = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(id);
if (peerNode != null) {
IPeer peer = peerNode.getPeer();
String value = peer.getAttributes().get("static.transient"); //$NON-NLS-1$
@@ -229,6 +230,18 @@ public class LocatorListener implements ILocator.LocatorListener {
if (changed) peerNode.setChangeEventsEnabled(true);
peerNode.fireChangeEvent(IPeerModelProperties.PROP_INSTANCE, peer, peerNode.getPeer());
+
+ final IModelListener[] listeners = model.getListener();
+ if (listeners.length > 0) {
+ Protocol.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ for (IModelListener listener : listeners) {
+ listener.locatorModelChanged(model, peerNode, false);
+ }
+ }
+ });
+ }
} else {
// Dynamic peer -> Remove peer model node from the model
model.getService(ILocatorModelUpdateService.class).remove(peerNode);

Back to the top