Refactored ant build chain to allow building / running without execution of tests but ensure tests are run during dist. Note that tests are still runnable under the test target itself. Resolves#8.
Discontinued use of string import statement generation and migrated to pdex's ImportStatement class which can keep track of if the import is static or not. This allows static imports to be handled correctly in PDEX, JavaBuild library resoluation, and actual Java compilation step. Resolves https://github.com/processing/processing/issues/5577 and https://github.com/processing/processing4/issues/16 but only in the Processing4 branch.
Per @benfry goal of reducing class count, rolled RewriteParams into PdeParseTreeListener now that the code rewrite utils are also rolled into PdeParseTreeListener.
An explicit goal of @benfry is to reduce class count and this PR cleans up edits made within preproc to merge supporting classes and utility functions of PdeParseTreeListener into PdeParseTreeListener itself. This includes removal of ImportUtil per https://github.com/processing/processing4/issues/10.
Some difficult to generate code is managed by the RewriterCodeGenerator and some modes may need to modify that logic. This commit makes it easier to extend parts of RewriterCodeGenerator without requiring client code to duplicate too much effort.
In response to https://github.com/processing/processing4/issues/11, allow client code to override preprocessing edit behabior by providing a subclass of PdeParseTreeListener. This does make the construction for PdePreprocessor.java a little bit messier but a builder may help and moving dependent types within enclosing classes can hopefully keep things coherent.
Minor bit of cleanup in the ant scripts around the build src and target on javac, enabling use of Java 11 language features within processing itself. Note that the build is sustained on either 1.8 or 11 in terms of lanugage features but the code is no longer compatible with the Java 8 runtime due to backwards-incompatable changes made starting in Java 9.
Refactor ANTLR message simplification infrastructure to reduce class count within preproc given @benfy feedback within https://github.com/processing/processing4/pull/1. Note that some supporting are left out but those can be further refactored behind classes as desired but strategies are all made anon or inner.
In response to @benfry feedback within https://github.com/processing/processing4/pull/1, consolidated all of the runtime path calculation into a single class while still maintaining all of the tests and caching logic. This reduces the class count but still adapts to jmod and javafx path calculation requirements for java 11.
* Move to ANTLR 4 with Java 11 lang features and localization.
Introduces ANTLR4 and Java 8 language feature support within IDE while also adding additional hooks for localization of syntax error messages, addressing https://github.com/processing/processing/issues/3054 and https://github.com/processing/processing/issues/3055.
The PR is broadly a continuation of https://github.com/processing/processing/issues/3055, bringing it up to speed with the latest Processing master plus the changes introduced at https://github.com/processing/processing/pull/5753. **Requires https://github.com/processing/processing/pull/5753 as pre-requisite.** This introduces a number of edits beyond https://github.com/processing/processing/issues/3055 beyond compatibility with current Processing master and https://github.com/processing/processing/pull/5753 including:
- Update to the grammar itself
- Change ANTLR listeners to emit `TextTransform.Edit` to unify JDT-based `PreprocessingService` and `JavaBuild`, removing code with duplicate purpose.
- Introduction of syntax error rewriting with support for localization.
- Addition of complete localized strings set for English and Spanish.
- Addition of partial localized strings set for other languages.
- Refactor of ANTLR-related code for testability and readability
- Expansion of tests including full parse tests for new Java features (type inference, lambdas).
* Ask travis for ant upgrade prior to run.
* Ask Travis for java11 update.
* Add openjdk ppa
* Travis no confirmation on add ppa.
* Force newer ant on travis.
* Swtich ant download to www-us mirror.
* Switch ant to 1.10.7
* Start x for unit tests in travis.
* More complete start x in travis.
* Revert x in travis.
* Try x in services.