diff --git a/app/src/processing/app/EditorToolbar.java b/app/src/processing/app/EditorToolbar.java index 756d10c81..e02572691 100644 --- a/app/src/processing/app/EditorToolbar.java +++ b/app/src/processing/app/EditorToolbar.java @@ -35,18 +35,6 @@ import javax.swing.event.*; */ public abstract class EditorToolbar extends JComponent implements MouseInputListener, KeyListener { -// /** Rollover titles for each button. */ -// static final String title[] = { -// "Run", "Stop", "New", "Open", "Save", "Export" -// }; -// -// /** Titles for each button when the shift key is pressed. */ -// static final String titleShift[] = { -// "Present", "Stop", "New Editor Window", "Open in Another Window", "Save", "Export to Application" -// }; - - -// static final int BUTTON_COUNT = title.length; /** Width of each toolbar button. */ static final int BUTTON_WIDTH = 27; /** Height of each toolbar button. */ @@ -279,6 +267,20 @@ public abstract class EditorToolbar extends JComponent implements MouseInputList } } + + protected void checkRollover(int x, int y) { + Button over = findSelection(x, y); + if (over != null) { + // if (state[sel] != ACTIVE) { + if (over.state != ACTIVE) { + // setState(sel, ROLLOVER, true); + over.setState(ROLLOVER, true); + // currentRollover = sel; + rollover = over; + } + } + } + public void mouseMoved(MouseEvent e) { if (!isEnabled()) return; @@ -310,17 +312,7 @@ public abstract class EditorToolbar extends JComponent implements MouseInputList rollover = null; } } - // int sel = findSelection(x, y); - Button over = findSelection(x, y); - if (over != null) { - // if (state[sel] != ACTIVE) { - if (over.state != ACTIVE) { - // setState(sel, ROLLOVER, true); - over.setState(ROLLOVER, true); - // currentRollover = sel; - rollover = over; - } - } + checkRollover(x, y); } @@ -442,6 +434,10 @@ public abstract class EditorToolbar extends JComponent implements MouseInputList popup.show(this, x, y); } + // Need to reset the rollover here. If the window isn't active, + // the rollover wouldn't have been updated. + // http://code.google.com/p/processing/issues/detail?id=561 + checkRollover(x, y); if (rollover != null) { //handlePressed(rollover); handlePressed(e, buttons.indexOf(rollover)); diff --git a/app/src/processing/mode/java/preproc/PdePreprocessor.java b/app/src/processing/mode/java/preproc/PdePreprocessor.java index 2b2e75fe7..bfd01b53f 100644 --- a/app/src/processing/mode/java/preproc/PdePreprocessor.java +++ b/app/src/processing/mode/java/preproc/PdePreprocessor.java @@ -373,7 +373,10 @@ public class PdePreprocessor { } private static final Pattern PUBLIC_CLASS = - Pattern.compile("(^|;)\\s*public\\s+class", Pattern.MULTILINE); + Pattern.compile("(^|;)\\s*public\\s+class\\s+\\S+\\s+extends\\s+PApplet", Pattern.MULTILINE); + // Can't only match any 'public class', needs to be a PApplet + // http://code.google.com/p/processing/issues/detail?id=551 + //Pattern.compile("(^|;)\\s*public\\s+class", Pattern.MULTILINE); private static final Pattern FUNCTION_DECL = Pattern.compile("(^|;)\\s*((public|private|protected|final|static)\\s+)*" + diff --git a/todo.txt b/todo.txt index 35bbda9a7..38f9316be 100644 --- a/todo.txt +++ b/todo.txt @@ -1,4 +1,11 @@ 0195 (pre) +X Sketch restarts automatically after pressing stop button on PDE +X problem with window focus issues +X http://code.google.com/p/processing/issues/detail?id=561 +X 'unexpected token void' for any type of error +X (due to fallback in preprocessor) +X 'public' keyword in class declarations breaks syntax checker +X http://code.google.com/p/processing/issues/detail?id=551 earlier X Unsatisfied Link Error running OPENGL on 64-bit ubuntu @@ -13,10 +20,6 @@ _ this might be the same as arduino? regressions -_ from jer: 'unexpected token void' for any type of error -_ (due to fallback in preprocessor) -_ 'public' keyword in class declarations breaks syntax checker -_ http://code.google.com/p/processing/issues/detail?id=551 _ strange window flicker when first opened _ test libraries on android _ test .java files on desktop version @@ -60,8 +63,6 @@ http://stackoverflow.com/questions/1611357/how-to-make-a-jar-file-that-include-d _ p5 assets need to be licensed differently from the source -DO NOT USE "JVMArchs". It is deprecated, and manually overrides the natural architecture launching and ordering that LaunchServices does, including accommodating the 32-bit checkbox in the Get Info window. - _ casey's vote: _ Standard, Android, JavaScript, Jython _ or: Processing, Android, Processing.js, Processing.py @@ -1421,6 +1422,8 @@ _ http://dev.processing.org/bugs/show_bug.cgi?id=1513 DIST / Mac OS X +_ the word from apple on Info.plist setup +DO NOT USE "JVMArchs". It is deprecated, and manually overrides the natural architecture launching and ordering that LaunchServices does, including accommodating the 32-bit checkbox in the Get Info window. _ instead of "show sketch folder" method, use: The com.apple.eio.FileManager now has two new desktop interaction methods, revealInFinder(File) and moveToTrash(File). You can use revealInFinder() to open a Finder window in the parent directory of of a file and select it. You can use moveToTrash() to move a file to the most appropriate Trash directory for the volume that contains that file. _ setup() and draw() are not bold on osx (10.4)