Skip to content

Commit

Permalink
Eclipse 4.32 (M1) JDT Patch for Groovy-Eclipse
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Apr 20, 2024
1 parent 2c1dd60 commit 4b4f447
Show file tree
Hide file tree
Showing 2,217 changed files with 1,323,242 additions and 36 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2023 the original author or authors.
* Copyright 2009-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -179,7 +179,7 @@ protected void executeClass(final IPath projectPath, final String className, fin
TestVerifier verifier = new TestVerifier(false);
verifier.execute(className, classpath.toArray(new String[classpath.size()]));

String actualError = StringGroovyMethods.normalize((CharSequence) verifier.getExecutionError());
String actualError = StringGroovyMethods.normalize(verifier.getExecutionError());
if (expectedError == null && actualError.length() != 0) {
Assert.fail("unexpected error : " + actualError);
}
Expand All @@ -195,7 +195,7 @@ protected void executeClass(final IPath projectPath, final String className, fin
System.out.println("OUTPUT\n");
System.out.println(org.eclipse.jdt.core.tests.util.Util.displayString(actualOutput));
}
actualOutput = StringGroovyMethods.normalize((CharSequence) actualOutput);
actualOutput = StringGroovyMethods.normalize(actualOutput);
Assert.assertTrue("unexpected output.\nExpected:\n" + expectingOutput + "\nActual:\n" + actualOutput, actualOutput.indexOf(expectingOutput) != -1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ public void tagAsHavingErrors() {
hasErrors = true;
}

@Override
public void tagAsHavingIgnoredMandatoryErrors(final int problemId) {
// no-op
}
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 @@ -169,7 +169,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 `/e431` folder is for Eclipse 4.31 (2024-03).
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 `/e432` folder is for Eclipse 4.32 (2024-06).


## Test with Eclipse
Expand All @@ -187,14 +187,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.31 (2024-03).
From the root directory of the repository, execute the following command to build Groovy-Eclipse for Eclipse 4.32 (2024-06).

```
mvn -Pe4.31 clean verify
mvn -Pe4.32 clean verify
```

Replace e4.31 with a different option to build it for another Eclipse version:
Replace e4.32 with a different option to build it for another Eclipse version:

* e4.31
* e4.30
* e4.29
* e4.28
Expand Down
56 changes: 28 additions & 28 deletions groovy-eclipse.setup
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
defaultValue="2024-03"
storageURI="scope://Workspace"
label="Target Platform">
<choice
value="2024-06"
label="Eclipse 4.32 (2024-06)"/>
<choice
value="2024-03"
label="Eclipse 4.31 (2024-03)"/>
Expand All @@ -105,9 +108,6 @@
<choice
value="2023-03"
label="Eclipse 4.27 (2023-03)"/>
<choice
value="2022-12"
label="Eclipse 4.26 (2022-12)"/>
<description>Choose the compatibility level of the target platform</description>
</setupTask>
<setupTask
Expand Down Expand Up @@ -144,7 +144,15 @@
</setupTask>
<setupTask
xsi:type="setup.p2:P2Task"
filter="(| (scope.product.version.name=2024-03) (scope.product.version.name=latest) (scope.product.version.name=latest.released))">
filter="(| (scope.product.version.name=2024-06) (scope.product.version.name=latest))">
<requirement
name="org.codehaus.groovy.m2eclipse.feature.feature.group"/>
<repository
url="https://groovy.jfrog.io/artifactory/plugins-snapshot/e4.32"/>
</setupTask>
<setupTask
xsi:type="setup.p2:P2Task"
filter="(| (scope.product.version.name=2024-03) (scope.product.version.name=latest.released))">
<requirement
name="org.codehaus.groovy.m2eclipse.feature.feature.group"/>
<repository
Expand Down Expand Up @@ -182,14 +190,6 @@
<repository
url="https://groovy.jfrog.io/artifactory/plugins-snapshot/e4.27"/>
</setupTask>
<setupTask
xsi:type="setup.p2:P2Task"
filter="(scope.product.version.name=2022-12)">
<requirement
name="org.codehaus.groovy.m2eclipse.feature.feature.group"/>
<repository
url="https://groovy.jfrog.io/artifactory/plugins-snapshot/e4.26"/>
</setupTask>
<setupTask
xsi:type="git:GitCloneTask"
id="git.clone.Groovy-Eclipse"
Expand Down Expand Up @@ -245,9 +245,9 @@
</setupTask>
<setupTask
xsi:type="projects:ProjectsImportTask"
filter="(eclipse.target.platform=2023-12)">
filter="(eclipse.target.platform=2024-06)">
<sourceLocator
rootFolder="${git.clone.Groovy-Eclipse.location}/jdt-patch/e430"
rootFolder="${git.clone.Groovy-Eclipse.location}/jdt-patch/e432"
locateNestedProjects="true"/>
</setupTask>
<setupTask
Expand All @@ -257,6 +257,13 @@
rootFolder="${git.clone.Groovy-Eclipse.location}/jdt-patch/e431"
locateNestedProjects="true"/>
</setupTask>
<setupTask
xsi:type="projects:ProjectsImportTask"
filter="(eclipse.target.platform=2023-12)">
<sourceLocator
rootFolder="${git.clone.Groovy-Eclipse.location}/jdt-patch/e430"
locateNestedProjects="true"/>
</setupTask>
<setupTask
xsi:type="projects:ProjectsImportTask"
filter="(eclipse.target.platform=2023-09)">
Expand All @@ -278,13 +285,6 @@
rootFolder="${git.clone.Groovy-Eclipse.location}/jdt-patch/e427"
locateNestedProjects="true"/>
</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="setup.targlets:TargletTask">
<targlet
Expand All @@ -304,6 +304,13 @@
name="org.eclipse.buildship.feature.group"/>
<requirement
name="org.eclipse.test.feature.group"/>
<repositoryList
name="2024-06">
<repository
url="https://download.eclipse.org/releases/2024-05"/>
<repository
url="https://download.eclipse.org/eclipse/updates/4.32"/>
</repositoryList>
<repositoryList
name="2024-03">
<repository
Expand Down Expand Up @@ -339,13 +346,6 @@
<repository
url="https://download.eclipse.org/eclipse/updates/4.27"/>
</repositoryList>
<repositoryList
name="2022-12">
<repository
url="https://download.eclipse.org/releases/2022-12"/>
<repository
url="https://download.eclipse.org/eclipse/updates/4.26"/>
</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/e432/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-2024 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\
40 changes: 40 additions & 0 deletions jdt-patch/e432/Feature-org.codehaus.groovy.jdt.patch/feature.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>

<feature id="org.codehaus.groovy.jdt.patch"
label="%featureName"
version="5.4.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.19.500.v20240406-1929" patch="true"/>
</requires>

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

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

</feature>

0 comments on commit 4b4f447

Please sign in to comment.