use of org.eclipse.linuxtools.systemtap.graphing.core.structures.ChartStreamDaemon in project linuxtools by eclipse.
the class RunScriptChartHandler method scriptConsoleInitialized.
@Override
protected void scriptConsoleInitialized(ScriptConsole console) {
int n = parsers.size();
for (int i = 0; i < n; i++) {
console.getCommand().addInputStreamListener(new ChartStreamDaemon(dataSets.get(i), parsers.get(i)));
}
try {
String name = console.getName();
String title = name.substring(name.lastIndexOf('/') + 1);
IWorkbenchPage p = PlatformUI.getWorkbench().showPerspective(IDEPerspective.ID, PlatformUI.getWorkbench().getActiveWorkbenchWindow());
GraphSelectorEditor ivp = (GraphSelectorEditor) p.openEditor(new GraphSelectorEditorInput(title), GraphSelectorEditor.ID);
String scriptName = console.getName();
ivp.createScriptSets(scriptName, names, dataSets);
for (int i = 0; i < n; i++) {
for (GraphData graph : graphs.get(i)) {
ivp.getDisplaySet(i).addGraph(graph);
}
}
} catch (WorkbenchException we) {
ExceptionErrorDialog.openError(Messages.RunScriptChartHandler_couldNotSwitchToGraphicPerspective, we);
}
super.scriptConsoleInitialized(console);
}
use of org.eclipse.linuxtools.systemtap.graphing.core.structures.ChartStreamDaemon in project linuxtools by eclipse.
the class ChartStreamDaemonTest method setUp.
@Before
public void setUp() {
csd = new ChartStreamDaemon(null, null);
assertNotNull(csd);
csd1 = new ChartStreamDaemon(new RowDataSet(new String[] { "a" }), new RowParser(new String[] { "\\w", "\\s" }));
assertNotNull(csd1);
}
Aggregations