fixed text in font editor for PyCharm
authorDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Fri, 8 Oct 2010 15:28:09 +0000 (19:28 +0400)
committerDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Mon, 11 Oct 2010 16:35:11 +0000 (20:35 +0400)
platform/lang-impl/src/com/intellij/application/options/colors/FontEditorPreview.java

index 98b7364e85523c98a494eff30c4be86ece480dc8..e862f5619662fb1afaf68da459642b2839fba4d8 100644 (file)
@@ -48,19 +48,25 @@ public class FontEditorPreview implements PreviewPanel{
 
   public static String getIDEDemoText() {
     String name = ApplicationNamesInfo.getInstance().getFullProductName();
-    String language = "Java";   // HACK
-    if (name.contains("RubyMine")) {
-      language = "Ruby";
-    }
-    else if (name.contains("PyCharm")) {
-      language = "Python";
-    }
+    String language = getLanguage(name); // HACK
     return
       name + " is a full-featured " + language + " IDE\n" +
       "with a high level of usability and outstanding\n" +
       "advanced code editing and refactoring support.\n";
   }
 
+  private static String getLanguage(String name) {
+    if (name.contains("RubyMine")) {
+      return "Ruby";
+    }
+
+    if (name.contains("PyCharm")) {
+      return "Python";
+    }
+
+    return "Java";
+  }
+
   static void installTrafficLights(EditorEx editor) {
     ErrorStripeRenderer renderer = new TrafficLightRenderer(null,null,null,null){
       protected DaemonCodeAnalyzerStatus getDaemonCodeAnalyzerStatus(boolean fillErrorsCount, SeverityRegistrar severityRegistrar) {