use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.row.LineParser in project linuxtools by eclipse.
the class SystemTapScriptGraphOptionsTab method createDatasetParsers.
/**
* Creates a list of parsers, one for each regular expression created, that will be used
* to parse the output of a running script.
* @param configuration The desired run configuration.
* @return A list of parsers.
*/
public static List<IDataSetParser> createDatasetParsers(ILaunchConfiguration configuration) {
try {
int numberOfRegexs = configuration.getAttribute(NUMBER_OF_REGEXS, 0);
ArrayList<IDataSetParser> parsers = new ArrayList<>(numberOfRegexs);
for (int r = 0; r < numberOfRegexs; r++) {
// $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
parsers.add(new LineParser("^" + configuration.getAttribute(REGULAR_EXPRESSION + r, "") + "$"));
}
return parsers;
} catch (CoreException e) {
ExceptionErrorDialog.openError(Messages.SystemTapScriptGraphOptionsTab_cantInitializeTab, e);
}
return null;
}
Aggregations