use of org.eclipse.che.ide.api.editor.events.CursorActivityHandler in project che by eclipse.
the class TextEditorPartViewImpl method setEditorWidget.
@Override
public void setEditorWidget(final EditorWidget editorWidget) {
if (this.editorPanel.getWidget() != null) {
throw new RuntimeException("Editor already set");
}
this.editorPanel.setWidget(editorWidget);
editorWidget.addCursorActivityHandler(new CursorActivityHandler() {
@Override
public void onCursorActivity(final CursorActivityEvent event) {
delegate.editorCursorPositionChanged();
}
});
editorWidget.addBlurHandler(new BlurHandler() {
@Override
public void onBlur(final BlurEvent event) {
delegate.editorLostFocus();
}
});
editorWidget.addFocusHandler(new FocusHandler() {
@Override
public void onFocus(final FocusEvent event) {
delegate.editorGotFocus();
}
});
}
Aggregations