Commit Graph

25 Commits

Author SHA1 Message Date
A Pottinger
721046b593 Finish fix of preproc handeling of smooth.
Fixes #149 as reported by @benfry.
2020-11-21 11:59:25 -08:00
A Pottinger
c41e4d24ad Fixed preproc of noSmooth as part of #149. 2020-11-21 10:41:14 -08:00
A Pottinger
3e7aab9556 Added tests for smooth and noSmooth for preproc.
In response to https://github.com/processing/processing4/issues/149,
adding tests to catch issues with smooth and noSmooth in the
preprocessor. Issue found by @benfry.
2020-11-21 10:15:37 -08:00
Sam Pottinger
ab6c9931f9 Move PdePreprocessIssueException to test. 2020-09-25 11:53:17 -07:00
Ben Fry
e89d5d6a5c Merge pull request #103 from processing/text_resize_fix 2020-08-15 09:02:58 -04:00
A Pottinger
bc434fce0b Insert int after color instead of before to allow visiblity modifier. 2020-06-29 15:17:44 -07:00
A Pottinger
2e3f573ef8 Allow for emulated Preferences in testing. 2020-06-29 14:42:39 -07:00
A Pottinger
e543edce99 Refactor out preproc.issue.
Removed the preproc.issue package by relocating supporting classes for PreprocessIssueMessageSimplifier and PdeIssueEmitter as inner classes. This assists with https://github.com/processing/processing4/issues/10.
2020-04-26 09:51:31 -07:00
A Pottinger
45ee436670 Resolved broken tests. 2020-04-20 09:11:36 -07:00
Sam Pottinger
6fe274f89b Resolve PDF renderer parse issue in preproc.
Resolve moving the PDF renderer information provided in size into settings as part of preproc. Resolves #66.
2020-01-21 17:15:57 -08:00
A Pottinger
17e28256f5 Resolve rewrite of pixelDensity to settings.
Per https://github.com/processing/processing4/issues/58, pixelDensity should run in settings and currently results in failure if used in static context. This will rewrite pixelDensity into the setting section if found in static or settings context. Adds unit tests for both scenarios.
2020-01-20 09:16:11 -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
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 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
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
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
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 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