Skip to content

Commit

Permalink
Made minor edits as described at processing/processing4#99.
Browse files Browse the repository at this point in the history
  • Loading branch information
sampottinger committed Jul 1, 2020
1 parent 023ace3 commit f1466cb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/src/processing/app/ui/Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ public void showReferenceFile(File file) {
}


static public void showChanges() {
static public void showChangesV3() {
// http://code.google.com/p/processing/issues/detail?id=1520
if (!Base.isCommandLine()) {
Platform.openURL("https://github.com/processing/processing/wiki/Changes");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,7 @@ public static String getSimplifiedErrorMessage(IProblem iprob, String badCode) {
final String undefinedName = args[0];
if (undefinedName.equals("frame")) {
result = Language.interpolate("editor.status.item_removed", undefinedName, "surface");
}
else {
} else {
result = Language.interpolate("editor.status.undef_name", undefinedName);
}
}
Expand Down
22 changes: 11 additions & 11 deletions java/src/processing/mode/java/Compiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public void close() { }
exception.setMessage("processing.xml no longer exists, this code needs to be updated for 2.0.");
System.err.println("The processing.xml library has been replaced " +
"with a new 'XML' class that's built-in.");
handleCrustyCode();
handleCrustyCodeV3();

} else {
exception.setMessage("The package " +
Expand All @@ -206,7 +206,7 @@ public void close() { }
what.equals("BGraphics") ||
what.equals("BImage")) {
exception.setMessage(what + " has been replaced with P" + what.substring(1));
handleCrustyCode();
handleCrustyCodeV3();

} else {
exception.setMessage("Cannot find a class or type " +
Expand All @@ -230,22 +230,22 @@ public void close() { }
what.equals("LINE_STRIP")) {
exception.setMessage("LINE_LOOP and LINE_STRIP are not available, " +
"please update your code.");
handleCrustyCode();
handleCrustyCodeV3();

} else if (what.equals("framerate")) {
exception.setMessage("framerate should be changed to frameRate.");
handleCrustyCode();
handleCrustyCodeV3();

} else if (what.equals("screen")) {
exception.setMessage("Change screen.width and screen.height to " +
"displayWidth and displayHeight.");
handleCrustyCode();
handleCrustyCodeV3();

} else if (what.equals("screenWidth") ||
what.equals("screenHeight")) {
exception.setMessage("Change screenWidth and screenHeight to " +
"displayWidth and displayHeight.");
handleCrustyCode();
handleCrustyCodeV3();

} else if (what.equals("frame")) {
exception.setMessage("frame was removed, use surface instead.");
Expand Down Expand Up @@ -283,15 +283,15 @@ public void close() { }
if (parts != null) {
if (parts[1].equals("framerate(int)")) {
exception.setMessage("framerate() no longer exists, use frameRate() instead.");
handleCrustyCode();
handleCrustyCodeV3();

} else if (parts[1].equals("push()")) {
exception.setMessage("push() no longer exists, use pushMatrix() instead.");
handleCrustyCode();
handleCrustyCodeV3();

} else if (parts[1].equals("pop()")) {
exception.setMessage("pop() no longer exists, use popMatrix() instead.");
handleCrustyCode();
handleCrustyCodeV3();

} else {
String mess = "The function " + parts[1] + " does not exist.";
Expand Down Expand Up @@ -325,9 +325,9 @@ static protected void printCrustyCodeMessage() {
"please read the Changes page on the Wiki.");
}

static protected void handleCrustyCode() {
static protected void handleCrustyCodeV3() {
printCrustyCodeMessage();
Editor.showChanges();
Editor.showChangesV3();
}

static protected void handleCrustyCodeV4() {
Expand Down

0 comments on commit f1466cb

Please sign in to comment.