lttng.ust: Add the build-ID to the key of cache of addr2line calls
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.analysis.xml.core / src / org / eclipse / tracecompass / tmf / analysis / xml / core / model / ResetStoredFieldsAction.java
CommitLineData
3a5f73a1
JCK
1/*******************************************************************************
2 * Copyright (c) 2016 Ecole Polytechnique de Montreal, Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 ******************************************************************************/
9package org.eclipse.tracecompass.tmf.analysis.xml.core.model;
10
11import java.util.Map.Entry;
12
13import org.eclipse.tracecompass.internal.tmf.analysis.xml.core.pattern.stateprovider.XmlPatternStateProvider;
14import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
15import org.eclipse.tracecompass.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
16import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
17
18/**
19 * This action will reset the value of each stored values to a null
20 * {@link ITmfStateValue} in the state system
21 *
22 * @since 2.0
23 */
24public class ResetStoredFieldsAction implements ITmfXmlAction {
25
26 private final IXmlStateSystemContainer fParent;
27
28 /**
29 * Constructor
30 *
31 * @param parent
32 * The state system container this action belongs to
33 */
34 public ResetStoredFieldsAction(IXmlStateSystemContainer parent) {
35 fParent = parent;
36 }
37
38 @Override
39 public void execute(ITmfEvent event, TmfXmlScenarioInfo scenarioInfo) {
40 if (fParent instanceof XmlPatternStateProvider) {
41 for (Entry<String, String> entry : ((XmlPatternStateProvider) fParent).getStoredFields().entrySet()) {
42 ((XmlPatternStateProvider) fParent).getHistoryBuilder().resetStoredFields(fParent, entry.getValue(), scenarioInfo, event);
43 }
44 }
45 }
46}
This page took 0.026013 seconds and 5 git commands to generate.