tmf.xml: Add support for consuming event in the fsm
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.analysis.xml.core / src / org / eclipse / tracecompass / internal / tmf / analysis / xml / core / model / TmfXmlScenario.java
index 2e1f0cdc0e78afd9118e293c707a02d4f96168bb..eeea5781b608e38c15247e554e60b68cfba3bfff 100644 (file)
@@ -12,6 +12,7 @@ import java.util.List;
 
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.tmf.analysis.xml.core.Activator;
 import org.eclipse.tracecompass.internal.tmf.analysis.xml.core.model.TmfXmlScenarioHistoryBuilder.ScenarioStatusType;
 import org.eclipse.tracecompass.internal.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
 import org.eclipse.tracecompass.internal.tmf.analysis.xml.core.pattern.stateprovider.XmlPatternStateProvider;
@@ -98,6 +99,7 @@ public class TmfXmlScenario {
             return;
         }
 
+        fFsm.setEventConsumed(true);
         // Processing the actions in the transition
         final List<String> actions = out.getAction();
         for (String actionId : actions) {
@@ -105,7 +107,8 @@ public class TmfXmlScenario {
             if (action != null) {
                 action.execute(event, fScenarioInfo);
             } else {
-                throw new IllegalStateException("Action " + actionId + " cannot be found."); //$NON-NLS-1$ //$NON-NLS-2$
+                Activator.logError("Action " + actionId + " cannot be found."); //$NON-NLS-1$ //$NON-NLS-2$
+                return;
             }
         }
 
This page took 0.029494 seconds and 5 git commands to generate.