mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
hide some non-applicable keymaps 2
GitOrigin-RevId: 63107dd637cdc6474d75ff1ae0d9d9ef7c330c34
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b0aaa01ee8
commit
b0c39ed30c
+13
-10
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.keymap.impl;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -42,16 +43,18 @@ public class DefaultBundledKeymaps implements BundledKeymapProvider {
|
||||
for (BundledKeymapBean bean : BundledKeymapBean.EP_NAME.getExtensionList()) {
|
||||
result.add(bean.file.replace("$OS$", os));
|
||||
}
|
||||
if (SystemInfo.isWindows || SystemInfo.isMac) {
|
||||
result.remove("Default for XWin.xml");
|
||||
result.remove("Default for GNOME.xml");
|
||||
result.remove("Default for KDE.xml");
|
||||
}
|
||||
if (!SystemInfo.isMac) {
|
||||
result.remove("Mac OS X.xml");
|
||||
result.remove("Mac OS X 10.5+.xml");
|
||||
result.remove("Eclipse (Mac OS X).xml");
|
||||
result.remove("Sublime Text (Mac OS X).xml");
|
||||
if (!ApplicationManager.getApplication().isHeadlessEnvironment()) {
|
||||
if (SystemInfo.isWindows || SystemInfo.isMac) {
|
||||
result.remove("Default for XWin.xml");
|
||||
result.remove("Default for GNOME.xml");
|
||||
result.remove("Default for KDE.xml");
|
||||
}
|
||||
if (!SystemInfo.isMac) {
|
||||
result.remove("Mac OS X.xml");
|
||||
result.remove("Mac OS X 10.5+.xml");
|
||||
result.remove("Eclipse (Mac OS X).xml");
|
||||
result.remove("Sublime Text (Mac OS X).xml");
|
||||
}
|
||||
}
|
||||
return new ArrayList<>(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user