| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -189,7 +189,7 @@ static private void createAndShowGUI(String[] args) { | |||
| 189 | 189 | } catch (Exception e) { | |
| 190 | 190 | // String mess = e.getMessage(); | |
| 191 | 191 | // if (!mess.contains("ch.randelshofer.quaqua.QuaquaLookAndFeel")) { | |
| 192 | - log("Could not set the Look & Feel", e); //$NON-NLS-1$ | ||
| 192 | + loge("Could not set the Look & Feel", e); //$NON-NLS-1$ | ||
| 193 | 193 | // } | |
| 194 | 194 | } | |
| 195 | 195 | ||
@@ -2970,10 +2970,17 @@ static public void logf(String message, Object... args) { | |||
| 2970 | 2970 | } | |
| 2971 | 2971 | ||
| 2972 | 2972 | ||
| 2973 | - static public void log(String message, Throwable e) { | ||
| 2973 | + static public void loge(String message, Throwable e) { | ||
| 2974 | 2974 | if (DEBUG) { | |
| 2975 | - System.out.println(message); | ||
| 2975 | + System.err.println(message); | ||
| 2976 | 2976 | e.printStackTrace(); | |
| 2977 | 2977 | } | |
| 2978 | 2978 | } | |
| 2979 | + | ||
| 2980 | + | ||
| 2981 | + static public void loge(String message) { | ||
| 2982 | + if (DEBUG) { | ||
| 2983 | + System.out.println(message); | ||
| 2984 | + } | ||
| 2985 | + } | ||
| 2979 | 2986 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1118,7 +1118,7 @@ public void actionPerformed(ActionEvent e) { | |||
| 1118 | 1118 | statusError("\"" + tool.getMenuTitle() + "\" is not" + | |
| 1119 | 1119 | "compatible with this version of Processing"); | |
| 1120 | 1120 | //nsme.printStackTrace(); | |
| 1121 | - Base.log("Incompatible tool found during tool.run()", nsme); | ||
| 1121 | + Base.loge("Incompatible tool found during tool.run()", nsme); | ||
| 1122 | 1122 | item.setEnabled(false); | |
| 1123 | 1123 | ||
| 1124 | 1124 | } catch (Exception ex) { | |
@@ -1156,13 +1156,13 @@ protected void addTools(JMenu menu, ArrayList<ToolContribution> tools) { | |||
| 1156 | 1156 | System.err.println("\"" + tool.getMenuTitle() + "\" is not " + | |
| 1157 | 1157 | "compatible with this version of Processing"); | |
| 1158 | 1158 | System.err.println("The " + nsme.getMessage() + " method no longer exists."); | |
| 1159 | - Base.log("Incompatible Tool found during tool.init()", nsme); | ||
| 1159 | + Base.loge("Incompatible Tool found during tool.init()", nsme); | ||
| 1160 | 1160 | ||
| 1161 | 1161 | } catch (NoClassDefFoundError ncdfe) { | |
| 1162 | 1162 | System.err.println("\"" + tool.getMenuTitle() + "\" is not " + | |
| 1163 | 1163 | "compatible with this version of Processing"); | |
| 1164 | 1164 | System.err.println("The " + ncdfe.getMessage() + " class is no longer available."); | |
| 1165 | - Base.log("Incompatible Tool found during tool.init()", ncdfe); | ||
| 1165 | + Base.loge("Incompatible Tool found during tool.init()", ncdfe); | ||
| 1166 | 1166 | ||
| 1167 | 1167 | } catch (Error err) { | |
| 1168 | 1168 | System.err.println("An error occurred inside \"" + tool.getMenuTitle() + "\""); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1230,10 +1230,15 @@ protected TokenMarker createTokenMarker() { | |||
| 1230 | 1230 | ||
| 1231 | 1231 | // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | |
| 1232 | 1232 | ||
| 1233 | + // Get attributes/values from the theme.txt file. To discourage burying this | ||
| 1234 | + // kind of information in code where it doesn't belong (and is difficult to | ||
| 1235 | + // track down), these don't have a "default" option as a second parameter. | ||
| 1233 | 1236 | ||
| 1234 | - //public String get(String attribute) { | ||
| 1235 | - // return theme.get(attribute); | ||
| 1236 | - //} | ||
| 1237 | + | ||
| 1238 | + /** @since 3.0a6 */ | ||
| 1239 | + public String getString(String attribute) { | ||
| 1240 | + return theme.get(attribute); | ||
| 1241 | + } | ||
| 1237 | 1242 | ||
| 1238 | 1243 | ||
| 1239 | 1244 | public boolean getBoolean(String attribute) { | |
@@ -1252,7 +1257,6 @@ public Color getColor(String attribute) { | |||
| 1252 | 1257 | ||
| 1253 | 1258 | ||
| 1254 | 1259 | public Font getFont(String attribute) { | |
| 1255 | - // System.out.println("getFont(" + attribute + ") -> " + theme.getFont(attribute)); | ||
| 1256 | 1260 | return theme.getFont(attribute); | |
| 1257 | 1261 | } | |
| 1258 | 1262 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -111,14 +111,14 @@ public void run() { | |||
| 111 | 111 | } | |
| 112 | 112 | // } | |
| 113 | 113 | } catch (IOException e) { | |
| 114 | - Base.log("SingleInstance error while listening", e); | ||
| 114 | + Base.loge("SingleInstance error while listening", e); | ||
| 115 | 115 | } | |
| 116 | 116 | } | |
| 117 | 117 | } | |
| 118 | 118 | }, "SingleInstance Server").start(); | |
| 119 | 119 | ||
| 120 | 120 | } catch (IOException e) { | |
| 121 | - Base.log("Could not create single instance server.", e); | ||
| 121 | + Base.loge("Could not create single instance server.", e); | ||
| 122 | 122 | } | |
| 123 | 123 | } | |
| 124 | 124 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -665,7 +665,7 @@ static public Font getMonoFont(int size, int style) { | |||
| 665 | 665 | //monoBoldFont = createFont("SourceCodePro-Semibold.ttf", size); | |
| 666 | 666 | monoBoldFont = createFont("SourceCodePro-Bold.ttf", size); | |
| 667 | 667 | } catch (Exception e) { | |
| 668 | - Base.log("Could not load mono font", e); | ||
| 668 | + Base.loge("Could not load mono font", e); | ||
| 669 | 669 | monoFont = new Font("Monospaced", Font.PLAIN, size); | |
| 670 | 670 | monoBoldFont = new Font("Monospaced", Font.BOLD, size); | |
| 671 | 671 | } | |
@@ -692,7 +692,7 @@ static public Font getSansFont(int size, int style) { | |||
| 692 | 692 | sansFont = createFont("SourceSansPro-Regular.ttf", size); | |
| 693 | 693 | sansBoldFont = createFont("SourceSansPro-Semibold.ttf", size); | |
| 694 | 694 | } catch (Exception e) { | |
| 695 | - Base.log("Could not load sans font", e); | ||
| 695 | + Base.loge("Could not load sans font", e); | ||
| 696 | 696 | sansFont = new Font("SansSerif", Font.PLAIN, size); | |
| 697 | 697 | sansBoldFont = new Font("SansSerif", Font.BOLD, size); | |
| 698 | 698 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -56,7 +56,7 @@ static public ModeContribution load(Base base, File folder, | |||
| 56 | 56 | // For the built-in modes, don't print the exception, just log it | |
| 57 | 57 | // for debugging. This should be impossible for most users to reach, | |
| 58 | 58 | // but it helps us load experimental mode when it's available. | |
| 59 | - Base.log("ModeContribution.load() failed for " + searchName, err); | ||
| 59 | + Base.loge("ModeContribution.load() failed for " + searchName, err); | ||
| 60 | 60 | } | |
| 61 | 61 | } | |
| 62 | 62 | return null; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2369,7 +2369,7 @@ public void mouseDragged(MouseEvent evt) { | |||
| 2369 | 2369 | try { | |
| 2370 | 2370 | select(getMarkPosition(), xyToOffset(evt.getX(), evt.getY())); | |
| 2371 | 2371 | } catch (ArrayIndexOutOfBoundsException e) { | |
| 2372 | - Base.log("xToOffset problem", e); | ||
| 2372 | + Base.loge("xToOffset problem", e); | ||
| 2373 | 2373 | } | |
| 2374 | 2374 | } else { | |
| 2375 | 2375 | int line = yToLine(evt.getY()); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | <?xml version="1.0" encoding="UTF-8"?> | |
| 2 | 2 | <classpath> | |
| 3 | 3 | <classpathentry kind="src" path="generated"/> | |
| 4 | - <classpathentry kind="src" path="src"/> | ||
| 4 | + <classpathentry excluding="processing/mode/java/PresentMode.java" kind="src" path="src"/> | ||
| 5 | 5 | <classpathentry kind="lib" path="mode/antlr.jar"/> | |
| 6 | 6 | <classpathentry kind="lib" path="mode/classpath-explorer-1.0.jar"/> | |
| 7 | 7 | <classpathentry kind="lib" path="mode/com.ibm.icu.jar"/> | |
| Back | FazBrowse Home | New Git URL |
0 commit comments