use of org.eclipse.debug.ui.actions.ToggleBreakpointAction in project dbeaver by serge-rider.
the class ToggleBreakpointHandler method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IEditorPart activeEditor = HandlerUtil.getActiveEditor(event);
if (activeEditor != null) {
SQLEditorBase sqlEditor = activeEditor.getAdapter(SQLEditorBase.class);
if (sqlEditor != null) {
ITextViewer textViewer = sqlEditor.getAdapter(ITextViewer.class);
if (textViewer != null) {
IVerticalRulerInfo rulerInfo = sqlEditor.getAdapter(IVerticalRulerInfo.class);
ToggleBreakpointAction action = new ToggleBreakpointAction(sqlEditor, textViewer.getDocument(), rulerInfo);
action.runWithEvent(new Event());
}
}
}
return null;
}
Aggregations