diff --git a/java/src/processing/mode/java/JavaEditor.java b/java/src/processing/mode/java/JavaEditor.java index 2005180ed..47e78cdf7 100644 --- a/java/src/processing/mode/java/JavaEditor.java +++ b/java/src/processing/mode/java/JavaEditor.java @@ -1663,7 +1663,7 @@ public class JavaEditor extends Editor { } - protected boolean isDebuggerEnabled() { + public boolean isDebuggerEnabled() { //return enableDebug.isSelected(); return debugEnabled; } @@ -2199,37 +2199,18 @@ public class JavaEditor extends Editor { public void toggleDebug() { -// enableDebug.setSelected(!enableDebug.isSelected()); debugEnabled = !debugEnabled; -// updateDebugToggle(); -// } -// -// -// public void updateDebugToggle() { -// final boolean enabled = isDebuggerEnabled(); + rebuildToolbar(); + repaint(); // show/hide breakpoints in the gutter if (debugEnabled) { debugItem.setText(Language.text("menu.debug.disable")); } else { debugItem.setText(Language.text("menu.debug.enable")); } - -// // Hide the variable inspector if it's currently visible -// if (!debugEnabled && inspector.isVisible()) { -// toggleVariableInspector(); -// } inspector.setVisible(debugEnabled); - /* - if (enabled) { - inspector.setFocusableWindowState(false); // to not get focus when set visible - inspector.setVisible(true); - inspector.setFocusableWindowState(true); // allow to get focus again - } else { - inspector.setVisible(false); - } - */ for (Component item : debugMenu.getMenuComponents()) { if (item instanceof JMenuItem && item != debugItem) { ((JMenuItem) item).setEnabled(debugEnabled); diff --git a/java/src/processing/mode/java/pdex/JavaTextAreaPainter.java b/java/src/processing/mode/java/pdex/JavaTextAreaPainter.java index d8ef42a13..7dfc31b2e 100644 --- a/java/src/processing/mode/java/pdex/JavaTextAreaPainter.java +++ b/java/src/processing/mode/java/pdex/JavaTextAreaPainter.java @@ -76,27 +76,24 @@ public class JavaTextAreaPainter extends TextAreaPainter protected Font gutterTextFont; protected Color gutterTextColor; protected Color gutterLineHighlightColor; -// protected Color gutterTempColor; public static class ErrorLineCoord { - public int xStart; - public int xEnd; - public int yStart; - public int yEnd; - public Problem problem; + public int xStart; + public int xEnd; + public int yStart; + public int yEnd; + public Problem problem; - public ErrorLineCoord(int xStart, int xEnd, int yStart, int yEnd, Problem problem) { - this.xStart = xStart; - this.xEnd = xEnd; - this.yStart = yStart; - this.yEnd = yEnd; - this.problem = problem; + public ErrorLineCoord(int xStart, int xEnd, int yStart, int yEnd, Problem problem) { + this.xStart = xStart; + this.xEnd = xEnd; + this.yStart = yStart; + this.yEnd = yEnd; + this.problem = problem; } } public List errorLineCoords = new ArrayList<>(); -// static int ctrlMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); - public JavaTextAreaPainter(JavaTextArea textArea, TextAreaDefaults defaults) { super(textArea, defaults); @@ -271,7 +268,10 @@ public class JavaTextAreaPainter extends TextAreaPainter } gfx.fillRect(0, y, Editor.LEFT_GUTTER, fm.getHeight()); - String text = getTextArea().getGutterText(line); + String text = null; + if (getEditor().isDebuggerEnabled()) { + text = getTextArea().getGutterText(line); + } // if no special text for a breakpoint, just show the line number if (text == null) { text = String.valueOf(line + 1); @@ -293,6 +293,7 @@ public class JavaTextAreaPainter extends TextAreaPainter } + /* // Failed attempt to switch line numbers to old-style figures String makeOSF(String what) { char[] c = what.toCharArray(); @@ -301,81 +302,7 @@ public class JavaTextAreaPainter extends TextAreaPainter } return new String(c); } - - -// /** -// * Paint the gutter background (solid color). -// * -// * @param gfx -// * the graphics context -// * @param line -// * 0-based line number -// * @param x -// * horizontal position -// */ -// protected void paintGutterBg(Graphics gfx, int line, int x) { -// gfx.setColor(getTextArea().gutterBgColor); -// gfx.setColor(Color.ORANGE); -// int y = textArea.lineToY(line) + fm.getLeading() + fm.getMaxDescent(); -// gfx.fillRect(0, y, Editor.LEFT_GUTTER, fm.getHeight()); -// } - - -// /** -// * Paint the vertical gutter separator line. -// * -// * @param gfx -// * the graphics context -// * @param line -// * 0-based line number -// * @param x -// * horizontal position -// */ -// protected void paintGutterLine(Graphics gfx, int line, int x) { -// int y = textArea.lineToY(line) + fm.getLeading() + fm.getMaxDescent(); -// gfx.setColor(getTextArea().gutterLineColor); -// gfx.setColor(Color.GREEN); -// gfx.drawLine(Editor.LEFT_GUTTER, y, -// Editor.LEFT_GUTTER, y + fm.getHeight()); -// } - - -// /** -// * Paint the gutter text. -// * -// * @param gfx -// * the graphics context -// * @param line -// * 0-based line number -// * @param x -// * horizontal position -// */ -// protected void paintGutterText(Graphics gfx, int line, int x) { -// String text = getTextArea().getGutterText(line); -// if (text == null) { -// return; -// } -// -// gfx.setFont(getFont()); -// Color textColor = getTextArea().getGutterTextColor(line); -// if (textColor == null) { -// gfx.setColor(getForeground()); -// } else { -// gfx.setColor(textColor); -// } -// int y = textArea.lineToY(line) + fm.getHeight(); -// -// // draw 4 times to make it appear bold, displaced 1px to the right, to the bottom and bottom right. -// //int len = text.length() > ta.gutterChars ? ta.gutterChars : text.length(); -// Utilities.drawTabbedText(new Segment(text.toCharArray(), 0, text.length()), -// Editor.GUTTER_MARGIN, y, gfx, this, 0); -// Utilities.drawTabbedText(new Segment(text.toCharArray(), 0, text.length()), -// Editor.GUTTER_MARGIN + 1, y, gfx, this, 0); -// Utilities.drawTabbedText(new Segment(text.toCharArray(), 0, text.length()), -// Editor.GUTTER_MARGIN, y + 1, gfx, this, 0); -// Utilities.drawTabbedText(new Segment(text.toCharArray(), 0, text.length()), -// Editor.GUTTER_MARGIN + 1, y + 1, gfx, this, 0); -// } + */ /** diff --git a/todo.txt b/todo.txt index 8dd9d8a9a..a6cf83658 100644 --- a/todo.txt +++ b/todo.txt @@ -1,4 +1,10 @@ 0241 (3.0b3) +_ 'examples' shows as a folder in the sketchbook window + +cleaning/earlier +X move to launch4j 3.7 http://launch4j.sourceforge.net/ +X actually upgraded to 3.8 +X make examples pull/build automatic during dist known issues @@ -6,9 +12,13 @@ _ launch4j doesn't work from folders with non-native charsets _ anything in CP1252 on an English Windows system is fine _ but anything else reports "font sadness" b/c it's using the system JRE _ https://github.com/processing/processing/issues/3543 +_ move to javapackager or another option? +_ http://www.excelsiorjet.com/kb/35/howto-create-a-single-exe-from-your-java-application 3.0 final +_ more ARM patches +_ https://github.com/processing/processing/pull/3566 _ Contributions Manager UI design _ https://github.com/processing/processing/issues/3482 _ Ready to add contributed example packages? @@ -16,11 +26,14 @@ _ https://github.com/processing/processing/issues/2953 _ processing-java isn't working in OSX 10.11 El Capitan _ https://github.com/processing/processing/issues/3497 _ probably have to add the script/Processing.app location to user's path +_ move processing-java inside the Java Mode? +_ make a Tool that installs it for all platforms, not just OS X +_ not really part of the 'build' anymore +_ should Platform be a static instance? +_ lots of platform stuff in base, but might be better handled elsewhere gui -_ another round of ARM patches -_ https://github.com/processing/processing/pull/3555 _ fix red in sidebar, the squiggly line beneath code _ show hover text with 'debug' _ show number of updates available in the footer @@ -83,19 +96,9 @@ _ sketchbook window too? _ 'ant clean' not removing old versions created by dist _ continue clearing out ProgressFrame _ also hook up the statusNotice() when done -_ move to launch4j 3.7 http://launch4j.sourceforge.net/ -_ move processing-java inside the Java Mode? -_ make a Tool that installs it for all platforms, not just OS X -_ not really part of the 'build' anymore _ break out Mode options to their own panels in prefs _ Mode should just provide a panel for their prefs -_ make examples pull/build automatic during dist -_ make reference build process part of dist -_ https://github.com/processing/processing-docs/issues/85 -_ separate ant target, but only require them for dist -_ as separate targets, folks can build explicitly if they'd like -_ processing-docs/java_generate/ReferenceGenerator/processingrefBuild.sh -_ remove reference.zip from main repo +_ make the build fail it git pull on processing-docs fails _ move the language stuff to the settings folder _ that way people can modify and test w/o recompiling _ https://github.com/processing/processing/issues/2938 @@ -976,6 +979,12 @@ FUTURE Notes for some indefinite later release... +_ make reference build process part of dist +_ https://github.com/processing/processing-docs/issues/85 +_ separate ant target, but only require them for dist +_ as separate targets, folks can build explicitly if they'd like +_ processing-docs/java_generate/ReferenceGenerator/processingrefBuild.sh +_ remove reference.zip from main repo _ using svg images for res-indep icons/gui _ http://stackoverflow.com/questions/2495501/swing-batik-create-an-imageicon-from-an-svg-file _ nurbs or other architecture stuff