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.
This commit is contained in:
A Pottinger
2019-10-05 20:49:33 -07:00
parent a429baac0f
commit c14695476e
121 changed files with 7366 additions and 1813 deletions
+133
View File
@@ -0,0 +1,133 @@
# Turn on debug tracing for org.eclipse.jdt.core plugin
org.eclipse.jdt.core/debug=false
# Reports buffer manager activity
org.eclipse.jdt.core/debug/buffermanager=false
# Reports java builder activity : nature of build, built state reading, indictment process
org.eclipse.jdt.core/debug/builder=false
# Reports java builder stats
org.eclipse.jdt.core/debug/builder/stats=false
# Reports compiler activity
org.eclipse.jdt.core/debug/compiler=false
# Reports codeassist completion activity : recovered unit, inferred completions
org.eclipse.jdt.core/debug/completion=false
# Reports classpath variable initialization, and classpath container resolution
org.eclipse.jdt.core/debug/cpresolution=false
# Reports internals of classpath variable initialization, and classpath container resolution (to be used on the JDT/Core team request only)
org.eclipse.jdt.core/debug/cpresolution/advanced=false
# Reports failures during classpath variable initialization, and classpath container resolution
org.eclipse.jdt.core/debug/cpresolution/failure=false
# Reports bad node nesting in DOM AST (for interactive usage)
org.eclipse.jdt.core/debug/dom/ast=false
# Throws an exception in case of bad node nesting in DOM AST (enabled in tests)
org.eclipse.jdt.core/debug/dom/ast/throw=false
# Reports type errors when using ASTRewrite (throws exceptions; not enabled by default, since some non-typesafe operations are fine in practice)
org.eclipse.jdt.core/debug/dom/rewrite=false
# Report type hierarchy connections, refreshes and deltas
org.eclipse.jdt.core/debug/hierarchy=false
# Reports background indexer activity: indexing, saving index file, index queries
org.eclipse.jdt.core/debug/indexmanager=false
# Reports internals of indexer activity (to be used on the JDT/Core team request only)
org.eclipse.jdt.core/debug/indexmanager/advanced=false
# Print notified Java element deltas
org.eclipse.jdt.core/debug/javadelta=false
org.eclipse.jdt.core/debug/javadelta/verbose=false
# Reports various Java model activities
org.eclipse.jdt.core/debug/javamodel=false
# Reports Java model elements opening/closing
org.eclipse.jdt.core/debug/javamodel/cache=false
# Reports changes in the Java classpath and classpath resolution
org.eclipse.jdt.core/debug/javamodel/classpath=false
# Reports all insertions and removals from the java model cache
org.eclipse.jdt.core/debug/javamodel/insertions=false
# Records information about the invalid archive cache
org.eclipse.jdt.core/debug/javamodel/invalid_archives=false
# Runs self-diagnostics on the free space lists. This is expensive and will slow down indexing.
org.eclipse.jdt.core/debug/index/freespacetest=false
# Controls the amount of memory used by the traceback log, in megabytes (suggested size = 1024).
# If nonzero, the index will print out detailed traceback information when corruption is detected.
org.eclipse.jdt.core/debug/index/logsizemegs=0
# Logs every time a page is allocated, flushed, or inserted/removed from the page cache (very verbose)
org.eclipse.jdt.core/debug/index/pagecache=false
# Prints information about when the indexer runs and what files are being indexed
org.eclipse.jdt.core/debug/index/indexer=false
# Prints a line whenever a class is added to or removed from the index
org.eclipse.jdt.core/debug/index/insertions=false
# Prints diagnostic information about index database locks
org.eclipse.jdt.core/debug/index/locks=false
# Prints a message whenever the indexer is scheduled. Useful for tracking race conditions in the unit tests.
org.eclipse.jdt.core/debug/index/scheduling=false
# Prints statistics about database memory usage
org.eclipse.jdt.core/debug/index/space=false
# Performs self-testing during indexing by reading back every class and comparing it with the original .class file
org.eclipse.jdt.core/debug/index/selftest=false
# Prints statistics about indexing time
org.eclipse.jdt.core/debug/index/timing=false
# Reports post actions addition/run
org.eclipse.jdt.core/debug/postaction=false
# Reports name resolution activity
org.eclipse.jdt.core/debug/resolution=false
# Reports java search activity
org.eclipse.jdt.core/debug/search=false
# Reports source mapper activity
org.eclipse.jdt.core/debug/sourcemapper=false
# Reports code formatter activity
org.eclipse.jdt.core/debug/formatter=false
# Reports open on selection activity : recovered unit, inferred selection
org.eclipse.jdt.core/debug/selection=false
# Reports access to zip and jar files through the Java model
org.eclipse.jdt.core/debug/zipaccess=false
# Reports the time to perform code completion.
org.eclipse.jdt.core/perf/completion=300
# Reports the time to perform code selection.
org.eclipse.jdt.core/perf/selection=300
# Reports the time to process a java element delta.
org.eclipse.jdt.core/perf/javadeltalistener=500
# Reports the time to perform an initialization of a classpath variable.
org.eclipse.jdt.core/perf/variableinitializer=5000
# Reports the time to perform an initialization of a classpath container.
org.eclipse.jdt.core/perf/containerinitializer=5000
# Reports the time to perform a reconcile operation.
org.eclipse.jdt.core/perf/reconcile=1000
+42
View File
@@ -0,0 +1,42 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>
<p>November 30, 2017</p>
<h3>License</h3>
<p>
The Eclipse Foundation makes available all content in this plug-in
(&quot;Content&quot;). Unless otherwise indicated below, the Content
is provided to you under the terms and conditions of the Eclipse
Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is
available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
For purposes of the EPL, &quot;Program&quot; will mean the Content.
</p>
<p>
If you did not receive this Content directly from the Eclipse
Foundation, the Content is being redistributed by another party
(&quot;Redistributor&quot;) and different terms and conditions may
apply to your use of any object code in the Content. Check the
Redistributor's license that was provided with the Content. If no such
license exists, contact the Redistributor. Unless otherwise indicated
below, the terms and conditions of the EPL still apply to any source
code in the Content and such source code may be obtained at <a
href="http://www.eclipse.org/">http://www.eclipse.org</a>.
</p>
<h3>Disassembler</h3>
<p>This plug-in contains a bytecode disassembler (&quot;Disassembler&quot;) that can produce a listing of the Java assembler mnemonics (&quot;Assembler Mnemonics&quot;) for a Java method. If you
use the Disassembler to view the Assembler Mnemonics for a method, you should ensure that doing so will not violate the terms of any licenses that apply to your use of that method, as
such licenses may not permit you to reverse engineer, decompile, or disassemble method bytecodes.</p>
</body>
</html>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+34
View File
@@ -0,0 +1,34 @@
###############################################################################
# Copyright (c) 2000, 2014 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# IBM Corporation - initial API and implementation
# Harry Terkelsen (het@google.com) - Bug 449262 - Allow the use of third-party Java formatters
###############################################################################
providerName=Eclipse.org
pluginName=Java Development Tools Core
javaNatureName=Java
javaBuilderName=Java Builder
javaProblemName=Java Problem
buildPathProblemName=Build Path Problem
transientJavaProblemName=Transient Java Problem
classpathVariableInitializersName=Classpath Variable Initializers
classpathContainerInitializersName=Classpath Container Initializers
codeFormattersName=Source Code Formatters
compilationParticipantsName=Compilation Participants
annotationProcessorManagerName=Java 6 Annotation Processor Manager
javaTaskName=Java Task
javaPropertiesName=Java Properties File
javaSourceName=Java Source File
javaClassName=Java Class File
jarManifestName=JAR Manifest File
traceComponentLabel=JDT Core
javaFormatterName=Java Formatter
defaultJavaFormatterName=Eclipse [built-in]
+313
View File
@@ -0,0 +1,313 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
Copyright (c) 2004, 2014 IBM Corporation and others.
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Contributors:
IBM Corporation - initial API and implementation
Harry Terkelsen (het@google.com) - Bug 449262 - Allow the use of third-party Java formatters
-->
<!-- =================================================================================== -->
<!-- JDT/CORE Plug-in Manifest -->
<!-- =================================================================================== -->
<plugin>
<!-- =================================================================================== -->
<!-- Prerequisite Plug-ins -->
<!-- =================================================================================== -->
<!-- =================================================================================== -->
<!-- Runtime Libraries -->
<!-- =================================================================================== -->
<!-- =================================================================================== -->
<!-- Extension Point: Initializers of Classpath Variables -->
<!-- =================================================================================== -->
<extension-point name="%classpathVariableInitializersName"
id="classpathVariableInitializer"
schema="schema/classpathVariableInitializer.exsd"/>
<!-- =================================================================================== -->
<!-- Extension Point: Initializers of Classpath Containers -->
<!-- =================================================================================== -->
<extension-point name="%classpathContainerInitializersName"
id="classpathContainerInitializer"
schema="schema/classpathContainerInitializer.exsd"/>
<!-- =================================================================================== -->
<!-- Extension Point: Formatter of Source Code -->
<!-- =================================================================================== -->
<extension-point name="%codeFormattersName"
id="codeFormatter"
schema="schema/codeFormatter.exsd"/>
<!-- =================================================================================== -->
<!-- Extension Point: Compilation Participant -->
<!-- =================================================================================== -->
<extension-point name="%compilationParticipantsName"
id="compilationParticipant"
schema="schema/compilationParticipant.exsd"/>
<!-- =================================================================================== -->
<!-- Extension Point: Java 6 Annotation Processor Manager -->
<!-- =================================================================================== -->
<extension-point name="%annotationProcessorManagerName"
id="annotationProcessorManager"
schema="schema/annotationProcessorManager.exsd"/>
<!-- =================================================================================== -->
<!-- Extension Point: Java Source Formatter -->
<!-- =================================================================================== -->
<extension-point name="%javaFormatterName"
id="javaFormatter"
schema="schema/javaFormatter.exsd"/>
<!-- =================================================================================== -->
<!-- Extension: Java Nature -->
<!-- =================================================================================== -->
<extension
point="org.eclipse.core.resources.natures"
id="javanature"
name="%javaNatureName">
<runtime>
<run class="org.eclipse.jdt.internal.core.JavaProject">
</run>
</runtime>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Java Builder -->
<!-- =================================================================================== -->
<extension
point="org.eclipse.core.resources.builders"
id="javabuilder"
name="%javaBuilderName">
<builder>
<run class="org.eclipse.jdt.internal.core.builder.JavaBuilder">
</run>
<dynamicReference class="org.eclipse.jdt.internal.core.DynamicProjectReferences"/>
</builder>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Java Problem -->
<!-- =================================================================================== -->
<extension id="problem" point="org.eclipse.core.resources.markers" name="%javaProblemName">
<super type="org.eclipse.core.resources.problemmarker"/>
<super type="org.eclipse.core.resources.textmarker"/>
<persistent value="true"/>
<attribute name="id"/>
<attribute name="flags"/>
<attribute name="arguments"/>
<attribute name="categoryId"/>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Java Buildpath Problem -->
<!-- =================================================================================== -->
<extension id="buildpath_problem" point="org.eclipse.core.resources.markers" name="%buildPathProblemName">
<super type="org.eclipse.core.resources.problemmarker"/>
<super type="org.eclipse.core.resources.textmarker"/>
<persistent value="true"/>
<attribute name ="cycleDetected"/>
<attribute name="id"/>
<attribute name="arguments"/>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Java Transient Problem -->
<!-- =================================================================================== -->
<extension id="transient_problem" point="org.eclipse.core.resources.markers" name="%transientJavaProblemName">
<super type="org.eclipse.core.resources.textmarker"/>
<persistent value="false"/>
<attribute name="id"/>
<attribute name="flags"/>
<attribute name="arguments"/>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Java Task -->
<!-- =================================================================================== -->
<extension id="task" name="%javaTaskName" point="org.eclipse.core.resources.markers">
<super type="org.eclipse.core.resources.taskmarker"/>
<persistent value="true"/>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Javac Ant Adapter -->
<!-- =================================================================================== -->
<extension
point="org.eclipse.ant.core.extraClasspathEntries">
<extraClasspathEntry
library="jdtCompilerAdapter.jar">
</extraClasspathEntry>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Javac Ant Task -->
<!-- =================================================================================== -->
<extension point="org.eclipse.ant.core.antTasks">
<antTask
name="eclipse.checkDebugAttributes"
class="org.eclipse.jdt.core.CheckDebugAttributes"
library="jdtCompilerAdapter.jar">
</antTask>
<antTask
name="eclipse.buildJarIndex"
class="org.eclipse.jdt.core.BuildJarIndex"
library="jdtCompilerAdapter.jar">
</antTask>
</extension>
<!-- =================================================================================== -->
<!-- Extension: User Library Container -->
<!-- =================================================================================== -->
<extension
point="org.eclipse.jdt.core.classpathContainerInitializer">
<classpathContainerInitializer
class="org.eclipse.jdt.internal.core.UserLibraryClasspathContainerInitializer"
id="org.eclipse.jdt.USER_LIBRARY">
</classpathContainerInitializer>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Module Path Container -->
<!-- =================================================================================== -->
<extension
point="org.eclipse.jdt.core.classpathContainerInitializer">
<classpathContainerInitializer
class="org.eclipse.jdt.internal.core.ModulePathContainerInitializer"
id="org.eclipse.jdt.MODULE_PATH">
</classpathContainerInitializer>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Java File Types -->
<!-- =================================================================================== -->
<extension point="org.eclipse.team.core.fileTypes">
<fileTypes extension="java" type="text"/>
<fileTypes extension="classpath" type="text"/>
<fileTypes extension="properties" type="text"/>
<fileTypes extension="class" type="binary"/>
<fileTypes extension="jar" type="binary"/>
<fileTypes extension="jardesc" type="text"/>
<fileTypes extension="zip" type="binary"/>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Java Code Formatter -->
<!-- =================================================================================== -->
<extension
id="JavaCodeFormatter"
point="org.eclipse.core.runtime.applications">
<application>
<run class="org.eclipse.jdt.core.formatter.CodeFormatterApplication" />
</application>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Java Generate Indexer -->
<!-- =================================================================================== -->
<extension
id="JavaIndexer"
point="org.eclipse.core.runtime.applications">
<application>
<run class="org.eclipse.jdt.core.index.JavaIndexerApplication" />
</application>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Java Content Types -->
<!-- =================================================================================== -->
<extension point="org.eclipse.core.contenttype.contentTypes">
<!-- declares a content type for Java Properties files -->
<content-type id="javaProperties" name="%javaPropertiesName"
base-type="org.eclipse.core.runtime.text"
priority="high"
file-extensions="properties"
default-charset="ISO-8859-1"/>
<!-- Associates .classpath to the XML content type -->
<file-association
content-type="org.eclipse.core.runtime.xml"
file-names=".classpath"/>
<!-- declares a content type for Java Source files -->
<content-type id="javaSource" name="%javaSourceName"
base-type="org.eclipse.core.runtime.text"
priority="high"
file-extensions="java"/>
<!-- declares a content type for Java class files -->
<content-type id="javaClass" name="%javaClassName"
priority="high"
file-extensions="class">
<describer
class="org.eclipse.core.runtime.content.BinarySignatureDescriber">
<parameter name="signature" value="CA, FE, BA, BE"/>
</describer>
</content-type>
<!-- declares a content type for JAR manifest files -->
<content-type id="JARManifest" name="%jarManifestName"
base-type="org.eclipse.core.runtime.text"
priority="high"
file-names="MANIFEST.MF"
default-charset="UTF-8"/>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Eclipse preferences initializer -->
<!-- =================================================================================== -->
<extension
point="org.eclipse.core.runtime.preferences">
<initializer class="org.eclipse.jdt.internal.core.JavaCorePreferenceInitializer"/>
</extension>
<extension
point="org.eclipse.core.runtime.preferences">
<modifier class="org.eclipse.jdt.internal.core.JavaCorePreferenceModifyListener"/>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Eclipse tracing -->
<!-- =================================================================================== -->
<extension
point="org.eclipse.ui.trace.traceComponents">
<component
id="org.eclipse.jdt.core.trace"
label="%traceComponentLabel">
<bundle
consumed="false"
name="org.eclipse.jdt.core">
</bundle>
</component>
</extension>
<!-- =================================================================================== -->
<!-- Extension: Java Code Formatter -->
<!-- =================================================================================== -->
<extension
point="org.eclipse.jdt.core.javaFormatter">
<javaFormatter
class="org.eclipse.jdt.internal.formatter.DefaultCodeFormatter"
id="org.eclipse.jdt.core.defaultJavaFormatter"
name="%defaultJavaFormatterName">
</javaFormatter>
</extension>
</plugin>
+6 -2
View File
@@ -13,7 +13,7 @@ This Mode does not use ecj.jar from the original Java mode, because its files ar
For 3.0 alpha 11, the signature files were removed from oorg.eclipse.jdt.core.jar to fix a signing conflict with Android Mode and Ant.
https://github.com/processing/processing/pull/3324
. . .
. . .
http://download.eclipse.org/eclipse/updates/4.5/R-4.5.2-201602121500/plugins/com.ibm.icu_54.1.1.v201501272100.jar
@@ -35,7 +35,7 @@ http://download.eclipse.org/eclipse/updates/4.5/R-4.5.2-201602121500/plugins/org
http://download.eclipse.org/eclipse/updates/4.5/R-4.5.2-201602121500/plugins/org.eclipse.text_3.5.400.v20150505-1044.jar
. . .
. . .
Updated 19 January 2015 to fix Java 8 support. The previous versions gave an "Annotation processing got disabled, since it requires a 1.6 compliant JVM" error.
@@ -43,3 +43,7 @@ Updated 21 March 2016 to newest version (from R-4.4.1-201409250400 to R-4.5.2-20
Finally, the archive site contains additional jars for the 4.5.2 release, including the JDT Core Batch Compiler (ECJ):
http://archive.eclipse.org/eclipse/downloads/drops4/R-4.5.2-201602121500/
. . .
Updated the org.eclipse libs. For eclipse projects, please see https://www.eclipse.org/legal/epl-2.0/ for licensing.