Commit Graph

2091 Commits

Author SHA1 Message Date
Sam Pottinger
7efe9b0c85 Removed test from the build / run targets but left in for dist.
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.
2019-11-25 18:09:01 -08:00
Sam Pottinger
2c85b89173 Added tests for ImportStatement and some minor style clean up. 2019-11-04 18:17:24 -08:00
Sam Pottinger
2aaaeb7253 Cleaned up documentation for sttaic import handeling. 2019-11-04 17:34:33 -08:00
Sam Pottinger
434b722a77 Fix loose git merge issue sitting in comments for PdeParseTreeLi.. 2019-11-04 17:08:15 -08:00
Sam Pottinger
9fd00981b3 Merge branch 'master' into static_imports 2019-11-04 17:06:32 -08:00
Sam Pottinger
c458863dd7 Allow support for static imports through pdex's ImportStatement.
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.
2019-11-04 16:54:22 -08:00
A Samuel Pottinger
4d45aafbd0 Merge pull request #13 from sampottinger/tree_listener_parameter
[Fork] Refactor within PdePreprocessor to allow for override of edits.
2019-10-20 16:13:47 -07:00
A Pottinger
97c26f7ef4 Added packageTest.pde for package test overrride. 2019-10-13 14:55:10 -07:00
A Pottinger
1fc326383e Add tests and fix for package name override. 2019-10-13 14:37:15 -07:00
A Pottinger
d57b4ac61b Removed RewriteParams.
Per @benfry goal of reducing class count, rolled RewriteParams into PdeParseTreeListener now that the code rewrite utils are also rolled into PdeParseTreeListener.
2019-10-13 13:41:26 -07:00
A Pottinger
6741079b3a Merge branch 'tree_listener_parameter' of github.com:sampottinger/processing4 into tree_listener_parameter 2019-10-13 11:48:49 -07:00
A Pottinger
fdcaf7d932 Cleaned up RewriterCodeGen and added setDestinationPackage.
Allow client code to provide a destination package for generated code and removed some (now dead) code for RewriterCodeGenerator.
2019-10-13 11:47:35 -07:00
A Samuel Pottinger
8657f40ab0 Merge branch 'master' into tree_listener_parameter 2019-10-11 08:41:19 -07:00
A Pottinger
96e4f0a203 Merged supporting classes 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.
2019-10-11 08:38:38 -07:00
A Pottinger
d08048eca9 Allow override of core and default imports for PdeParseTreeListener.
In support of modes, allow client code override of core and default imports for PdeParseTreeListener.
2019-10-11 07:56:24 -07:00
A Samuel Pottinger
3340630c1b Merge branch 'master' into fix_jdk_naming 2019-10-10 22:54:38 -07:00
A Pottinger
d87032d278 Updated gitignores for bin-test and JDKs.
In response to https://github.com/processing/processing4/issues/6, update gitignores so that JDKs and bin-test are excluded.
2019-10-10 21:27:08 -07:00
A Pottinger
9055e44e0c Allow for public instantiation of PdeParseTreeListener.
To support modes, allow for public instantiation of PdeParseTreeListener and for its public extension.
2019-10-10 21:07:53 -07:00
A Pottinger
b4042f7264 Merge branch 'tree_listener_parameter' of github.com:sampottinger/processing4 into tree_listener_parameter 2019-10-10 21:06:21 -07:00
A Pottinger
f47a0a26c2 Allow subclassing of RewriterCodeGenerator.
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.
2019-10-10 21:05:07 -07:00
A Samuel Pottinger
e38515cc6b Allow access to PdePreprocessor constructor 2019-10-10 08:50:08 -07:00
A Pottinger
5faf2a10a6 Refactor within PdePreprocessor to allow for override of edits.
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.
2019-10-10 08:36:34 -07:00
Ben Fry
b2eb89d72f cosmetic fixes and note-taking 2019-10-08 18:28:16 -04:00
Ben Fry
7003aaa148 fix deprecation issue 2019-10-08 14:46:28 -04:00
Ben Fry
df69ed6170 fix rounding api deprecation in BigDecimal 2019-10-08 14:41:03 -04:00
Ben Fry
fa799db974 use Java 11 parser since Java 8 is deprecated 2019-10-08 14:38:28 -04:00
Ben Fry
1998378cab comment-out unused portions 2019-10-08 14:38:02 -04:00
Ben Fry
cc12c605d4 Merge branch 'master' of github.com:processing/processing4 2019-10-08 14:34:49 -04:00
Ben Fry
4e51e47a3f removing the Eclipse JDI since we're using a JDK now 2019-10-08 14:34:43 -04:00
Ben Fry
dfb4542dc7 Merge pull request #5 from sampottinger/master
Update ant / javac language targets
2019-10-08 14:24:14 -04:00
A Pottinger
7463042501 Switch to 11 build target / source on javac.
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.
2019-10-08 08:22:28 -07:00
Ben Fry
0f447a0bb9 use methods instead of modifiers to deal w/ deprecation warnings 2019-10-07 20:21:37 -04:00
Ben Fry
9d9c7cc043 remove unused import 2019-10-07 20:12:01 -04:00
Ben Fry
2c562c69f7 trying to sort out build failures in Eclipse 2019-10-07 20:09:53 -04:00
Ben Fry
fab6b59c1b use PApplet.createWriter(), update MACOSX to MACOS 2019-10-07 19:40:12 -04:00
Ben Fry
51145a8886 incorporate tweak mode fix https://github.com/processing/processing/pull/5909 2019-10-07 19:27:38 -04:00
Ben Fry
302767a9bf adding Java Mode project to Eclipse 2019-10-07 19:27:08 -04:00
A Samuel Pottinger
404835f417 Merge pull request #8 from sampottinger/runtime_structural_refactor
Consolidate logic for runtime path generation into a single class.
2019-10-07 07:41:18 -07:00
A Samuel Pottinger
0dfa1253fc Merge pull request #9 from sampottinger/error_rewrite_restructure
Refactor ANTLR message simplification infrastructure.
2019-10-07 07:41:07 -07:00
A Pottinger
e46a957f78 Minor fix in PreprocessorResult dimension reporting.
Fix issue reported by @codeanticode within PreprocessorResult.java where the height was not being returned correctly.
2019-10-06 23:05:35 -07:00
A Pottinger
f846c7e82c Refactor ANTLR message simplification infrastructure.
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.
2019-10-06 22:55:41 -07:00
A Pottinger
ceb9fedaa2 Add back in RuntimePathBuilder* under new location. 2019-10-06 21:17:40 -07:00
A Pottinger
a265b1ed14 Consolidate logic for runtime path generation into a single class.
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.
2019-10-06 21:10:16 -07:00
A Samuel Pottinger
2b05da132a Refactored TabLineFactory into ProblemFactory. (#7)
* Refactored TabLineFactory into ProblemFactory.

As part of https://github.com/processing/processing4/pull/1, refactored TabLineFactory into ProblemFactory, merging tests in the process.

* Fix imports on https://github.com/sampottinger/processing4/pull/7.
2019-10-06 18:24:20 -07:00
A Samuel Pottinger
ee299ef935 Move to ANTLR 4 with Java 11 lang features and localization. (#5)
* 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.
2019-10-05 23:34:38 -07:00
A Pottinger
c14695476e Moves to Java11 and OpenJDK via AdoptOpenJDK within the processing4 train.
Moves to Java11 and OpenJDK via AdoptOpenJDK within the processing4 train using a squash of sampottinger processing fork's java11 branch.

**Primary required changes:**
Some changes directly support OpenJFX / OpenJDK 11:

 - Response to image loading changes caused by [JEP 320](https://openjdk.java.net/jeps/320)
 - Use of jmodules as necessitated by [JEP 261](https://openjdk.java.net/jeps/261)
 - Reponse to largely changed file paths caused by [JEP 220](https://openjdk.java.net/jeps/220).
 - Modifications in build system related to AdoptOpenJDK and Java 11 which have a different naming structure for downloads.
 - Allowing use of non-Oracle Java within internal Processing checks.

**Secondary required changes:**
There were some secondary required changes that impacted the usability of Processing after having moved to OpenJFX / OpenJDK 11:

 - Removal of com.apple.eawt calls related to [JEP 272](http://openjdk.java.net/jeps/272)
 - Response to HiDPI support on Windows and Linux in [JEP 263](https://openjdk.java.net/jeps/263)
- Removal of `java.ext.dirs`. Would be forced by [JEP 220](http://openjdk.java.net/jeps/220).
 - Due to bugs on Windows, updated the JNA jars.
 - Changes in downloader build tasks to support AdoptOpenJDK and OpenJFX.
 - Updated org.eclipse.* / equinox jars.
 - Some optimization around size of distribution.
 - Update of AppBundler.
 - Some changes in formulation of classpath and modifications in PreprocessingService given [JEP 261](https://openjdk.java.net/jeps/261).

**Incidental changes:**
This was (ahem) a bit of a larger PR with the above modifications. So, I wanted to introduce automated tests when possible and convenient along with a few changes for platform sustainability in order to support development:

 - Addition of cross-building capability (!) made possible by AdoptOpenJDK.
 - Addition of mockito for testing.
 - Upgrade of junit.
 - Addition of ant-contrib.
 - Standardized nomenclature around JRE / JDK in `build/build.xml`
 - Deduplication of code in `jre/build.xml`.
 - Addition of JavaDoc in a few places.
 - Some refactoring of PImage / Shape to support increased testing and readability in image manipulation code.
2019-10-05 20:49:33 -07:00
REAS
9ec706889f Removing DoubleDict DoubleList LongDict LongList from Reference 2019-07-26 15:47:21 -07:00
REAS
dc322fb48a Remove redundant params for Server reference 2019-07-25 12:47:22 -07:00
Ben Fry
80eac720c7 preserve file attributes so things don't appear modified; fix some indents lost in tab conversion 2019-04-21 08:12:20 -04:00
Ben Fry
4cb3bc5d29 clean up some formatting and ordering issues 2019-03-02 17:57:42 -05:00