Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2013-12-13 04:22:07 -0500
committerTobias Schwarz2013-12-13 04:22:07 -0500
commit17e2516e95a40b95a6298c7e294b0cfc9088bbf4 (patch)
tree63163f5174d02165b581d282a8e265f220d319c6 /target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core
parent27e9596b045ba44cd4f5db7d4b310b9272135288 (diff)
downloadorg.eclipse.tcf-17e2516e95a40b95a6298c7e294b0cfc9088bbf4.tar.gz
org.eclipse.tcf-17e2516e95a40b95a6298c7e294b0cfc9088bbf4.tar.xz
org.eclipse.tcf-17e2516e95a40b95a6298c7e294b0cfc9088bbf4.zip
Target Explorer: rework peer model
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/activator/CoreBundleActivator.java242
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/ModelManager.java26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/interfaces/runtime/IRuntimeModel.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/listener/ModelListener.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/nodes/ProcessContextNode.java20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/RuntimeModel.java18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelChannelService.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/AttachStep.java34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/DetachStep.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/TerminateStep.java6
10 files changed, 183 insertions, 183 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/activator/CoreBundleActivator.java
index aed90e597..855302f66 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/activator/CoreBundleActivator.java
@@ -1,121 +1,121 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.processes.core.activator;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
-import org.eclipse.tcf.te.tcf.locator.interfaces.IModelListener;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
-import org.eclipse.tcf.te.tcf.locator.model.Model;
-import org.eclipse.tcf.te.tcf.processes.core.model.listener.ModelListener;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class CoreBundleActivator extends Plugin {
- // The bundle context
- private static BundleContext context;
- // The trace handler instance
- private static volatile TraceHandler traceHandler;
- // The locator model listener instance
- /* default */ IModelListener listener;
-
- // The shared instance
- private static CoreBundleActivator plugin;
-
- /**
- * Returns the bundle context
- *
- * @return the bundle context
- */
- public static BundleContext getContext() {
- return context;
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static CoreBundleActivator getDefault() {
- return plugin;
- }
-
- /**
- * Convenience method which returns the unique identifier of this plugin.
- */
- public static String getUniqueIdentifier() {
- if (getContext() != null && getContext().getBundle() != null) {
- return getContext().getBundle().getSymbolicName();
- }
- return "org.eclipse.tcf.te.tcf.processes.core"; //$NON-NLS-1$
- }
-
- /**
- * Returns the bundles trace handler.
- *
- * @return The bundles trace handler.
- */
- public static TraceHandler getTraceHandler() {
- if (traceHandler == null) {
- traceHandler = new TraceHandler(getUniqueIdentifier());
- }
- return traceHandler;
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext bundleContext) throws Exception {
- CoreBundleActivator.context = bundleContext;
- plugin = this;
-
- // Create the model listener instance
- listener = new ModelListener();
-
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- if (listener == null) return;
- // Register the model listener with the locator model
- Model.getModel().addListener(listener);
- }
- };
-
- Protocol.invokeLater(runnable);
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext bundleContext) throws Exception {
- CoreBundleActivator.context = null;
- plugin = null;
-
- // Remove the model listener from the locator model
- if (listener != null) {
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- ILocatorModel model = Model.getModel(true);
- if (model != null) model.removeListener(listener);
- listener = null;
- }
- };
- if (Protocol.isDispatchThread()) runnable.run();
- else Protocol.invokeAndWait(runnable);
- }
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.core.activator;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.eclipse.tcf.te.tcf.locator.interfaces.IModelListener;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.model.Model;
+import org.eclipse.tcf.te.tcf.processes.core.model.listener.ModelListener;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class CoreBundleActivator extends Plugin {
+ // The bundle context
+ private static BundleContext context;
+ // The trace handler instance
+ private static volatile TraceHandler traceHandler;
+ // The locator model listener instance
+ /* default */ IModelListener listener;
+
+ // The shared instance
+ private static CoreBundleActivator plugin;
+
+ /**
+ * Returns the bundle context
+ *
+ * @return the bundle context
+ */
+ public static BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static CoreBundleActivator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getContext() != null && getContext().getBundle() != null) {
+ return getContext().getBundle().getSymbolicName();
+ }
+ return "org.eclipse.tcf.te.tcf.processes.core"; //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the bundles trace handler.
+ *
+ * @return The bundles trace handler.
+ */
+ public static TraceHandler getTraceHandler() {
+ if (traceHandler == null) {
+ traceHandler = new TraceHandler(getUniqueIdentifier());
+ }
+ return traceHandler;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = bundleContext;
+ plugin = this;
+
+ // Create the model listener instance
+ listener = new ModelListener();
+
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ if (listener == null) return;
+ // Register the model listener with the locator model
+ Model.getModel().addListener(listener);
+ }
+ };
+
+ Protocol.invokeLater(runnable);
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = null;
+ plugin = null;
+
+ // Remove the model listener from the locator model
+ if (listener != null) {
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ IPeerModel model = Model.getModel(true);
+ if (model != null) model.removeListener(listener);
+ listener = null;
+ }
+ };
+ if (Protocol.isDispatchThread()) runnable.run();
+ else Protocol.invokeAndWait(runnable);
+ }
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/ModelManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/ModelManager.java
index e323927ef..ac5850b73 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/ModelManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/ModelManager.java
@@ -15,7 +15,7 @@ import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.core.runtime.Assert;
import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.runtime.IRuntimeModel;
import org.eclipse.tcf.te.tcf.processes.core.model.runtime.RuntimeModel;
@@ -31,11 +31,11 @@ public class ModelManager {
* <p>
* If not yet initialized, a new runtime model will be initialized before returning.
*
- * @param peerModel The peer model instance. Must not be <code>null</code>.
+ * @param peerNode The peer model instance. Must not be <code>null</code>.
* @return The runtime model.
*/
- public static IRuntimeModel getRuntimeModel(final IPeerModel peerModel) {
- Assert.isNotNull(peerModel);
+ public static IRuntimeModel getRuntimeModel(final IPeerNode peerNode) {
+ Assert.isNotNull(peerNode);
// The result reference holder
final AtomicReference<IRuntimeModel> runtimeModel = new AtomicReference<IRuntimeModel>();
@@ -47,12 +47,12 @@ public class ModelManager {
Assert.isTrue(Protocol.isDispatchThread());
// Get the peer id
- String id = peerModel.getPeerId();
+ String id = peerNode.getPeerId();
// Lookup the runtime model instance
IRuntimeModel candidate = runtimeModels.get(id);
// Initialize a new runtime model instance if necessary
if (candidate == null) {
- candidate = initializeRuntimeModel(peerModel);
+ candidate = initializeRuntimeModel(peerNode);
if (candidate != null) runtimeModels.put(id, candidate);
}
// Store to the result reference holder
@@ -72,22 +72,22 @@ public class ModelManager {
* <p>
* Must be called within the TCF dispatch thread.
*
- * @param peerModel The peer model instance. Must not be <code>null</code>.
+ * @param peerNode The peer model instance. Must not be <code>null</code>.
* @return The runtime model.
*/
- protected static IRuntimeModel initializeRuntimeModel(IPeerModel peerModel) {
+ protected static IRuntimeModel initializeRuntimeModel(IPeerNode peerNode) {
Assert.isTrue(Protocol.isDispatchThread());
- IRuntimeModel runtimeModel = new RuntimeModel(peerModel);
+ IRuntimeModel runtimeModel = new RuntimeModel(peerNode);
return runtimeModel;
}
/**
* Dispose the runtime model.
*
- * @param peerModel The peer model instance. Must not be <code>null</code>.
+ * @param peerNode The peer model instance. Must not be <code>null</code>.
*/
- public static void disposeRuntimeModel(final IPeerModel peerModel) {
- Assert.isNotNull(peerModel);
+ public static void disposeRuntimeModel(final IPeerNode peerNode) {
+ Assert.isNotNull(peerNode);
Runnable runnable = new Runnable() {
@Override
@@ -95,7 +95,7 @@ public class ModelManager {
Assert.isTrue(Protocol.isDispatchThread());
// Get the peer id
- String id = peerModel.getPeerId();
+ String id = peerNode.getPeerId();
// Lookup the runtime model instance
IRuntimeModel candidate = runtimeModels.remove(id);
// Dispose it
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/interfaces/runtime/IRuntimeModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/interfaces/runtime/IRuntimeModel.java
index a4c7fa33c..202fb645d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/interfaces/runtime/IRuntimeModel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/interfaces/runtime/IRuntimeModel.java
@@ -10,7 +10,7 @@
package org.eclipse.tcf.te.tcf.processes.core.model.interfaces.runtime;
import org.eclipse.tcf.te.tcf.core.model.interfaces.IModel;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProvider;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProvider;
/**
@@ -22,7 +22,7 @@ import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProvider;
* <p>
* All model access must happen in the TCF dispatch thread.
*/
-public interface IRuntimeModel extends IModel, IPeerModelProvider {
+public interface IRuntimeModel extends IModel, IPeerNodeProvider {
/**
* Set the auto-refresh interval in seconds.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/listener/ModelListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/listener/ModelListener.java
index e5d979468..216609e9d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/listener/ModelListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/listener/ModelListener.java
@@ -11,8 +11,8 @@ package org.eclipse.tcf.te.tcf.processes.core.model.listener;
import org.eclipse.core.runtime.Assert;
import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
import org.eclipse.tcf.te.tcf.locator.listener.ModelAdapter;
import org.eclipse.tcf.te.tcf.processes.core.model.ModelManager;
@@ -22,10 +22,10 @@ import org.eclipse.tcf.te.tcf.processes.core.model.ModelManager;
public class ModelListener extends ModelAdapter {
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.locator.listener.ModelAdapter#locatorModelChanged(org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel, org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel, boolean)
+ * @see org.eclipse.tcf.te.tcf.locator.listener.ModelAdapter#locatorModelChanged(org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel, org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode, boolean)
*/
@Override
- public void locatorModelChanged(ILocatorModel model, IPeerModel peer, boolean added) {
+ public void locatorModelChanged(IPeerModel model, IPeerNode peer, boolean added) {
Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
if (peer == null) return;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/nodes/ProcessContextNode.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/nodes/ProcessContextNode.java
index 0dc33b65f..2bf003277 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/nodes/ProcessContextNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/nodes/ProcessContextNode.java
@@ -25,15 +25,15 @@ import org.eclipse.tcf.te.runtime.model.interfaces.contexts.IAsyncRefreshableCtx
import org.eclipse.tcf.te.runtime.model.interfaces.contexts.IAsyncRefreshableCtx.QueryState;
import org.eclipse.tcf.te.runtime.model.interfaces.contexts.IAsyncRefreshableCtx.QueryType;
import org.eclipse.tcf.te.tcf.core.model.interfaces.IModel;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProvider;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProvider;
import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNodeProperties;
/**
* A process context node implementation.
*/
-public class ProcessContextNode extends ContainerModelNode implements IProcessContextNode, IPeerModelProvider, IFilterable {
+public class ProcessContextNode extends ContainerModelNode implements IProcessContextNode, IPeerNodeProvider, IFilterable {
// Reference to the agent side process context object
private IProcesses.ProcessContext pContext = null;
// Reference to the agent side system monitor context object
@@ -156,11 +156,11 @@ public class ProcessContextNode extends ContainerModelNode implements IProcessCo
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProvider#getPeerModel()
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProvider#getPeerModel()
*/
@Override
- public IPeerModel getPeerModel() {
- return (IPeerModel)getAdapter(IPeerModel.class);
+ public IPeerNode getPeerModel() {
+ return (IPeerNode)getAdapter(IPeerNode.class);
}
/* (non-Javadoc)
@@ -224,13 +224,13 @@ public class ProcessContextNode extends ContainerModelNode implements IProcessCo
if (ISysMonitor.SysMonitorContext.class.isAssignableFrom(adapter)) {
return sContext;
}
- if (IPeerModelProvider.class.isAssignableFrom(adapter)) {
+ if (IPeerNodeProvider.class.isAssignableFrom(adapter)) {
IModel model = getParent(IModel.class);
- if (model instanceof IPeerModelProvider) return model;
+ if (model instanceof IPeerNodeProvider) return model;
}
- if (IPeerModel.class.isAssignableFrom(adapter)) {
+ if (IPeerNode.class.isAssignableFrom(adapter)) {
IModel model = getParent(IModel.class);
- if (model instanceof IPeerModelProvider) return ((IPeerModelProvider)model).getPeerModel();
+ if (model instanceof IPeerNodeProvider) return ((IPeerNodeProvider)model).getPeerModel();
}
if (IAsyncRefreshableCtx.class.isAssignableFrom(adapter)) {
return refreshableCtxAdapter;
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 384a785bd..5bccafe5a 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
@@ -29,7 +29,7 @@ import org.eclipse.tcf.te.tcf.core.model.interfaces.services.IModelLookupService
import org.eclipse.tcf.te.tcf.core.model.interfaces.services.IModelRefreshService;
import org.eclipse.tcf.te.tcf.core.model.interfaces.services.IModelService;
import org.eclipse.tcf.te.tcf.core.model.interfaces.services.IModelUpdateService;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.runtime.IRuntimeModel;
import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.runtime.IRuntimeModelLookupService;
import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.runtime.IRuntimeModelRefreshService;
@@ -51,7 +51,7 @@ public final class RuntimeModel extends ContainerModelNode implements IRuntimeMo
private IFactory factory = null;
// Reference to the associated peer model
- private final IPeerModel peerModel;
+ private final IPeerNode peerNode;
// Reference to the refresh service
private final IRuntimeModelRefreshService refreshService = new RuntimeModelRefreshService(this);
@@ -73,17 +73,17 @@ public final class RuntimeModel extends ContainerModelNode implements IRuntimeMo
/**
* Constructor.
*
- * @param peerModel The peerModel to associated. Must not be <code>null</code>.
+ * @param peerNode The peerNode to associated. Must not be <code>null</code>.
*/
- public RuntimeModel(IPeerModel peerModel) {
+ public RuntimeModel(IPeerNode peerNode) {
super();
disposed = false;
setChangeEventsEnabled(true);
suppressEventsOnNullParent = false;
- Assert.isNotNull(peerModel);
- this.peerModel = peerModel;
+ Assert.isNotNull(peerNode);
+ this.peerNode = peerNode;
// No initial context query required
refreshableCtxAdapter.setQueryState(QueryType.CONTEXT, QueryState.DONE);
@@ -180,12 +180,12 @@ public final class RuntimeModel extends ContainerModelNode implements IRuntimeMo
}
/* (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProvider#getPeerModel()
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProvider#getPeerModel()
*/
@Override
- public IPeerModel getPeerModel() {
+ public IPeerNode getPeerModel() {
Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
- return peerModel;
+ return peerNode;
}
/* (non-Javadoc)
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelChannelService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelChannelService.java
index 7ed2fdf3d..14f2887e0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelChannelService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelChannelService.java
@@ -19,7 +19,7 @@ import org.eclipse.tcf.te.tcf.core.Tcf;
import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
import org.eclipse.tcf.te.tcf.core.model.interfaces.services.IModelChannelService;
import org.eclipse.tcf.te.tcf.core.model.services.AbstractModelService;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.runtime.IRuntimeModel;
import org.eclipse.tcf.te.tcf.processes.core.model.runtime.listener.RuntimeModelProcessServiceListener;
import org.eclipse.tcf.te.tcf.processes.core.model.runtime.listener.RuntimeModelRunControlServiceListener;
@@ -67,7 +67,7 @@ public class RuntimeModelChannelService extends AbstractModelService<IRuntimeMod
}
// Get the peer model node
- IPeerModel node = getModel().getPeerModel();
+ IPeerNode node = getModel().getPeerModel();
if (node != null) {
// Open a new channel to the remote peer
Tcf.getChannelManager().openChannel(node.getPeer(), null, new IChannelManager.DoneOpenChannel() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/AttachStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/AttachStep.java
index c417374e9..4a0ee4ffe 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/AttachStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/AttachStep.java
@@ -38,7 +38,7 @@ import org.eclipse.tcf.te.tcf.core.async.CallbackInvocationDelegate;
import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
import org.eclipse.tcf.te.tcf.core.model.interfaces.IModel;
import org.eclipse.tcf.te.tcf.core.model.interfaces.services.IModelRefreshService;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
import org.eclipse.tcf.te.tcf.processes.core.activator.CoreBundleActivator;
import org.eclipse.tcf.te.tcf.processes.core.interfaces.IContextHelpIds;
import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
@@ -54,20 +54,20 @@ public class AttachStep {
* <p>
* <b>Note:</b> This method must be called from within the TCF dispatch thread.
*
- * @param peerModel The peer model. Must not be <code>null</code>.
+ * @param peerNode The peer model. Must not be <code>null</code>.
* @param nodes The list of process context nodes. Must not be <code>null</code>.
* @param callback The callback to invoke once the operation completed, or<code>null</code>.
*/
- public void executeAttach(final IPeerModel peerModel, final IProcessContextNode[] nodes, final ICallback callback) {
+ public void executeAttach(final IPeerNode peerNode, final IProcessContextNode[] nodes, final ICallback callback) {
Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
- Assert.isNotNull(peerModel);
+ Assert.isNotNull(peerNode);
Assert.isNotNull(nodes);
// Determine if we have to execute the attach at all
final List<IProcessContextNode> nodesToAttach = new ArrayList<IProcessContextNode>();
for (IProcessContextNode node : nodes) {
- IPeerModel parentPeerModel = (IPeerModel)node.getAdapter(IPeerModel.class);
- if (!peerModel.equals(parentPeerModel)) continue;
+ IPeerNode parentPeerModel = (IPeerNode)node.getAdapter(IPeerNode.class);
+ if (!peerNode.equals(parentPeerModel)) continue;
// If not yet attached, we have to attach to it
if (node.getProcessContext() != null && !node.getProcessContext().isAttached()) {
@@ -78,17 +78,17 @@ public class AttachStep {
// Anything to attach?
if (!nodesToAttach.isEmpty()) {
// Determine the debug service to attach to the peer node
- IDebugService dbgService = ServiceManager.getInstance().getService(peerModel, IDebugService.class, false);
+ IDebugService dbgService = ServiceManager.getInstance().getService(peerNode, IDebugService.class, false);
if (dbgService != null) {
// Attach to the peer node first
- dbgService.attach(peerModel, new PropertiesContainer(), null, new Callback() {
+ dbgService.attach(peerNode, new PropertiesContainer(), null, new Callback() {
@Override
protected void internalDone(Object caller, IStatus status) {
callback.setProperty("launch", getProperty("launch")); //$NON-NLS-1$ //$NON-NLS-2$
Runnable runnable = new Runnable() {
@Override
public void run() {
- doAttach(peerModel, Collections.unmodifiableList(nodesToAttach), callback);
+ doAttach(peerNode, Collections.unmodifiableList(nodesToAttach), callback);
}
};
if (Protocol.isDispatchThread()) runnable.run();
@@ -96,7 +96,7 @@ public class AttachStep {
}
});
} else {
- doAttach(peerModel, Collections.unmodifiableList(nodesToAttach), callback);
+ doAttach(peerNode, Collections.unmodifiableList(nodesToAttach), callback);
}
} else {
onDone(callback);
@@ -109,19 +109,19 @@ public class AttachStep {
* <p>
* <b>Note:</b> This method must be called from within the TCF dispatch thread.
*
- * @param peerModel The peer model. Must not be <code>null</code>.
+ * @param peerNode The peer model. Must not be <code>null</code>.
* @param nodes The process context node. Must not be <code>null</code>.
* @param callback The callback to invoke once the operation completed, or<code>null</code>.
*/
- protected void doAttach(final IPeerModel peerModel, final List<IProcessContextNode> nodes, final ICallback callback) {
+ protected void doAttach(final IPeerNode peerNode, final List<IProcessContextNode> nodes, final ICallback callback) {
Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
- Assert.isNotNull(peerModel);
+ Assert.isNotNull(peerNode);
Assert.isNotNull(nodes);
// Loop the nodes and attach to them
if (!nodes.isEmpty()) {
// Open a channel
- Tcf.getChannelManager().openChannel(peerModel.getPeer(), null, new IChannelManager.DoneOpenChannel() {
+ Tcf.getChannelManager().openChannel(peerNode.getPeer(), null, new IChannelManager.DoneOpenChannel() {
@Override
public void doneOpenChannel(final Throwable error, final IChannel channel) {
if (error == null) {
@@ -132,7 +132,7 @@ public class AttachStep {
@Override
protected void internalDone(Object caller, IStatus status) {
if (status.getSeverity() == IStatus.ERROR) {
- onError(peerModel, status.getMessage(), status.getException(), callback);
+ onError(peerNode, status.getMessage(), status.getException(), callback);
} else {
onDone(callback);
}
@@ -177,10 +177,10 @@ public class AttachStep {
// Mark the collector initialization done
collector.initDone();
} else {
- onError(peerModel, NLS.bind(Messages.AttachStep_error_missingService, peerModel.getName()), null, callback);
+ onError(peerNode, NLS.bind(Messages.AttachStep_error_missingService, peerNode.getName()), null, callback);
}
} else {
- onError(peerModel, NLS.bind(Messages.AttachStep_error_openChannel, peerModel.getName()), error, callback);
+ onError(peerNode, NLS.bind(Messages.AttachStep_error_openChannel, peerNode.getName()), error, callback);
}
}
});
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/DetachStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/DetachStep.java
index 3d43b7a1a..9313cea9f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/DetachStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/DetachStep.java
@@ -30,7 +30,7 @@ import org.eclipse.tcf.te.tcf.core.Tcf;
import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
import org.eclipse.tcf.te.tcf.core.model.interfaces.IModel;
import org.eclipse.tcf.te.tcf.core.model.interfaces.services.IModelRefreshService;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
import org.eclipse.tcf.te.tcf.processes.core.activator.CoreBundleActivator;
import org.eclipse.tcf.te.tcf.processes.core.interfaces.IContextHelpIds;
import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
@@ -55,7 +55,7 @@ public class DetachStep {
// If the context is not attached, there is nothing to do
if (node.getProcessContext() != null && node.getProcessContext().isAttached()) {
- IPeerModel peerNode = (IPeerModel)node.getAdapter(IPeerModel.class);
+ IPeerNode peerNode = (IPeerNode)node.getAdapter(IPeerNode.class);
if (peerNode != null) {
doDetach(node, callback);
} else {
@@ -84,7 +84,7 @@ public class DetachStep {
Assert.isNotNull(node);
// Determine the peer model node
- final IPeerModel peerNode = (IPeerModel)node.getAdapter(IPeerModel.class);
+ final IPeerNode peerNode = (IPeerNode)node.getAdapter(IPeerNode.class);
// Open a channel
Tcf.getChannelManager().openChannel(peerNode.getPeer(), null, new IChannelManager.DoneOpenChannel() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/TerminateStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/TerminateStep.java
index c3534d7ff..d5bc4f9c8 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/TerminateStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/steps/TerminateStep.java
@@ -27,7 +27,7 @@ import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
import org.eclipse.tcf.te.tcf.core.Tcf;
import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
import org.eclipse.tcf.te.tcf.processes.core.activator.CoreBundleActivator;
import org.eclipse.tcf.te.tcf.processes.core.interfaces.IContextHelpIds;
import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
@@ -52,7 +52,7 @@ public class TerminateStep {
// If the context is not attached, there is nothing to do
if (node.getProcessContext() != null) {
- IPeerModel peerNode = (IPeerModel)node.getAdapter(IPeerModel.class);
+ IPeerNode peerNode = (IPeerNode)node.getAdapter(IPeerNode.class);
if (peerNode != null) {
doTerminate(node, callback);
} else {
@@ -78,7 +78,7 @@ public class TerminateStep {
Assert.isNotNull(node);
// Determine the peer model node
- final IPeerModel peerNode = (IPeerModel)node.getAdapter(IPeerModel.class);
+ final IPeerNode peerNode = (IPeerNode)node.getAdapter(IPeerNode.class);
// Open a channel
Tcf.getChannelManager().openChannel(peerNode.getPeer(), null, new IChannelManager.DoneOpenChannel() {

Back to the top