use of org.eclipse.che.ide.api.editor.events.GutterClickEvent 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);
}
use of org.eclipse.che.ide.api.editor.events.GutterClickEvent in project che by eclipse.
the class OrionEditorWidget method fireGutterClickEvent.
private void fireGutterClickEvent(final int line) {
final GutterClickEvent gutterEvent = new GutterClickEvent(line, Gutters.BREAKPOINTS_GUTTER, null);
fireEvent(gutterEvent);
this.embeddedDocument.getDocEventBus().fireEvent(gutterEvent);
}
Aggregations