本文整理汇总了Java中com.intellij.openapi.keymap.Keymap.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Keymap.getName方法的具体用法?Java Keymap.getName怎么用?Java Keymap.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.keymap.Keymap
的用法示例。
在下文中一共展示了Keymap.getName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: matchesPlatform
import com.intellij.openapi.keymap.Keymap; //导入方法依赖的package包/类
private static boolean matchesPlatform(Keymap keymap) {
final String name = keymap.getName();
if (KeymapManager.DEFAULT_IDEA_KEYMAP.equals(name)) {
return SystemInfo.isWindows;
}
else if (KeymapManager.MAC_OS_X_KEYMAP.equals(name) || KeymapManager.MAC_OS_X_10_5_PLUS_KEYMAP.equals(name)) {
return SystemInfo.isMac;
}
else if (KeymapManager.X_WINDOW_KEYMAP.equals(name) || "Default for GNOME".equals(name) || "Default for KDE".equals(name)) {
return SystemInfo.isXWindow;
}
return true;
}
示例2: ensureUniqueKeymapNames
import com.intellij.openapi.keymap.Keymap; //导入方法依赖的package包/类
private void ensureUniqueKeymapNames() throws ConfigurationException {
final Set<String> keymapNames = new HashSet<String>();
for(int i = 0; i < myKeymapListModel.getSize(); i++){
final Keymap modelKeymap = (Keymap)myKeymapListModel.getElementAt(i);
String name = modelKeymap.getName();
if (keymapNames.contains(name)) {
throw new ConfigurationException(KeyMapBundle.message("configuration.all.keymaps.should.have.unique.names.error.message"));
}
keymapNames.add(name);
}
}
示例3: matchesPlatform
import com.intellij.openapi.keymap.Keymap; //导入方法依赖的package包/类
private static boolean matchesPlatform(Keymap keymap) {
final String name = keymap.getName();
if (KeymapManager.DEFAULT_IDEA_KEYMAP.equals(name)) {
return SystemInfo.isWindows;
}
else if (KeymapManager.MAC_OS_X_KEYMAP.equals(name) || "Mac OS X 10.5+".equals(name)) {
return SystemInfo.isMac;
}
else if (KeymapManager.X_WINDOW_KEYMAP.equals(name) || "Default for GNOME".equals(name) || "Default for KDE".equals(name)) {
return SystemInfo.isXWindow;
}
return true;
}