Skip to content

Commit

Permalink
Eclipse 4.18 (M1) JDT Patch for Groovy-Eclipse: JDT commit 15d476e
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Oct 10, 2020
1 parent 33d7994 commit 3ac04bf
Show file tree
Hide file tree
Showing 2,180 changed files with 1,253,911 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public abstract class GroovyCompilerTestSuite {
protected static final long JDK12 = (56L << 16) + ClassFileConstants.MINOR_VERSION_0;
protected static final long JDK13 = (57L << 16) + ClassFileConstants.MINOR_VERSION_0;
protected static final long JDK14 = (58L << 16) + ClassFileConstants.MINOR_VERSION_0;
protected static final List<Long> JDKs = Collections.unmodifiableList(Arrays.asList(JDK8, JDK9, JDK10, JDK11, JDK12, JDK13, JDK14));
protected static final long JDK15 = (59L << 16) + ClassFileConstants.MINOR_VERSION_0;
protected static final List<Long> JDKs = Collections.unmodifiableList(Arrays.asList(JDK8, JDK9, JDK10, JDK11, JDK12, JDK13, JDK14, JDK15));

@Parameters(name = "Java {1}")
public static Iterable<Object[]> params() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,27 @@ public abstract class JavaConstants {
public static int AST_LEVEL = AST.JLS10;
static {
try {
AST.class.getDeclaredField("JLS14");
AST_LEVEL = 13;
} catch (NoSuchFieldException ignore14) {
AST.class.getDeclaredField("JLS15");
AST_LEVEL = 15;
} catch (NoSuchFieldException ignore15) {
try {
AST.class.getDeclaredField("JLS13");
AST_LEVEL = 13;
} catch (NoSuchFieldException ignore13) {
AST.class.getDeclaredField("JLS14");
AST_LEVEL = 14;
} catch (NoSuchFieldException ignore14) {
try {
AST.class.getDeclaredField("JLS12");
AST_LEVEL = 12;
} catch (NoSuchFieldException ignore12) {
AST.class.getDeclaredField("JLS13");
AST_LEVEL = 13;
} catch (NoSuchFieldException ignore13) {
try {
AST.class.getDeclaredField("JLS11");
AST_LEVEL = 11;
} catch (NoSuchFieldException ignore11) {
// AST_LEVEL is JLS10
AST.class.getDeclaredField("JLS12");
AST_LEVEL = 12;
} catch (NoSuchFieldException ignore12) {
try {
AST.class.getDeclaredField("JLS11");
AST_LEVEL = 11;
} catch (NoSuchFieldException ignore11) {
// AST_LEVEL is JLS10
}
}
}
}
Expand Down
75 changes: 38 additions & 37 deletions docs/Getting-Started-with-Groovy-Eclipse-Source-Code.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/Manual-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ These are old instructions for setting up a Groovy-Eclipse development environme

### Get the Base Eclipse Package

Groovy-Eclipse is intended to be developed using Eclipse. Download and install [the "Eclipse IDE for Eclipse Committers" package](https://www.eclipse.org/downloads/packages/release/2020-06/r/eclipse-ide-eclipse-committers) for your operating system.
Groovy-Eclipse is intended to be developed using Eclipse. Download and install [the "Eclipse IDE for Eclipse Committers" package](https://www.eclipse.org/downloads/packages/release/2020-09/r/eclipse-ide-eclipse-committers) for your operating system.

### Install Groovy-Eclipse

On the Eclipse menu bar, select *Help -> Install New Software...*. In the *Install* window, paste the Groovy-Eclipse update site `https://dist.springsource.org/snapshot/GRECLIPSE/e4.16` into the *Work with:* field and press enter. Check the box next to "Main Package", then click the *Next* button a couple of times, accept the license agreement, and let Eclipse restart.
On the Eclipse menu bar, select *Help -> Install New Software...*. In the *Install* window, paste the Groovy-Eclipse update site `https://dist.springsource.org/snapshot/GRECLIPSE/e4.17` into the *Work with:* field and press enter. Check the box next to "Main Package", then click the *Next* button a couple of times, accept the license agreement, and let Eclipse restart.

### Setup Groovy Compiler

If you installed extran Groovy compiler versions, then you must activate Groovy 2.5 compiler for Groovy-Eclipse. On the Eclipse menu bar, select *Window -> Preferences*. In the *Preferences* window, go to *Groovy -> Compiler*. Click the *Switch to 2.5.13* button, and let Eclipse restart.

### Install Execution Environment Descriptions

On the Eclipse menu bar, select *Help -> Install New Software...*. In the *Install* window, select `2020-06 - https://download.eclipse.org/releases/2020-06` from the *Work with:* field and enter "exeuction" in the filter. Check the boxes next to "API Tools Execution Environment Descriptions", and click the *Next* button a couple of times, accept the license agreement, and let Eclipse restart.
On the Eclipse menu bar, select *Help -> Install New Software...*. In the *Install* window, select `2020-09 - https://download.eclipse.org/releases/2020-09` from the *Work with:* field and enter "exeuction" in the filter. Check the boxes next to "API Tools Execution Environment Descriptions", and click the *Next* button a couple of times, accept the license agreement, and let Eclipse restart.

![API Baseline](images/eclipse-api-tools-execution-environment.png)

Expand Down
52 changes: 26 additions & 26 deletions groovy-eclipse.setup
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@
defaultValue="2020-09"
storageURI="scope://Workspace"
label="Target Platform">
<choice
value="2020-12"
label="Eclipse 4.18 (2020-12)"/>
<choice
value="2020-09"
label="Eclipse 4.17 (2020-09)"/>
Expand All @@ -87,9 +90,6 @@
<choice
value="2019-09"
label="Eclipse 4.13 (2019-09)"/>
<choice
value="2019-06"
label="Eclipse 4.12 (2019-06)"/>
<description>Choose the compatibility level of the target platform</description>
</setupTask>
<setupTask
Expand Down Expand Up @@ -126,7 +126,15 @@
</setupTask>
<setupTask
xsi:type="setup.p2:P2Task"
filter="(| (scope.product.version.name=2020-09) (scope.product.version.name=latest) (scope.product.version.name=latest.released))">
filter="(| (scope.product.version.name=2020-12) (scope.product.version.name=latest))">
<requirement
name="org.codehaus.groovy.m2eclipse.feature.feature.group"/>
<repository
url="https://dist.springsource.org/snapshot/GRECLIPSE/e4.18"/>
</setupTask>
<setupTask
xsi:type="setup.p2:P2Task"
filter="(| (scope.product.version.name=2020-09) (scope.product.version.name=latest.released))">
<requirement
name="org.codehaus.groovy.m2eclipse.feature.feature.group"/>
<repository
Expand Down Expand Up @@ -164,14 +172,6 @@
<repository
url="https://dist.springsource.org/snapshot/GRECLIPSE/e4.13"/>
</setupTask>
<setupTask
xsi:type="setup.p2:P2Task"
filter="(scope.product.version.name=2019-06)">
<requirement
name="org.codehaus.groovy.m2eclipse.feature.feature.group"/>
<repository
url="https://dist.springsource.org/snapshot/GRECLIPSE/e4.12"/>
</setupTask>
<setupTask
xsi:type="git:GitCloneTask"
id="git.clone.Groovy-Eclipse"
Expand Down Expand Up @@ -225,6 +225,13 @@
<sourceLocator
rootFolder="${git.clone.Groovy-Eclipse.location}/Site-org.codehaus.groovy.eclipse"/>
</setupTask>
<setupTask
xsi:type="projects:ProjectsImportTask"
filter="(eclipse.target.platform=2020-12)">
<sourceLocator
rootFolder="${git.clone.Groovy-Eclipse.location}/jdt-patch/e418"
locateNestedProjects="true"/>
</setupTask>
<setupTask
xsi:type="projects:ProjectsImportTask"
filter="(eclipse.target.platform=2020-09)">
Expand Down Expand Up @@ -260,13 +267,6 @@
rootFolder="${git.clone.Groovy-Eclipse.location}/jdt-patch/e413"
locateNestedProjects="true"/>
</setupTask>
<setupTask
xsi:type="projects:ProjectsImportTask"
filter="(eclipse.target.platform=2019-06)">
<sourceLocator
rootFolder="${git.clone.Groovy-Eclipse.location}/jdt-patch/e412"
locateNestedProjects="true"/>
</setupTask>
<setupTask
xsi:type="setup.targlets:TargletTask">
<targlet
Expand All @@ -286,6 +286,13 @@
name="org.eclipse.buildship.feature.group"/>
<requirement
name="org.eclipse.test.feature.group"/>
<repositoryList
name="2020-12">
<repository
url="https://download.eclipse.org/releases/2020-12"/>
<repository
url="https://download.eclipse.org/eclipse/updates/4.18milestones"/>
</repositoryList>
<repositoryList
name="2020-09">
<repository
Expand Down Expand Up @@ -321,13 +328,6 @@
<repository
url="https://download.eclipse.org/eclipse/updates/4.13"/>
</repositoryList>
<repositoryList
name="2019-06">
<repository
url="https://download.eclipse.org/releases/2019-06"/>
<repository
url="https://download.eclipse.org/eclipse/updates/4.12"/>
</repositoryList>
</targlet>
</setupTask>
<setupTask
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,15 @@ abstract class CompletionTestSuite extends GroovyEclipseTestSuite {
@Before
final void setUpCompletionTestCase() {
SynchronizationUtils.waitForDSLDProcessingToComplete()
setJavaPreference(PreferenceConstants.CODEASSIST_ADDIMPORT, 'true')
setJavaPreference(PreferenceConstants.CODEASSIST_INSERT_COMPLETION, 'true')
setJavaPreference(PreferenceConstants.CODEASSIST_GUESS_METHOD_ARGUMENTS, 'false')
}

@After
final void tearDownCompletionTestCase() {
try {
setJavaPreference(PreferenceConstants.TYPEFILTER_ENABLED, '')
setJavaPreference(PreferenceConstants.CODEASSIST_ADDIMPORT, 'true')
setJavaPreference(PreferenceConstants.CODEASSIST_FAVORITE_STATIC_MEMBERS, '')
setJavaPreference(PreferenceConstants.CODEASSIST_NONUITHREAD_COMPUTATION, 'true')
} catch (MissingPropertyException ignore) {
}
setJavaPreference(PreferenceConstants.TYPEFILTER_ENABLED, '')
setJavaPreference(PreferenceConstants.CODEASSIST_FAVORITE_STATIC_MEMBERS, '')
}

@AfterClass
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
12 changes: 12 additions & 0 deletions jdt-patch/e418/Feature-org.codehaus.groovy.jdt.patch/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Feature-org.codehaus.groovy.jdt.patch</name>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bin.includes = feature.properties,\
feature.xml,\
*.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# contains externalized strings for feature.xml
# java.io.Properties file (ISO 8859-1 with "\" escapes)
# "%foo" in feature.xml corresponds to the key "foo" in this file

providerName=Pivotal Software, Inc.

featureName=Eclipse JDT Core patch for Groovy

descriptionURL=https://github.com/groovy/groovy-eclipse/wiki

description=This JDT Core patch provides Groovy integration with the JDT and the Java compiler.

# "licenseURL" property - URL of the "Feature License"
# do not translate value - just change to point to a locale-specific HTML page
licenseURL=license.html

# "license" property - text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
license=\
ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
March 17, 2005\n\
\n\
Usage Of Content\n\
\n\
THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
\n\
Applicable Licenses\n\
\n\
Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
is provided to you under the terms and conditions of the Eclipse Public\n\
License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
Content and is also available at https://www.eclipse.org/legal/epl-v10.html.\n\
For purposes of the EPL, "Program" will mean the Content.\n\
\n\
Content includes, but is not limited to, source code, object code,\n\
documentation and other files maintained in the Eclipse.org CVS\n\
repository ("Repository") in CVS modules ("Modules") and made available\n\
as downloadable archives ("Downloads").\n\
\n\
- Content may be structured and packaged into modules to facilitate delivering,\n\
extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
plug-in fragments ("Fragments"), and features ("Features").\n\
- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
in a directory named "plugins".\n\
- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
Each Feature may be packaged as a sub-directory in a directory named "features".\n\
Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- Features may also include other Features ("Included Features"). Within a Feature, files\n\
named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
\n\
Features may also include other Features ("Included Features"). Files named\n\
"feature.xml" may contain a list of the names and version numbers of\n\
Included Features.\n\
\n\
The terms and conditions governing Plug-ins and Fragments should be\n\
contained in files named "about.html" ("Abouts"). The terms and\n\
conditions governing Features and Included Features should be contained\n\
in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
Licenses may be located in any directory of a Download or Module\n\
including, but not limited to the following locations:\n\
\n\
- The top-level (root) directory\n\
- Plug-in and Fragment directories\n\
- Inside Plug-ins and Fragments packaged as JARs\n\
- Sub-directories of the directory named "src" of certain Plug-ins\n\
- Feature directories\n\
\n\
Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
Eclipse Update Manager, you must agree to a license ("Feature Update\n\
License") during the installation process. If the Feature contains\n\
Included Features, the Feature Update License should either provide you\n\
with the terms and conditions governing the Included Features or inform\n\
you where you can locate them. Feature Update Licenses may be found in\n\
the "license" property of files named "feature.properties". Such Abouts,\n\
Feature Licenses and Feature Update Licenses contain the terms and\n\
conditions (or references to such terms and conditions) that govern your\n\
use of the associated Content in that directory.\n\
\n\
THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
\n\
- Common Public License Version 1.0 (available at https://www.eclipse.org/legal/cpl-v10.html)\n\
- Apache Software License 1.1 (available at https://www.apache.org/licenses/LICENSE)\n\
- Apache Software License 2.0 (available at https://www.apache.org/licenses/LICENSE-2.0)\n\
- IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- Mozilla Public License Version 1.1 (available at https://www.mozilla.org/MPL/MPL-1.1.html)\n\
\n\
IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
govern that particular Content.\n\
\n\
Cryptography\n\
\n\
Content may contain encryption software. The country in which you are\n\
currently may have restrictions on the import, possession, and use,\n\
and/or re-export to another country, of encryption software. BEFORE\n\
using any encryption software, please check the country's laws,\n\
regulations and policies concerning the import, possession, or use,\n\
and re-export of encryption software, to see if this is permitted.\n\
\n\
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
########### end of license property ##########################################

# "copyright" property - text of the "Feature Update Copyright"
copyright=\
Copyright (c) 2009-2020 Pivotal Software, Inc. and others.\n\
All rights reserved. This program and the accompanying materials\n\
are made available under the terms of the Eclipse Public License v1.0\n\
which accompanies this distribution, and is available at\n\
https://www.eclipse.org/legal/epl-v10.html\n\
32 changes: 32 additions & 0 deletions jdt-patch/e418/Feature-org.codehaus.groovy.jdt.patch/feature.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>

<feature id="org.codehaus.groovy.jdt.patch"
label="%featureName"
version="4.0.0.qualifier"
provider-name="%providerName">

<description url="%descriptionURL">
%description
</description>

<copyright>
%copyright
</copyright>

<license url="%licenseURL">
%license
</license>

<requires>
<import feature="org.eclipse.jdt" version="3.18.600.v20201007-1800" patch="true"/>
</requires>

<plugin
id="org.eclipse.jdt.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"
/>

</feature>
Loading

0 comments on commit 3ac04bf

Please sign in to comment.