aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Torregrosa Paez2015-12-03 08:49:39 -0500
committerUwe Stieber2015-12-03 10:02:28 -0500
commit6a92e45b16ebc4045876caf00fc075e0f5df7f0a (patch)
treeabce4cba861080baedc5c98f05719d71f0bfa278
parent025c9108ff4165bc46ecbf4e523625c03288cdab (diff)
downloadorg.eclipse.tcf-1.4_WR_20151211_4.5.0_bugfix.zip
org.eclipse.tcf-1.4_WR_20151211_4.5.0_bugfix.tar.gz
org.eclipse.tcf-1.4_WR_20151211_4.5.0_bugfix.tar.xz
Target Explorer: Make 'history_id' overridable.1.4_WR_20151211_4.5.0_bugfix
Change-Id: Ic3cf4d886e8fbb643c83db0145cbff6952bfa21b Signed-off-by: Pablo Torregrosa Paez <pablo.torregrosa@windriver.com>
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/AbstractContextStepperCommandHandler.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/AbstractContextStepperCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/AbstractContextStepperCommandHandler.java
index d8f166f..524c4bd 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/AbstractContextStepperCommandHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/AbstractContextStepperCommandHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2013, 2015 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
@@ -66,7 +66,11 @@ public abstract class AbstractContextStepperCommandHandler extends AbstractStepp
if (stepperOpService instanceof IStepperOperationService && ((IStepperOperationService)stepperOpService).isHandledOperation(context, operation)) {
String groupId = ((IStepperOperationService)stepperOpService).getStepGroupId(context, operation);
if (groupId != null) {
- String history = HistoryManager.getInstance().getFirst(groupId + "@" + context.getPeerId()); //$NON-NLS-1$
+ String historyId = getHistoryId(event);
+ if (historyId == null) {
+ historyId = groupId + "@" + context.getPeerId(); //$NON-NLS-1$
+ }
+ String history = HistoryManager.getInstance().getFirst(historyId);
if (history != null) {
return DataHelper.decodePropertiesContainer(history);
}
@@ -78,6 +82,10 @@ public abstract class AbstractContextStepperCommandHandler extends AbstractStepp
return getDefaultData();
}
+ protected String getHistoryId(ExecutionEvent event) {
+ return null;
+ }
+
protected IPropertiesContainer getDefaultData() {
return new PropertiesContainer();
}