Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-12-05 04:50:34 -0500
committerUwe Stieber2013-12-05 04:50:34 -0500
commit60d05b7fac6c9bf3d197430bdfbd4921a689ef51 (patch)
treeb38f1c3316d5332f1b1312794cdc17e840225359 /target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core
parenta3d519604d97339172fd5699c148630963f3abdc (diff)
downloadorg.eclipse.tcf-60d05b7fac6c9bf3d197430bdfbd4921a689ef51.tar.gz
org.eclipse.tcf-60d05b7fac6c9bf3d197430bdfbd4921a689ef51.tar.xz
org.eclipse.tcf-60d05b7fac6c9bf3d197430bdfbd4921a689ef51.zip
Target Explorer: More process runtime model lookup tracing and mark model disposed in toString()
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/RuntimeModel.java11
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelLookupService.java13
2 files changed, 21 insertions, 3 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/RuntimeModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/RuntimeModel.java
index bb328915c..384a785bd 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/RuntimeModel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/RuntimeModel.java
@@ -266,4 +266,15 @@ public final class RuntimeModel extends ContainerModelNode implements IRuntimeMo
}
});
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.model.ModelNode#toString()
+ */
+ @Override
+ public String toString() {
+ if (disposed) {
+ return "*DISPOSED* : " + super.toString(); //$NON-NLS-1$
+ }
+ return super.toString();
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelLookupService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelLookupService.java
index 017735ebb..ee637aabc 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelLookupService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelLookupService.java
@@ -140,6 +140,13 @@ public class RuntimeModelLookupService extends AbstractModelService<IRuntimeMode
Assert.isNotNull(callback);
final IAsyncRefreshableCtx refreshable = (IAsyncRefreshableCtx)getModel().getAdapter(IAsyncRefreshableCtx.class);
+
+ if (refreshable != null && Boolean.getBoolean("sm.trace.rootnodelkup")) { //$NON-NLS-1$
+ String message = "RuntimeModelLookupService: lkupModelNodeByCapability: runtime model refreshable=" + refreshable + ", capabilities=" + Arrays.deepToString(capabilities); //$NON-NLS-1$ //$NON-NLS-2$
+ IStatus s = new Status(IStatus.INFO, CoreBundleActivator.getUniqueIdentifier(), message);
+ Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(s);
+ }
+
if (refreshable != null && refreshable.getQueryState(QueryType.CHILD_LIST) != QueryState.DONE) {
// The model needs a refresh
getModel().getService(IModelRefreshService.class).refresh(new Callback() {
@@ -168,7 +175,7 @@ public class RuntimeModelLookupService extends AbstractModelService<IRuntimeMode
Assert.isNotNull(capabilities);
if (Boolean.getBoolean("sm.trace.rootnodelkup")) { //$NON-NLS-1$
- String message = "RuntimeModelLookupServer: findInContainerByCapabilitiesRecursively: container=" + container + ", capabilities=" + Arrays.deepToString(capabilities); //$NON-NLS-1$ //$NON-NLS-2$
+ String message = "RuntimeModelLookupService: findInContainerByCapabilitiesRecursively: container=" + container + ", capabilities=" + Arrays.deepToString(capabilities); //$NON-NLS-1$ //$NON-NLS-2$
IStatus s = new Status(IStatus.INFO, CoreBundleActivator.getUniqueIdentifier(), message);
Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(s);
}
@@ -179,7 +186,7 @@ public class RuntimeModelLookupService extends AbstractModelService<IRuntimeMode
Map<String, Object> caps = (Map<String, Object>)candidate.getProperty(IProcessContextNodeProperties.PROPERTY_CAPABILITIES);
if (Boolean.getBoolean("sm.trace.rootnodelkup")) { //$NON-NLS-1$
- String message = "RuntimeModelLookupServer: findInContainerByCapabilitiesRecursively: candidate=" + candidate + ", capabilities=" + caps.keySet(); //$NON-NLS-1$ //$NON-NLS-2$
+ String message = "RuntimeModelLookupService: findInContainerByCapabilitiesRecursively: candidate=" + candidate + ", capabilities=" + caps.keySet(); //$NON-NLS-1$ //$NON-NLS-2$
IStatus s = new Status(IStatus.INFO, CoreBundleActivator.getUniqueIdentifier(), message);
Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(s);
}
@@ -210,7 +217,7 @@ public class RuntimeModelLookupService extends AbstractModelService<IRuntimeMode
}
if (Boolean.getBoolean("sm.trace.rootnodelkup")) { //$NON-NLS-1$
- String message = "RuntimeModelLookupServer: findInContainerByCapabilitiesRecursively: node=" + node; //$NON-NLS-1$
+ String message = "RuntimeModelLookupService: findInContainerByCapabilitiesRecursively: node=" + node; //$NON-NLS-1$
IStatus s = new Status(IStatus.INFO, CoreBundleActivator.getUniqueIdentifier(), message);
Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(s);
}

Back to the top