diff --git a/app/src/processing/mode/java/AutoFormat.java b/app/src/processing/mode/java/AutoFormat.java index 1c185910e..db7b80a8f 100644 --- a/app/src/processing/mode/java/AutoFormat.java +++ b/app/src/processing/mode/java/AutoFormat.java @@ -7,6 +7,7 @@ Updates Copyright (c) 2001 Jason Pell. Further updates Copyright (c) 2003 Martin Gomez, Ateneo de Manila University Additional updates Copyright (c) 2005-10 Ben Fry and Casey Reas + Even more updates Copyright (c) 2014 George Bateman This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -302,6 +303,9 @@ public class AutoFormat implements Formatter { } + /** + * Called after else. + */ private void gotElse() { tabs = s_tabs[curlyLvl][if_lev]; p_flg[level] = sp_flg[curlyLvl][if_lev]; @@ -375,18 +379,6 @@ public class AutoFormat implements Formatter { } - - /** - * Sees if result+"\n"+buf is of the form [optional anything][keyword][optional whitespace]. - * It won't allow keyword to be directly preceded by an alphanumeric, _, or &. - * Will be different if keyword contains regex codes. - */ - private boolean textEnds(final String keyword) { - return Pattern.matches("^.*(?