Skip to content

Commit

Permalink
Eclipse 4.26 (M1) JDT Patch for Groovy-Eclipse
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Sep 30, 2022
1 parent 59fdb18 commit 8acdec8
Show file tree
Hide file tree
Showing 2,109 changed files with 1,271,478 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ public abstract class GroovyCompilerTestSuite {
protected static final long JDK16 = (60L << 16) + ClassFileConstants.MINOR_VERSION_0;
protected static final long JDK17 = (61L << 16) + ClassFileConstants.MINOR_VERSION_0;
protected static final long JDK18 = (62L << 16) + ClassFileConstants.MINOR_VERSION_0;
protected static final long JDK19 = (63L << 16) + ClassFileConstants.MINOR_VERSION_0;

@Parameters(name = "Java {1}")
public static Iterable<Object[]> params() {
long javaSpec = CompilerOptions.versionToJdkLevel(System.getProperty("java.specification.version"));
List<Object[]> params = new ArrayList<>();
for (long jdk : new long[] {JDK8, JDK9, JDK10, JDK11, JDK12, JDK13, JDK14, JDK15, JDK16, JDK17, JDK18}) {
for (long jdk : new long[] {JDK8, JDK9, JDK10, JDK11, JDK12, JDK13, JDK14, JDK15, JDK16, JDK17, JDK18, JDK19}) {
if (jdk == javaSpec || (jdk < javaSpec && (jdk == JDK8 || jdk == JDK11 || jdk == JDK17))) { // current and LTS
params.add(new Object[] {jdk, CompilerOptions.versionFromJdkLevel(jdk)});
}
Expand Down
9 changes: 5 additions & 4 deletions docs/Getting-Started-with-Groovy-Eclipse-Source-Code.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ This minimal project set should be open in your workspace:
* org.eclipse.jdt.groovy.core.tests.builder
* org.eclipse.jdt.groovy.core.tests.compiler

Note: Only one JDT patch should be imported (`org.eclipse.jdt.core`, `org.eclipse.jdt.core.tests.builder`, `org.eclipse.jdt.core.tests.compiler`) and it should be matched to the target platform of your workspace. For example, the patch in the `/e425` folder is for Eclipse 4.25 (2022-09).
Note: Only one JDT patch should be imported (`org.eclipse.jdt.core`, `org.eclipse.jdt.core.tests.builder`, `org.eclipse.jdt.core.tests.compiler`) and it should be matched to the target platform of your workspace. For example, the patch in the `/e426` folder is for Eclipse 4.26 (2022-12).


## Test with Eclipse
Expand All @@ -185,14 +185,15 @@ For manual testing and debugging, right-click on the org.codehaus.groovy.eclipse

[Download and install Maven](https://maven.apache.org/).

From the root directory of the repository, execute the following command to build Groovy-Eclipse for Eclipse 4.25 (2022-09).
From the root directory of the repository, execute the following command to build Groovy-Eclipse for Eclipse 4.26 (2022-12).

```
mvn -Pe4.25 clean install
mvn -Pe4.26 clean install
```

Replace e4.25 with a different option to build it for another Eclipse version:
Replace e4.26 with a different option to build it for another Eclipse version:

* e4.25
* e4.24
* e4.23
* e4.22
Expand Down
60 changes: 33 additions & 27 deletions groovy-eclipse.setup
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@
<setupTask
xsi:type="setup:VariableTask"
name="eclipse.target.platform"
defaultValue="2022-06"
defaultValue="2022-09"
storageURI="scope://Workspace"
label="Target Platform">
<choice
value="2022-12"
label="Eclipse 4.26 (2022-12)"/>
<choice
value="2022-09"
label="Eclipse 4.25 (2022-09)"/>
Expand All @@ -93,9 +96,6 @@
<choice
value="2021-09"
label="Eclipse 4.21 (2021-09)"/>
<choice
value="2021-06"
label="Eclipse 4.20 (2021-06)"/>
<description>Choose the compatibility level of the target platform</description>
</setupTask>
<setupTask
Expand Down Expand Up @@ -132,7 +132,15 @@
</setupTask>
<setupTask
xsi:type="setup.p2:P2Task"
filter="(| (scope.product.version.name=2022-09) (scope.product.version.name=latest) (scope.product.version.name=latest.released))">
filter="(| (scope.product.version.name=2022-12) (scope.product.version.name=latest))">
<requirement
name="org.codehaus.groovy.m2eclipse.feature.feature.group"/>
<repository
url="https://dist.springsource.org/snapshot/GRECLIPSE/e4.26"/>
</setupTask>
<setupTask
xsi:type="setup.p2:P2Task"
filter="(| (scope.product.version.name=2022-09) (scope.product.version.name=latest.released))">
<requirement
name="org.codehaus.groovy.m2eclipse.feature.feature.group"/>
<repository
Expand Down Expand Up @@ -170,14 +178,6 @@
<repository
url="https://dist.springsource.org/snapshot/GRECLIPSE/e4.21"/>
</setupTask>
<setupTask
xsi:type="setup.p2:P2Task"
filter="(scope.product.version.name=2021-06)">
<requirement
name="org.codehaus.groovy.m2eclipse.feature.feature.group"/>
<repository
url="https://dist.springsource.org/snapshot/GRECLIPSE/e4.20"/>
</setupTask>
<setupTask
xsi:type="git:GitCloneTask"
id="git.clone.Groovy-Eclipse"
Expand Down Expand Up @@ -231,6 +231,13 @@
<sourceLocator
rootFolder="${git.clone.Groovy-Eclipse.location}/Site-org.codehaus.groovy.eclipse"/>
</setupTask>
<setupTask
xsi:type="projects:ProjectsImportTask"
filter="(eclipse.target.platform=2022-12)">
<sourceLocator
rootFolder="${git.clone.Groovy-Eclipse.location}/jdt-patch/e426"
locateNestedProjects="true"/>
</setupTask>
<setupTask
xsi:type="projects:ProjectsImportTask"
filter="(eclipse.target.platform=2022-09)">
Expand Down Expand Up @@ -266,13 +273,6 @@
rootFolder="${git.clone.Groovy-Eclipse.location}/jdt-patch/e421"
locateNestedProjects="true"/>
</setupTask>
<setupTask
xsi:type="projects:ProjectsImportTask"
filter="(eclipse.target.platform=2021-06)">
<sourceLocator
rootFolder="${git.clone.Groovy-Eclipse.location}/jdt-patch/e420"
locateNestedProjects="true"/>
</setupTask>
<setupTask
xsi:type="setup.targlets:TargletTask">
<targlet
Expand All @@ -292,12 +292,25 @@
name="org.eclipse.buildship.feature.group"/>
<requirement
name="org.eclipse.test.feature.group"/>
<repositoryList
name="2021-06">
<repository
url="https://download.eclipse.org/releases/2022-12"/>
<repository
url="https://download.eclipse.org/eclipse/updates/4.26"/>
<repository
url="https://download.eclipse.org/technology/m2e/releases/1.20.1"/>
<repository
url="https://download.eclipse.org/eclipse/updates/4.26-I-builds/I20220928-1800"/>
</repositoryList>
<repositoryList
name="2022-09">
<repository
url="https://download.eclipse.org/releases/2022-09"/>
<repository
url="https://download.eclipse.org/eclipse/updates/4.25"/>
<repository
url="https://download.eclipse.org/technology/m2e/releases/1.20.1"/>
</repositoryList>
<repositoryList
name="2022-06">
Expand Down Expand Up @@ -327,13 +340,6 @@
<repository
url="https://download.eclipse.org/eclipse/updates/4.21"/>
</repositoryList>
<repositoryList
name="2021-06">
<repository
url="https://download.eclipse.org/releases/2021-06"/>
<repository
url="https://download.eclipse.org/eclipse/updates/4.20"/>
</repositoryList>
</targlet>
</setupTask>
<setupTask
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
12 changes: 12 additions & 0 deletions jdt-patch/e426/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-2022 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/e426/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.8.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.1400.v20220928-1800" patch="true"/>
</requires>

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

</feature>

0 comments on commit 8acdec8

Please sign in to comment.