Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-12-03 08:44:54 -0500
committerUwe Stieber2013-12-03 08:44:54 -0500
commitcf386eb1768a02914c77166b091aa42f48c84d31 (patch)
tree2dffa1535b4ced4d885097846f85f61732df3065 /target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core
parentee36018e944ad32274958b02c6a230c41fc504fc (diff)
downloadorg.eclipse.tcf-cf386eb1768a02914c77166b091aa42f48c84d31.tar.gz
org.eclipse.tcf-cf386eb1768a02914c77166b091aa42f48c84d31.tar.xz
org.eclipse.tcf-cf386eb1768a02914c77166b091aa42f48c84d31.zip
Target Explorer: Add tracing to identify issue on getting context root nodes
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/services/RuntimeModelLookupService.java22
1 files changed, 22 insertions, 0 deletions
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 033df0754..017735ebb 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
@@ -10,12 +10,14 @@
package org.eclipse.tcf.te.tcf.processes.core.model.runtime.services;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.tcf.te.runtime.callback.Callback;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
@@ -26,6 +28,7 @@ import org.eclipse.tcf.te.runtime.model.interfaces.contexts.IAsyncRefreshableCtx
import org.eclipse.tcf.te.runtime.model.interfaces.contexts.IAsyncRefreshableCtx.QueryType;
import org.eclipse.tcf.te.tcf.core.model.interfaces.services.IModelRefreshService;
import org.eclipse.tcf.te.tcf.core.model.services.AbstractModelService;
+import org.eclipse.tcf.te.tcf.processes.core.activator.CoreBundleActivator;
import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNodeProperties;
import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.runtime.IRuntimeModel;
@@ -164,10 +167,23 @@ public class RuntimeModelLookupService extends AbstractModelService<IRuntimeMode
Assert.isNotNull(container);
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$
+ IStatus s = new Status(IStatus.INFO, CoreBundleActivator.getUniqueIdentifier(), message);
+ Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(s);
+ }
+
IProcessContextNode node = null;
List<IProcessContextNode> candidates = container.getChildren(IProcessContextNode.class);
for (IProcessContextNode candidate : candidates) {
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$
+ IStatus s = new Status(IStatus.INFO, CoreBundleActivator.getUniqueIdentifier(), message);
+ Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(s);
+ }
+
if (caps != null) {
boolean allFound = true;
for (String capability : capabilities) {
@@ -193,6 +209,12 @@ public class RuntimeModelLookupService extends AbstractModelService<IRuntimeMode
}
}
+ if (Boolean.getBoolean("sm.trace.rootnodelkup")) { //$NON-NLS-1$
+ String message = "RuntimeModelLookupServer: findInContainerByCapabilitiesRecursively: node=" + node; //$NON-NLS-1$
+ IStatus s = new Status(IStatus.INFO, CoreBundleActivator.getUniqueIdentifier(), message);
+ Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(s);
+ }
+
return node;
}
}

Back to the top