/** * @return default LookAndFeelInfo for the running OS. For Win32 and Linux the method returns * Alloy LAF or IDEA LAF if first not found, for Mac OS X it returns Aqua RubyMine uses Native * L&F for linux as well */ private UIManager.LookAndFeelInfo getDefaultLaf() { final String systemLafClassName = UIManager.getSystemLookAndFeelClassName(); if (SystemInfo.isMac) { UIManager.LookAndFeelInfo laf = findLaf(systemLafClassName); LOG.assertTrue(laf != null); return laf; } if (PlatformUtils.isRubyMine() || PlatformUtils.isPyCharm()) { final String desktop = AccessController.doPrivileged(new GetPropertyAction("sun.desktop")); if ("gnome".equals(desktop)) { UIManager.LookAndFeelInfo laf = findLaf(systemLafClassName); if (laf != null) { return laf; } LOG.info("Could not find system look and feel: " + laf); } } // Default final String defaultLafName = StartupUtil.getDefaultLAF(); if (defaultLafName != null) { UIManager.LookAndFeelInfo defaultLaf = findLaf(defaultLafName); if (defaultLaf != null) { return defaultLaf; } } UIManager.LookAndFeelInfo ideaLaf = findLaf( isIntelliJLafEnabled() ? IntelliJLaf.class.getName() : IdeaLookAndFeelInfo.CLASS_NAME); if (ideaLaf != null) { return ideaLaf; } throw new IllegalStateException("No default look&feel found"); }
public FindSettingsImpl() { RECENT_FILE_MASKS.add("*.properties"); RECENT_FILE_MASKS.add("*.html"); RECENT_FILE_MASKS.add("*.jsp"); RECENT_FILE_MASKS.add("*.xml"); RECENT_FILE_MASKS.add("*.java"); RECENT_FILE_MASKS.add("*.js"); RECENT_FILE_MASKS.add("*.as"); RECENT_FILE_MASKS.add("*.css"); RECENT_FILE_MASKS.add("*.mxml"); if (PlatformUtils.isPyCharm()) { RECENT_FILE_MASKS.add("*.py"); } else if (PlatformUtils.isRubyMine()) { RECENT_FILE_MASKS.add("*.rb"); } else if (PlatformUtils.isPhpStorm()) { RECENT_FILE_MASKS.add("*.php"); } }