use of org.eclipse.n4js.smith.ui.graph.GraphList in project n4js by eclipse.
the class SourceGraphView method createPartControl.
@Override
public void createPartControl(Composite parent) {
// add listener to track the active editor
this.getSite().getPage().addPartListener(new IPartListener() {
@Override
public void partActivated(IWorkbenchPart part) {
updateActiveEditor();
}
@Override
public void partDeactivated(IWorkbenchPart part) {
updateActiveEditor();
}
@Override
public void partOpened(IWorkbenchPart part) {
updateActiveEditor();
}
@Override
public void partClosed(IWorkbenchPart part) {
updateActiveEditor();
}
@Override
public void partBroughtToTop(IWorkbenchPart part) {
// do nothing
}
});
graphList = new GraphList(parent, SWT.NONE, editorOverlay);
astGraphProvider = new ASTGraphProvider();
cfGraphProvider = new CFGraphProvider();
createAction("AST Snapshot", IAction.AS_PUSH_BUTTON, "Take an AST snapshot.", Activator.getInstance().ICON_GRAPH_AST, this::onTakeASTSnapshot);
createAction("CFG Snapshot", IAction.AS_PUSH_BUTTON, "Take a CFG snapshot.", Activator.getInstance().ICON_GRAPH_CF, this::onTakeCFGSnapshot);
// done in GH-235
// createAction(
// "DFG Snapshot", IAction.AS_PUSH_BUTTON,
// "Take a DFG snapshot.",
// Activator.getInstance().ICON_GRAPH_DF,
// this::onTakeCFGSnapshot);
createAction("Pause", IAction.AS_CHECK_BOX, "Suspend accepting snapshots that were triggered programmatically.", Activator.getInstance().ICON_PAUSE, this::onPause).setChecked(paused);
createAction("Delete", IAction.AS_PUSH_BUTTON, "Delete selected snapshots from history.", PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE), this::onDelete);
}
Aggregations