use of org.eclipse.che.ide.editor.orion.client.jso.OrionTextViewOverlay in project che by eclipse.
the class OrionEditorWidget method getHotKeys.
@Override
public List<HotKeyItem> getHotKeys() {
OrionTextViewOverlay orionTextViewOverlay = editorOverlay.getTextView();
List<HotKeyItem> hotKeyItems = new ArrayList<>();
JsArray<OrionKeyBindingsRelationOverlay> keyBindings = OrionKeyModeOverlay.getKeyBindings_(orionTextViewOverlay);
for (int i = 0; i < keyBindings.length(); i++) {
OrionKeyBindingsRelationOverlay key = keyBindings.get(i);
String actionId = key.getActionId();
String actionDescription = orionTextViewOverlay.getActionDescription(actionId);
String hotKey = UiUtilsOverlay.getUserKeyString(uiUtilsOverlay, key.getKeyBindings());
if (actionDescription != null) {
hotKeyItems.add(new HotKeyItem(actionDescription, hotKey));
}
}
return hotKeyItems;
}
use of org.eclipse.che.ide.editor.orion.client.jso.OrionTextViewOverlay in project che by eclipse.
the class OrionEditorWidget method addFocusHandler.
@Override
public HandlerRegistration addFocusHandler(FocusHandler handler) {
if (!focusHandlerAdded) {
focusHandlerAdded = true;
final OrionTextViewOverlay textView = this.editorOverlay.getTextView();
textView.addEventListener(OrionEventConstants.FOCUS_EVENT, new OrionTextViewOverlay.EventHandlerNoParameter() {
@Override
public void onEvent() {
fireFocusEvent();
}
});
}
return addHandler(handler, FocusEvent.getType());
}
Aggregations