use of org.eclipse.che.ide.api.editor.events.GutterClickHandler in project che by eclipse.
the class OrionEditorPresenter method setupEventHandlers.
private void setupEventHandlers() {
this.editorWidget.addChangeHandler(new ChangeHandler() {
@Override
public void onChange(final ChangeEvent event) {
handleDocumentChanged();
}
});
this.editorWidget.addGutterClickHandler(new GutterClickHandler() {
@Override
public void onGutterClick(final GutterClickEvent event) {
if (Gutters.BREAKPOINTS_GUTTER.equals(event.getGutterId()) || Gutters.LINE_NUMBERS_GUTTER.equals(event.getGutterId())) {
breakpointManager.changeBreakpointState(event.getLineNumber());
}
}
});
this.editorWidget.addKeyBinding(new KeyBinding(true, false, false, false, KeyCodes.KEY_F8, new KeyBindingAction() {
@Override
public boolean action() {
int currentLine = editorWidget.getDocument().getCursorPosition().getLine();
breakpointManager.changeBreakpointState(currentLine);
return true;
}
}), TOGGLE_LINE_BREAKPOINT);
}
Aggregations