1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-09 22:24:14 +03:00

Merging r327:r331 of the branches/processing-sync into the trunk. This adds the Processing core, and some new features including printing, copy for discourse, better auto-format, improved keyboard shortcuts, etc.

This commit is contained in:
David A. Mellis
2007-09-25 14:04:01 +00:00
parent 413b439974
commit 616d65d32a
40 changed files with 31946 additions and 779 deletions

View File

@@ -24,7 +24,7 @@
package processing.app.tools;
import processing.app.*;
//import processing.core.*;
import processing.core.*;
import java.io.*;
import java.util.StringTokenizer;
@@ -915,26 +915,25 @@ public class AutoFormat {
if (formattedText.equals(originalText)) {
editor.message("No changes necessary for Auto Format.");
} else {
// replace with new bootiful text
// selectionEnd hopefully at least in the neighborhood
editor.setText(formattedText, selectionEnd, selectionEnd);
editor.sketch.setModified(true);
} else if (paren != 0) {
// warn user if there are too many parens in either direction
if (paren != 0) {
editor.error("Warning: Too many " +
editor.error("Auto Format Canceled: Too many " +
((paren < 0) ? "right" : "left") +
" parentheses.");
} else if (c_level != 0) { // check braces only if parens are ok
editor.error("Warning: Too many " +
editor.error("Auto Format Canceled: Too many " +
((c_level < 0) ? "right" : "left") +
" curly braces.");
} else {
// replace with new bootiful text
// selectionEnd hopefully at least in the neighborhood
editor.setText(formattedText, selectionEnd, selectionEnd);
editor.sketch.setModified(true);
// mark as finished
editor.message("Auto Format finished.");
}
}
} catch (Exception e) {
editor.error(e);