use of org.eclipse.linuxtools.systemtap.graphing.ui.GraphDisplaySet in project linuxtools by eclipse.
the class SaveGraphImageHandler method getActiveGraph.
private AbstractChartBuilder getActiveGraph() {
GraphSelectorEditor graphEditor = getActiveGraphEditor();
if (graphEditor == null) {
return null;
}
GraphDisplaySet gds = graphEditor.getActiveDisplaySet();
return gds == null ? null : gds.getActiveGraph();
}
use of org.eclipse.linuxtools.systemtap.graphing.ui.GraphDisplaySet in project linuxtools by eclipse.
the class GraphSelectorEditor method createScriptSets.
/**
* This method will create a new script set for each of the provided dataSets.
* Each new script set will be given a new tab item at the end of the list.
* @param scriptName The full name of the script that is being monitored.
* @param titles The names to be shown on each new tab
* @param dataSets The <code>IFilteredDataSet</code>s for each new script set
* @since 2.2
*/
public void createScriptSets(String scriptName, List<String> titles, List<IFilteredDataSet> dataSets) {
CTabItem item = null;
for (int i = 0, n = titles.size(); i < n; i++) {
item = new CTabItem(scriptFolder, SWT.CLOSE);
item.setText(titles.get(i));
Composite parent = new Composite(scriptFolder, SWT.NONE);
final GraphDisplaySet gds = new GraphDisplaySet(parent, dataSets.get(i));
displaySets.add(gds);
item.setControl(parent);
item.addDisposeListener(e -> gds.dispose());
}
// Choose the last created item.
scriptFolder.setSelection(item);
this.setPartName(NLS.bind(Messages.GraphSelectorEditor_graphsEditorTitle, scriptName.substring(scriptName.lastIndexOf('/') + 1)));
}
Aggregations