use of org.eclipse.che.ide.util.input.CharCodeWithModifiers in project che by eclipse.
the class HotKeysDialogPresenter method getIDEHotKey.
private List<HotKeyItem> getIDEHotKey() {
List<HotKeyItem> ideHotKeys = new ArrayList<>();
Scheme scheme = keyBindingAgent.getScheme(selectedSchemeId);
for (String actionId : actionManager.getActionIds("")) {
boolean isGlobal = false;
CharCodeWithModifiers activeCharCodeWithModifiers = scheme.getKeyBinding(actionId);
if (activeCharCodeWithModifiers == null) {
activeCharCodeWithModifiers = keyBindingAgent.getKeyBinding(actionId);
isGlobal = true;
}
if (activeCharCodeWithModifiers != null) {
String hotKey = KeyMapUtil.getShortcutText(activeCharCodeWithModifiers);
String description = actionManager.getAction(actionId).getTemplatePresentation().getDescription();
if (description != null && !description.isEmpty()) {
ideHotKeys.add(new HotKeyItem(description, hotKey, isGlobal));
}
}
}
return ideHotKeys;
}
Aggregations