use of org.eclipse.tracecompass.internal.tmf.analysis.xml.core.fsm.model.IBaseQuarkProvider in project tracecompass by tracecompass.
the class TmfXmlStateSystemPathCu method compile.
/**
* Compile a state system path from a list of XML elements
*
* @param analysisData
* The analysis data already compiled
* @param elements
* The state attribute XML elements to compile
* @return The state system path compilation unit or <code>null</code> if
* there was a compilation error
*/
@Nullable
public static TmfXmlStateSystemPathCu compile(AnalysisCompilationData analysisData, List<Element> elements) {
IBaseQuarkProvider quarkProvider = IBaseQuarkProvider.IDENTITY_BASE_QUARK;
List<TmfXmlStateValueCu> subAttribs = new ArrayList<>();
for (Element subAttributeNode : elements) {
List<TmfXmlStateValueCu> subAttrib = TmfXmlStateValueCu.compileAttribute(analysisData, subAttributeNode);
if (subAttrib == null) {
return null;
}
// by a scenario quark provider
if (subAttrib.size() == 1) {
if (subAttrib.get(0) == TmfXmlStateValueCu.CURRENT_SCENARIO_QUARK) {
quarkProvider = IBaseQuarkProvider.CURRENT_SCENARIO_BASE_QUARK;
continue;
}
}
subAttribs.addAll(subAttrib);
}
return new TmfXmlStateSystemPathCu(subAttribs, quarkProvider);
}
Aggregations