diff --git a/java/src/processing/mode/java/PreprocService.java b/java/src/processing/mode/java/PreprocService.java index e5bb9ecca..777896ec1 100644 --- a/java/src/processing/mode/java/PreprocService.java +++ b/java/src/processing/mode/java/PreprocService.java @@ -957,7 +957,7 @@ public class PreprocService { static { Map compilerOptions = new HashMap<>(); - // TODO: VERSION_17 if using new language features + // TODO: VERSION_17 if using new language features. Requires new JDT. compilerOptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_11); compilerOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_11); compilerOptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_11); diff --git a/java/src/processing/mode/java/SourceUtil.java b/java/src/processing/mode/java/SourceUtil.java index d063bd338..ab6c2720c 100644 --- a/java/src/processing/mode/java/SourceUtil.java +++ b/java/src/processing/mode/java/SourceUtil.java @@ -330,7 +330,7 @@ public class SourceUtil { } else { // Exiting block int blockEnd = i; - if (prevState == IN_BLOCK_COMMENT && i < length) blockEnd--; + if (prevState == IN_BLOCK_COMMENT && i < length) blockEnd--; // preserve star in '*/' for (int j = blockStart; j < blockEnd; j++) { char c = p.charAt(j); if (c != '\n' && c != '\r') p.setCharAt(j, ' '); diff --git a/java/src/processing/mode/java/preproc/PdeParseTreeListener.java b/java/src/processing/mode/java/preproc/PdeParseTreeListener.java index ab2c2b8c6..8412eb693 100644 --- a/java/src/processing/mode/java/preproc/PdeParseTreeListener.java +++ b/java/src/processing/mode/java/preproc/PdeParseTreeListener.java @@ -317,7 +317,15 @@ public class PdeParseTreeListener extends ProcessingBaseListener { footerResult = prepareFooter(rewriter, length); } - @Override + /** + * Detect if the user is programming with "mixed" modes. + * + *

Detect if the user is programming with "mixed" modes where they are + * combining active and static mode features. This may be, for example, a + * method call followed by method definition.

+ * + * @param ctx The context from ANTLR for the mixed modes sketch. + */ public void enterWarnMixedModes(ProcessingParser.WarnMixedModesContext ctx) { pdeParseTreeErrorListenerMaybe.ifPresent((listener) -> { Token token = ctx.getStart();