Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2014-05-22 04:01:10 -0400
committerTobias Schwarz2014-05-22 04:01:10 -0400
commitd2e4c755fe29d1aaed9fee33ecfc0f80acb52132 (patch)
tree1690596cc372fd61c67765390fb8fcaab157f348
parentd1ff40d96ba415950f8cb393d641defdab9093cd (diff)
downloadorg.eclipse.tcf-d2e4c755fe29d1aaed9fee33ecfc0f80acb52132.tar.gz
org.eclipse.tcf-d2e4c755fe29d1aaed9fee33ecfc0f80acb52132.tar.xz
org.eclipse.tcf-d2e4c755fe29d1aaed9fee33ecfc0f80acb52132.zip
Target Explorer: change persistence of attach action (no longer persist
context ids, sort context list and remove duplicates)
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepperOperationService.java10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/services/AbstractStepperOperationService.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/stepper/Stepper.java21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/IProcessContextItem.java1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/persistence/ProcessContextItem.java36
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/services/StepperOperationService.java40
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/util/ProcessDataHelper.java1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/handler/AttachContextHandler.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/delegates/DefaultContextToolbarDelegate.java10
11 files changed, 115 insertions, 21 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java
index 7f0721d93..6af3515ef 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java
@@ -43,6 +43,7 @@ import org.eclipse.tcf.te.launch.core.nls.Messages;
import org.eclipse.tcf.te.launch.core.persistence.projects.ReferencedProjectsPersistenceDelegate;
import org.eclipse.tcf.te.runtime.interfaces.ISharedConstants;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepAttributes;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepper;
import org.eclipse.tcf.te.runtime.stepper.interfaces.tracing.ITraceIds;
@@ -138,6 +139,7 @@ public class LaunchConfigurationDelegate extends org.eclipse.debug.core.model.La
launch.getLaunchMode());
IStepContext context = (IStepContext)launch.getAdapter(IStepContext.class);
+ properties.setProperty(IStepAttributes.PROP_SKIP_LAST_RUN_HISTORY, true);
stepper.initialize(context, stepGroupId, properties, monitor);
// Execute
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepperOperationService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepperOperationService.java
index be59a6c92..76d7a7edf 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepperOperationService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepperOperationService.java
@@ -82,6 +82,16 @@ public interface IStepperOperationService extends IService {
public boolean addToActionHistory(Object context, String operation);
/**
+ * Returns special history data if for example some values should not be persisted
+ * (like ids that are only valid in the current session).
+ * @param context The context. Must not be <code>null</code>.
+ * @param operation The operation. Must not be <code>null</code>.
+ * @param data The step data to be validated.
+ * @return Special history data or <code>null</code> if the original data should be used.
+ */
+ public IPropertiesContainer getSpecialHistoryData(Object context, String operation, IPropertiesContainer data);
+
+ /**
* Validates the step data to be used for the given context and operation.
* @param context The context. Must not be <code>null</code>.
* @param operation The operation. Must not be <code>null</code>.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/services/AbstractStepperOperationService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/services/AbstractStepperOperationService.java
index 0b900cdb8..4c8856108 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/services/AbstractStepperOperationService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/services/AbstractStepperOperationService.java
@@ -48,4 +48,12 @@ public abstract class AbstractStepperOperationService extends AbstractService im
public boolean validateStepData(Object context, String operation, IPropertiesContainer data) {
return true;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStepperOperationService#getSpecialHistoryData(java.lang.Object, java.lang.String, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ */
+ @Override
+ public IPropertiesContainer getSpecialHistoryData(Object context, String operation, IPropertiesContainer data) {
+ return null;
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/stepper/Stepper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/stepper/Stepper.java
index 79e8173a4..71ea2dab5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/stepper/Stepper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/stepper/Stepper.java
@@ -173,11 +173,18 @@ public class Stepper implements IStepper {
this.finished = false;
boolean skipLastRunHistory = data.getBooleanProperty(IStepAttributes.PROP_SKIP_LAST_RUN_HISTORY);
- data.setProperty(IStepAttributes.PROP_SKIP_LAST_RUN_HISTORY, null);
- if (!data.isEmpty()) {
- data.setProperty(IStepAttributes.ATTR_STEP_GROUP_ID, stepGroupId);
- data.setProperty(IStepAttributes.ATTR_HISTORY_DATA, DataHelper.encodePropertiesContainer(data));
- data.setProperty(IStepAttributes.PROP_SKIP_LAST_RUN_HISTORY, skipLastRunHistory);
+ if (!skipLastRunHistory && !data.isEmpty()) {
+ if (!data.containsKey(IStepAttributes.ATTR_HISTORY_DATA)) {
+ data.setProperty(IStepAttributes.ATTR_STEP_GROUP_ID, stepGroupId);
+ data.setProperty(IStepAttributes.PROP_SKIP_LAST_RUN_HISTORY, null);
+ data.setProperty(IStepAttributes.ATTR_HISTORY_DATA, DataHelper.encodePropertiesContainer(data));
+ data.setProperty(IStepAttributes.PROP_SKIP_LAST_RUN_HISTORY, skipLastRunHistory);
+ }
+ else {
+ IPropertiesContainer histData = DataHelper.decodePropertiesContainer(data.getStringProperty(IStepAttributes.ATTR_HISTORY_DATA));
+ histData.setProperty(IStepAttributes.ATTR_STEP_GROUP_ID, stepGroupId);
+ data.setProperty(IStepAttributes.ATTR_HISTORY_DATA, DataHelper.encodePropertiesContainer(histData));
+ }
}
// call the hook for the subclasses to initialize themselves
@@ -355,13 +362,13 @@ public class Stepper implements IStepper {
List<IStatus> statusContainer = new ArrayList<IStatus>();
// save execution to history
+ boolean skipLastRunHistory = data.getBooleanProperty(IStepAttributes.PROP_SKIP_LAST_RUN_HISTORY);
String historyData = data.getStringProperty(IStepAttributes.ATTR_HISTORY_DATA);
- if (historyData != null) {
+ if (!skipLastRunHistory && historyData != null) {
// this is the history for each step group used by action dialogs to prefill the values if no usable selection is available
HistoryManager.getInstance().add(stepGroupId + "@" + context.getId(), historyData, 1); //$NON-NLS-1$
if (!data.getBooleanProperty(IStepAttributes.PROP_SKIP_LAST_RUN_HISTORY)) {
// this is the history used for the list of history actions and the history dialog
-
HistoryManager.getInstance().add(IStepAttributes.PROP_LAST_RUN_HISTORY_ID + "@" + context.getId(), historyData, 50); //$NON-NLS-1$
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java
index de0a9a4fe..1e403d8bf 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java
@@ -13,6 +13,7 @@ package org.eclipse.tcf.te.runtime.stepper.utils;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.persistence.utils.DataHelper;
import org.eclipse.tcf.te.runtime.services.ServiceManager;
import org.eclipse.tcf.te.runtime.services.interfaces.IService;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepAttributes;
@@ -43,9 +44,13 @@ public final class StepperHelper {
String name = service.getStepGroupName(context, operation);
boolean isCancelable = service.isCancelable(context, operation);
boolean addToActionHistory = service.addToActionHistory(context, operation);
+ IPropertiesContainer histData = service.getSpecialHistoryData(stepContext, operation, data);
if (!addToActionHistory) {
data.setProperty(IStepAttributes.PROP_SKIP_LAST_RUN_HISTORY, true);
}
+ if (histData != null) {
+ data.setProperty(IStepAttributes.ATTR_HISTORY_DATA, DataHelper.encodePropertiesContainer(histData));
+ }
if (stepGroupId != null && stepContext != null) {
StepperJob job = new StepperJob(name != null ? name : "", //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/IProcessContextItem.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/IProcessContextItem.java
index 39b9571c1..b76d42d5b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/IProcessContextItem.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/IProcessContextItem.java
@@ -18,7 +18,6 @@ import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
public interface IProcessContextItem extends IPropertiesContainer {
public static final String PROPERTY_ID = "id"; //$NON-NLS-1$
- public static final String PROPERTY_PID = "pid"; //$NON-NLS-1$
public static final String PROPERTY_NAME = "name"; //$NON-NLS-1$
public static final String PROPERTY_PATH = "path"; //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/persistence/ProcessContextItem.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/persistence/ProcessContextItem.java
index 4715476c6..48d668313 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/persistence/ProcessContextItem.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/persistence/ProcessContextItem.java
@@ -16,7 +16,7 @@ import org.eclipse.tcf.te.tcf.processes.core.interfaces.IProcessContextItem;
/**
* ProcessContextItem
*/
-public class ProcessContextItem extends PropertiesContainer implements IProcessContextItem {
+public class ProcessContextItem extends PropertiesContainer implements IProcessContextItem, Comparable<IProcessContextItem> {
/**
* Constructor.
@@ -49,4 +49,38 @@ public class ProcessContextItem extends PropertiesContainer implements IProcessC
return getStringProperty(PROPERTY_PATH);
}
+ /* (non-Javadoc)
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ @Override
+ public int compareTo(IProcessContextItem other) {
+ return toString().compareTo(other.toString());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof IProcessContextItem) {
+ IProcessContextItem other = (IProcessContextItem)obj;
+ return toString().equals(other.toString());
+ }
+ return super.equals(obj);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#toString()
+ */
+ @Override
+ public String toString() {
+ String toString = getName() != null ? getName() : "unknown"; //$NON-NLS-1$
+ if (getId() != null) {
+ toString += " (" + getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if (getPath() != null) {
+ toString = getPath() + IProcessContextItem.PATH_SEPARATOR + toString;
+ }
+ return toString;
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/services/StepperOperationService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/services/StepperOperationService.java
index 0218c5cc1..b808ecb14 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/services/StepperOperationService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/services/StepperOperationService.java
@@ -10,9 +10,18 @@
package org.eclipse.tcf.te.tcf.processes.core.services;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
import org.eclipse.tcf.te.runtime.stepper.services.AbstractStepperOperationService;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.IProcessContextItem;
+import org.eclipse.tcf.te.tcf.processes.core.interfaces.IProcessesDataProperties;
import org.eclipse.tcf.te.tcf.processes.core.interfaces.services.IStepGroupIds;
import org.eclipse.tcf.te.tcf.processes.core.interfaces.services.IStepperServiceOperations;
+import org.eclipse.tcf.te.tcf.processes.core.util.ProcessDataHelper;
/**
* Processes stepper operation service implementation.
@@ -43,6 +52,37 @@ public class StepperOperationService extends AbstractStepperOperationService {
}
/* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.services.AbstractStepperOperationService#getSpecialHistoryData(java.lang.Object, java.lang.String, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
+ */
+ @Override
+ public IPropertiesContainer getSpecialHistoryData(Object context, String operation, IPropertiesContainer data) {
+ String encoded = data.getStringProperty(IProcessesDataProperties.PROPERTY_CONTEXT_LIST);
+ IProcessContextItem[] items = ProcessDataHelper.decodeProcessContextItems(encoded);
+ for (IProcessContextItem item : items) {
+ item.setProperty(IProcessContextItem.PROPERTY_ID, null);
+ }
+
+ IPropertiesContainer histData = new PropertiesContainer();
+ histData.setProperties(data.getProperties());
+ // sort the data
+ Arrays.sort(items);
+ // remove duplicate items
+ List<IProcessContextItem> histItems = new ArrayList<IProcessContextItem>();
+ int i=0;
+ while (i < items.length) {
+ if (i == items.length-1) {
+ histItems.add(items[i]);
+ }
+ else if (!items[i].equals(items[i+1])) {
+ histItems.add(items[i]);
+ }
+ i++;
+ }
+ histData.setProperty(IProcessesDataProperties.PROPERTY_CONTEXT_LIST, ProcessDataHelper.encodeProcessContextItems(histItems.toArray(new IProcessContextItem[histItems.size()])));
+ return histData;
+ }
+
+ /* (non-Javadoc)
* @see org.eclipse.tcf.te.tcf.locator.services.StepperOperationService#getStepGroupId(java.lang.Object, java.lang.String)
*/
@Override
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/util/ProcessDataHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/util/ProcessDataHelper.java
index 3e8a45511..e96c2a508 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/util/ProcessDataHelper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/util/ProcessDataHelper.java
@@ -71,7 +71,6 @@ public class ProcessDataHelper {
if (value != null && value.booleanValue()) {
IProcessContextItem item = new ProcessContextItem();
item.setProperty(IProcessContextItem.PROPERTY_ID, node.getProcessContext().getID());
- item.setProperty(IProcessContextItem.PROPERTY_PID, node.getSysMonitorContext().getPID());
item.setProperty(IProcessContextItem.PROPERTY_NAME, node.getProcessContext().getName());
item.setProperty(IProcessContextItem.PROPERTY_PATH, getProcessContextNodePath(node));
ctxItem.set(item);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/handler/AttachContextHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/handler/AttachContextHandler.java
index ca3149829..b86064cac 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/handler/AttachContextHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/handler/AttachContextHandler.java
@@ -86,7 +86,7 @@ public class AttachContextHandler extends AbstractContextStepperCommandHandler {
final Object element = it.next();
if (element instanceof IProcessContextNode) {
IProcessContextItem item = ProcessDataHelper.getProcessContextItem((IProcessContextNode)element);
- if (item != null) {
+ if (item != null && !items.contains(item)) {
items.add(item);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/delegates/DefaultContextToolbarDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/delegates/DefaultContextToolbarDelegate.java
index 1456b1d02..f4a13103f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/delegates/DefaultContextToolbarDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/delegates/DefaultContextToolbarDelegate.java
@@ -16,8 +16,6 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
import org.eclipse.tcf.te.runtime.persistence.utils.DataHelper;
import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tcf.te.runtime.services.ServiceManager;
-import org.eclipse.tcf.te.runtime.services.interfaces.IUIService;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepperOperationService;
import org.eclipse.tcf.te.runtime.stepper.utils.StepperHelper;
import org.eclipse.tcf.te.tcf.core.interfaces.IContextDataProperties;
@@ -29,7 +27,6 @@ import org.eclipse.tcf.te.tcf.processes.core.interfaces.services.IStepGroupIds;
import org.eclipse.tcf.te.tcf.processes.core.interfaces.services.IStepperServiceOperations;
import org.eclipse.tcf.te.tcf.processes.core.util.ProcessDataHelper;
import org.eclipse.tcf.te.tcf.processes.ui.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.processes.ui.interfaces.IProcessMonitorUIDelegate;
import org.eclipse.tcf.te.tcf.processes.ui.internal.ImageConsts;
import org.eclipse.tcf.te.tcf.processes.ui.internal.dialogs.AttachContextSelectionDialog;
import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
@@ -97,13 +94,6 @@ public class DefaultContextToolbarDelegate extends AbstractDefaultContextToolbar
contexts += path + IProcessContextItem.PATH_SEPARATOR;
}
contexts += item.getName();
- IUIService service = peerNode != null ? ServiceManager.getInstance().getService(peerNode, IUIService.class) : null;
- IProcessMonitorUIDelegate delegate = service != null ? service.getDelegate(peerNode, IProcessMonitorUIDelegate.class) : null;
- long id = item.getLongProperty(IProcessContextItem.PROPERTY_PID);
-
- if (id > 0) {
- contexts += " (" + (delegate != null ? delegate.getText(peerNode, "PID", new Long(id).toString()) : id+"") + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
}
return NLS.bind(Messages.DefaultContextToolbarDelegate_attachContext_description, contexts);
}

Back to the top