diff options
author | Pablo Torregrosa Paez | 2015-12-03 13:49:39 +0000 |
---|---|---|
committer | Uwe Stieber | 2015-12-03 15:02:28 +0000 |
commit | 6a92e45b16ebc4045876caf00fc075e0f5df7f0a (patch) | |
tree | abce4cba861080baedc5c98f05719d71f0bfa278 | |
parent | 025c9108ff4165bc46ecbf4e523625c03288cdab (diff) | |
download | 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 org.eclipse.tcf-1.4_WR_20151211_4.5.0_bugfix.zip |
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.java | 12 |
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 d8f166f15..524c4bd2f 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(); } |