diff --git a/groovy-eclipse.setup b/groovy-eclipse.setup
index 4ee2d60110..c617cf14c4 100644
--- a/groovy-eclipse.setup
+++ b/groovy-eclipse.setup
@@ -299,7 +299,7 @@
+ url="https://download.eclipse.org/eclipse/updates/4.23-I-builds/I20220302-1800"/>
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java b/jdt-patch/e423/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
index 539d48151a..b1c8907ff6 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
@@ -901,8 +901,9 @@ public CompletionEngine(
this.lookupEnvironment =
new LookupEnvironment(this, this.compilerOptions, this.problemReporter, nameEnvironment);
this.parser =
- // GROOVY edit
- //new CompletionParser(this.problemReporter, this.requestor.isExtendedContextRequired(), monitor);
+ /* GROOVY edit
+ new CompletionParser(this.problemReporter, this.requestor.isExtendedContextRequired(), monitor);
+ */
LanguageSupportFactory.getCompletionParser(this.compilerOptions, this.problemReporter, this.requestor.isExtendedContextRequired(), monitor);
// GROOVY end
this.owner = owner;
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java b/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
index 6d2331bf11..590101fdb6 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
@@ -810,8 +810,9 @@ protected void handleInternalException(
}
public void initializeParser() {
- // GROOVY edit
- //this.parser = new Parser(this.problemReporter, this.options.parseLiteralExpressionsAsConstants);
+ /* GROOVY edit
+ this.parser = new Parser(this.problemReporter, this.options.parseLiteralExpressionsAsConstants);
+ */
this.parser = LanguageSupportFactory.getParser(this, this.options, this.problemReporter, this.options.parseLiteralExpressionsAsConstants, 1);
// GROOVY end
}
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java b/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
index 72c3958587..0325bb7a73 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
@@ -98,8 +98,9 @@ protected BlockScope(int kind, Scope parent) {
/* Create the class scope & binding for the anonymous type.
*/
public final void addAnonymousType(TypeDeclaration anonymousType, ReferenceBinding superBinding) {
- // GROOVY edit
- //ClassScope anonymousClassScope = new ClassScope(this, anonymousType);
+ /* GROOVY edit
+ ClassScope anonymousClassScope = new ClassScope(this, anonymousType);
+ */
ClassScope anonymousClassScope = anonymousType.newClassScope(this);
// GROOVY end
anonymousClassScope.buildAnonymousTypeBinding(
@@ -124,8 +125,9 @@ public final void addAnonymousType(TypeDeclaration anonymousType, ReferenceBindi
/* Create the class scope & binding for the local type.
*/
public final void addLocalType(TypeDeclaration localType) {
- // GROOVY edit
- //ClassScope localTypeScope = new ClassScope(this, localType);
+ /* GROOVY edit
+ ClassScope localTypeScope = new ClassScope(this, localType);
+ */
ClassScope localTypeScope = localType.newClassScope(this);
// GROOVY end
addSubscope(localTypeScope);
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java b/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
index dff37eb8c6..373d89a00a 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
@@ -352,8 +352,9 @@ private LocalTypeBinding buildLocalType(SourceTypeBinding enclosingType, Package
continue nextMember;
}
}
- // GROOVY edit
- //ClassScope memberScope = new ClassScope(this, this.referenceContext.memberTypes[i]);
+ /* GROOVY edit
+ ClassScope memberScope = new ClassScope(this, this.referenceContext.memberTypes[i]);
+ */
ClassScope memberScope = this.referenceContext.memberTypes[i].newClassScope(this);
// GROOVY end
LocalTypeBinding memberBinding = memberScope.buildLocalType(localType, packageBinding);
@@ -424,8 +425,9 @@ private void buildMemberTypes(AccessRestriction accessRestriction) {
continue nextMember;
}
}
- // GROOVY edit
- //ClassScope memberScope = new ClassScope(this, memberContext);
+ /* GROOVY edit
+ ClassScope memberScope = new ClassScope(this, memberContext);
+ */
ClassScope memberScope = memberContext.newClassScope(this);
// GROOVY end
memberTypeBindings[count++] = memberScope.buildType(sourceType, sourceType.fPackage, accessRestriction);
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java b/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
index 01c478c945..2ff3ec6cb8 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
@@ -127,8 +127,9 @@ void buildTypeBindings(AccessRestriction accessRestriction) {
if (this.referenceContext.currentPackage != null
|| this.referenceContext.types != null
|| this.referenceContext.imports != null) {
- // GROOVY edit
- //problemReporter().packageIsNotExpectedPackage(this.referenceContext);
+ /* GROOVY edit
+ problemReporter().packageIsNotExpectedPackage(this.referenceContext);
+ */
errorReported = reportPackageIsNotExpectedPackage(this.referenceContext);
// GROOVY end
}
@@ -207,8 +208,9 @@ void buildTypeBindings(AccessRestriction accessRestriction) {
checkPublicTypeNameMatchesFilename(typeDecl);
// GROOVY end
- // GROOVY edit
- //ClassScope child = new ClassScope(this, typeDecl);
+ /* GROOVY edit
+ ClassScope child = new ClassScope(this, typeDecl);
+ */
ClassScope child = buildClassScope(this, typeDecl);
// GROOVY end
SourceTypeBinding type = child.buildType(null, this.fPackage, accessRestriction);
@@ -277,10 +279,11 @@ void checkAndSetImports() {
break;
}
}
- // GROOVY edit
- //ImportBinding[] resolvedImports = new ImportBinding[numberOfImports];
- //resolvedImports[0] = getDefaultImports()[0];
- //int index = 1;
+ /* GROOVY edit
+ ImportBinding[] resolvedImports = new ImportBinding[numberOfImports];
+ resolvedImports[0] = getDefaultImports()[0];
+ int index = 1;
+ */
ImportBinding[] defaultImports = getDefaultImports();
int index = defaultImports.length;
ImportBinding[] resolvedImports = new ImportBinding[numberOfImports + defaultImports.length-1];
@@ -289,8 +292,9 @@ void checkAndSetImports() {
nextImport : for (int i = 0; i < numberOfStatements; i++) {
ImportReference importReference = this.referenceContext.imports[i];
- // GROOVY edit
- //char[][] compoundName = importReference.tokens;
+ /* GROOVY edit
+ char[][] compoundName = importReference.tokens;
+ */
char[][] compoundName = importReference.getImportName();
// GROOVY end
@@ -298,8 +302,9 @@ void checkAndSetImports() {
for (int j = 0; j < index; j++) {
ImportBinding resolved = resolvedImports[j];
if (resolved.onDemand == ((importReference.bits & ASTNode.OnDemand) != 0) && resolved.isStatic() == importReference.isStatic())
- // GROOVY edit
- //if (CharOperation.equals(compoundName, resolvedImports[j].compoundName))
+ /* GROOVY edit
+ if (CharOperation.equals(compoundName, resolvedImports[j].compoundName))
+ */
if (CharOperation.equals(compoundName, resolvedImports[j].compoundName) && CharOperation.equals(importReference.getSimpleName(), resolvedImports[j].getSimpleName()))
// GROOVY end
continue nextImport;
@@ -459,10 +464,11 @@ void faultInImports() {
break;
}
}
- // GROOVY edit
- //this.tempImports = new ImportBinding[numberOfImports];
- //this.tempImports[0] = getDefaultImports()[0];
- //this.importPtr = 1;
+ /* GROOVY edit
+ this.tempImports = new ImportBinding[numberOfImports];
+ this.tempImports[0] = getDefaultImports()[0];
+ this.importPtr = 1;
+ */
ImportBinding[] defaultImports = getDefaultImports();
this.importPtr = defaultImports.length;
this.tempImports = new ImportBinding[numberOfImports + this.importPtr-1];
@@ -492,8 +498,9 @@ void faultInImports() {
if ((importReference.bits & ASTNode.OnDemand) != 0) {
Binding importBinding = findImport(compoundName, compoundName.length);
if (!importBinding.isValidBinding()) {
- // GROOVY edit
- //problemReporter().importProblem(importReference, importBinding);
+ /* GROOVY edit
+ problemReporter().importProblem(importReference, importBinding);
+ */
reportImportProblem(importReference, importBinding);
// GROOVY end
continue nextImport;
@@ -525,8 +532,9 @@ void faultInImports() {
} else {
unresolvedFound = true;
if (reportUnresolved) {
- // GROOVY edit
- //problemReporter().importProblem(importReference, importBinding);
+ /* GROOVY edit
+ problemReporter().importProblem(importReference, importBinding);
+ */
reportImportProblem(importReference, importBinding);
// GROOVY end
}
@@ -668,8 +676,9 @@ private Binding findImport(char[][] compoundName, int length) {
if (type == null)
return new ProblemReferenceBinding(CharOperation.subarray(compoundName, 0, i), null, ProblemReasons.NotFound);
}
- // GROOVY edit
- //if (!type.canBeSeenBy(this.fPackage))
+ /* GROOVY edit
+ if (!type.canBeSeenBy(this.fPackage))
+ */
if (!canBeSeenBy(type, this.fPackage))
// GROOVY end
return new ProblemReferenceBinding(compoundName, type, ProblemReasons.NotVisible);
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java b/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
index b4b36338f7..5cc937472d 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
@@ -472,8 +472,9 @@ public void buildTypeBindings(CompilationUnitDeclaration unit, AccessRestriction
if (this.globalOptions.sourceLevel >= ClassFileConstants.JDK9) {
unitModule = unit.module(this);
}
- // GROOVY edit
- //scope = new CompilationUnitScope(unit, unitModule != null ? unitModule.environment : this);
+ /* GROOVY edit
+ scope = new CompilationUnitScope(unit, unitModule != null ? unitModule.environment : this);
+ */
scope = unit.buildCompilationUnitScope(unitModule != null ? unitModule.environment : this);
// GROOVY end
}
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java b/jdt-patch/e423/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
index c0cdbdcf3b..d75bf5c2f7 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
@@ -1545,8 +1545,9 @@ public CompilationUnit convert(org.eclipse.jdt.internal.compiler.ast.Compilation
this.compilationUnitSource = source;
this.compilationUnitSourceLength = source.length;
this.scanner.setSource(source, unit.compilationResult);
- // GROOVY edit
- //CompilationUnit compilationUnit = new CompilationUnit(this.ast);
+ /* GROOVY edit
+ CompilationUnit compilationUnit = new CompilationUnit(this.ast);
+ */
CompilationUnit compilationUnit = unit.getSpecialDomCompilationUnit(this.ast);
if (compilationUnit == null) compilationUnit = new CompilationUnit(this.ast);
// GROOVY end
@@ -4430,8 +4431,9 @@ public Type convertType(TypeReference typeReference) {
type2 = convertType(arguments[i]);
parameterizedType.typeArguments().add(type2);
}
- // GROOVY edit -- avoid IllegalArgumentException in setSourceRange below
- //end = type2 != null ? type2.getStartPosition() + type2.getLength() - 1 : end;
+ /* GROOVY edit -- avoid IllegalArgumentException in setSourceRange below
+ end = type2 != null ? type2.getStartPosition() + type2.getLength() - 1 : end;
+ */
if (type2 != null) {
if (start == -1) {
end = -3;
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java b/jdt-patch/e423/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
index 69973cb8b4..2c543574bd 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
@@ -375,8 +375,9 @@ public void acceptResult(CompilationResult compilationResult) {
@Override
public void initializeParser() {
- // GROOVY edit
- //this.parser = new CommentRecorderParser(this.problemReporter, false);
+ /* GROOVY edit
+ this.parser = new CommentRecorderParser(this.problemReporter, false);
+ */
this.parser = LanguageSupportFactory.getParser(this, this.lookupEnvironment == null ? null : this.lookupEnvironment.globalOptions, this.problemReporter, false, LanguageSupportFactory.CommentRecorderParserVariant + 1);
// GROOVY end
}
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java
index 9fad04edf2..e262180ba9 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java
@@ -123,8 +123,9 @@ public static CompilationUnitDeclaration buildModularCompilationUnit(
* at least contain one type.
*/
private CompilationUnitDeclaration convert(ISourceType[] sourceTypes, CompilationResult compilationResult) throws JavaModelException {
- // GROOVY edit
- //this.unit = new CompilationUnitDeclaration(this.problemReporter, compilationResult, 0);
+ /* GROOVY edit
+ this.unit = new CompilationUnitDeclaration(this.problemReporter, compilationResult, 0);
+ */
this.unit = LanguageSupportFactory.newCompilationUnitDeclaration((ICompilationUnit) ((SourceTypeElementInfo) sourceTypes[0]).getHandle().getCompilationUnit(), this.problemReporter, compilationResult, 0);
// GROOVY end
// not filled at this point
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnit.java b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnit.java
index be703ca1d1..9e89927dfb 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnit.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnit.java
@@ -617,8 +617,9 @@ public IJavaElement findSharedWorkingCopy(IBufferFactory factory) {
*/
@Override
public ICompilationUnit findWorkingCopy(WorkingCopyOwner workingCopyOwner) {
- // GROOVY edit
- //CompilationUnit cu = new CompilationUnit((PackageFragment)this.getParent(), getElementName(), workingCopyOwner);
+ /* GROOVY edit
+ CompilationUnit cu = new CompilationUnit((PackageFragment)this.getParent(), getElementName(), workingCopyOwner);
+ */
CompilationUnit cu = LanguageSupportFactory.newCompilationUnit((PackageFragment) this.getParent(), getElementName(), workingCopyOwner);
// GROOVY end
if (workingCopyOwner == DefaultWorkingCopyOwner.PRIMARY) {
@@ -936,8 +937,9 @@ public ICompilationUnit getPrimary() {
@Override
public JavaElement getPrimaryElement(boolean checkOwner) {
if (checkOwner && isPrimary()) return this;
- // GROOVY edit
- //return new CompilationUnit((PackageFragment)getParent(), getElementName(), DefaultWorkingCopyOwner.PRIMARY);
+ /* GROOVY edit
+ return new CompilationUnit((PackageFragment)getParent(), getElementName(), DefaultWorkingCopyOwner.PRIMARY);
+ */
return LanguageSupportFactory.newCompilationUnit((PackageFragment) getParent(), getElementName(), DefaultWorkingCopyOwner.PRIMARY);
// GROOVY end
}
@@ -1040,8 +1042,9 @@ public ICompilationUnit getWorkingCopy(WorkingCopyOwner workingCopyOwner, IProbl
JavaModelManager manager = JavaModelManager.getJavaModelManager();
- // GROOVY edit
- //CompilationUnit workingCopy = new CompilationUnit((PackageFragment)getParent(), getElementName(), workingCopyOwner);
+ /* GROOVY edit
+ CompilationUnit workingCopy = new CompilationUnit((PackageFragment)getParent(), getElementName(), workingCopyOwner);
+ */
CompilationUnit workingCopy = LanguageSupportFactory.newCompilationUnit((PackageFragment) getParent(), getElementName(), workingCopyOwner);
// GROOVY end
JavaModelManager.PerWorkingCopyInfo perWorkingCopyInfo =
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java
index a0b96db855..faf945ded3 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java
@@ -363,8 +363,9 @@ public static CompilationUnitDeclaration process(
*/
@Override
public void initializeParser() {
- // GROOVY edit
- //this.parser = new CommentRecorderParser(this.problemReporter, this.options.parseLiteralExpressionsAsConstants);
+ /* GROOVY edit
+ this.parser = new CommentRecorderParser(this.problemReporter, this.options.parseLiteralExpressionsAsConstants);
+ */
this.parser = LanguageSupportFactory.getParser(this, this.lookupEnvironment == null ? null : this.lookupEnvironment.globalOptions, this.problemReporter, this.options.parseLiteralExpressionsAsConstants, LanguageSupportFactory.CommentRecorderParserVariant);
// GROOVY end
}
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java
index 6d133620ff..bd8dba2210 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java
@@ -326,8 +326,9 @@ private void processCompilationUnitResource(ICompilationUnit source, PackageFrag
// copy resource
IContainer destFolder = (IContainer)dest.getResource(); // can be an IFolder or an IProject
IFile destFile = destFolder.getFile(new Path(destName));
- // GROOVY edit
- //org.eclipse.jdt.internal.core.CompilationUnit destCU = new org.eclipse.jdt.internal.core.CompilationUnit(dest, destName, DefaultWorkingCopyOwner.PRIMARY);
+ /* GROOVY edit
+ org.eclipse.jdt.internal.core.CompilationUnit destCU = new org.eclipse.jdt.internal.core.CompilationUnit(dest, destName, DefaultWorkingCopyOwner.PRIMARY);
+ */
org.eclipse.jdt.internal.core.CompilationUnit destCU = LanguageSupportFactory.newCompilationUnit(dest, destName, DefaultWorkingCopyOwner.PRIMARY);
// GROOVY end
if (!destFile.equals(sourceResource)) {
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JarPackageFragment.java b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JarPackageFragment.java
index f646f6adbc..624be9442f 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JarPackageFragment.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JarPackageFragment.java
@@ -101,8 +101,9 @@ private Object[] computeNonJavaResources(ArrayList entryNames) {
for (int i = 0; i < length; i++) {
String resName = (String) entryNames.get(i);
// consider that a .java file is not a non-java resource (see bug 12246 Packages view shows .class and .java files when JAR has source)
- // GROOVY edit
- //if (!Util.isJavaLikeFileName(resName)) {
+ /* GROOVY edit
+ if (!Util.isJavaLikeFileName(resName)) {
+ */
if (!Util.isJavaLikeFileName(resName) || (isInteresting && LanguageSupportFactory.isInterestingSourceFile(resName))) {
// GROOVY end
IPath filePath = new Path(resName);
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElement.java b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElement.java
index 62325a5942..4ef5203c78 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElement.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElement.java
@@ -464,8 +464,9 @@ protected IJavaElement getSourceElementAt(int position) throws JavaModelExceptio
return candidate == null ? child.getSourceElementAt(position) : candidate.getSourceElementAt(position);
}
child = --i>=0 ? (SourceRefElement) children[i] : null;
- // GROOVY edit
- //} while (child != null && child.getSourceRange().getOffset() == declarationStart);
+ /* GROOVY edit
+ } while (child != null && child.getSourceRange().getOffset() == declarationStart);
+ */
} while (child instanceof IField && child.getSourceRange().getOffset() == declarationStart);
// GROOVY end
// position in field's type: use first field
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
index 34c41cd7a7..7c7573998c 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
@@ -2808,8 +2808,9 @@ public ICompilationUnit[] getWorkingCopies(WorkingCopyOwner owner, boolean addPr
if (primaryWCs != null) {
for (int i = 0; i < primaryLength; i++) {
ICompilationUnit primaryWorkingCopy = primaryWCs[i];
- // GROOVY edit
- //ICompilationUnit workingCopy = new CompilationUnit((PackageFragment) primaryWorkingCopy.getParent(), primaryWorkingCopy.getElementName(), owner);
+ /* GROOVY edit
+ ICompilationUnit workingCopy = new CompilationUnit((PackageFragment) primaryWorkingCopy.getParent(), primaryWorkingCopy.getElementName(), owner);
+ */
ICompilationUnit workingCopy = LanguageSupportFactory.newCompilationUnit((PackageFragment) primaryWorkingCopy.getParent(), primaryWorkingCopy.getElementName(), owner);
// GROOVY end
if (!workingCopyToInfos.containsKey(workingCopy))
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragment.java b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragment.java
index 48d1b1d217..67f1eef088 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragment.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragment.java
@@ -98,8 +98,9 @@ protected boolean buildStructure(OpenableElementInfo info, IProgressMonitor pm,
&& !Util.isExcluded(child, inclusionPatterns, exclusionPatterns)) {
IJavaElement childElement;
if (kind == IPackageFragmentRoot.K_SOURCE && Util.isValidCompilationUnitName(child.getName(), sourceLevel, complianceLevel)) {
- // GROOVY edit
- //childElement = new CompilationUnit(this, child.getName(), DefaultWorkingCopyOwner.PRIMARY);
+ /* GROOVY edit
+ childElement = new CompilationUnit(this, child.getName(), DefaultWorkingCopyOwner.PRIMARY);
+ */
childElement = LanguageSupportFactory.newCompilationUnit(this, child.getName(), DefaultWorkingCopyOwner.PRIMARY);
// GROOVY end
vChildren.add(childElement);
@@ -167,8 +168,9 @@ public void copy(IJavaElement container, IJavaElement sibling, String rename, bo
public ICompilationUnit createCompilationUnit(String cuName, String contents, boolean force, IProgressMonitor monitor) throws JavaModelException {
CreateCompilationUnitOperation op= new CreateCompilationUnitOperation(this, cuName, contents, force);
op.runOperation(monitor);
- // GROOVY edit
- //return new CompilationUnit(this, cuName, DefaultWorkingCopyOwner.PRIMARY);
+ /* GROOVY edit
+ return new CompilationUnit(this, cuName, DefaultWorkingCopyOwner.PRIMARY);
+ */
return LanguageSupportFactory.newCompilationUnit(this, cuName, DefaultWorkingCopyOwner.PRIMARY);
// GROOVY end
}
@@ -296,8 +298,9 @@ public ICompilationUnit getCompilationUnit(String cuName) {
if (!org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(cuName)) {
throw new IllegalArgumentException(Messages.convention_unit_notJavaName);
}
- // GROOVY edit
- //return new CompilationUnit(this, cuName, DefaultWorkingCopyOwner.PRIMARY);
+ /* GROOVY edit
+ return new CompilationUnit(this, cuName, DefaultWorkingCopyOwner.PRIMARY);
+ */
return LanguageSupportFactory.newCompilationUnit(this, cuName, DefaultWorkingCopyOwner.PRIMARY);
// GROOVY end
}
@@ -366,8 +369,9 @@ public IJavaElement getHandleFromMemento(String token, MementoTokenizer memento,
case JEM_COMPILATIONUNIT:
if (!memento.hasMoreTokens()) return this;
String cuName = memento.nextToken();
- // GROOVY edit
- //JavaElement cu = new CompilationUnit(this, cuName, owner);
+ /* GROOVY edit
+ JavaElement cu = new CompilationUnit(this, cuName, owner);
+ */
JavaElement cu = LanguageSupportFactory.newCompilationUnit(this, cuName, owner);
// GROOVY end
return cu.getHandleFromMemento(memento, owner);
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragmentRootInfo.java b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragmentRootInfo.java
index c241d2fc51..72559e92d8 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragmentRootInfo.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragmentRootInfo.java
@@ -85,8 +85,9 @@ static Object[] computeFolderNonJavaResources(IPackageFragmentRoot root, IContai
String fileName = member.getName();
// ignore .java files that are not excluded
- // GROOVY edit
- //if (Util.isValidCompilationUnitName(fileName, sourceLevel, complianceLevel) && !Util.isExcluded(member, inclusionPatterns, exclusionPatterns))
+ /* GROOVY edit
+ if (Util.isValidCompilationUnitName(fileName, sourceLevel, complianceLevel) && !Util.isExcluded(member, inclusionPatterns, exclusionPatterns))
+ */
if ((Util.isValidCompilationUnitName(fileName, sourceLevel, complianceLevel) && !Util.isExcluded(member, inclusionPatterns, exclusionPatterns)) &&
// we want to show groovy scripts that are coming from class folders
!(isInterestingPackageRoot && LanguageSupportFactory.isInterestingSourceFile(fileName)))
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java
index 5bdebd070e..88c956fccf 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java
@@ -233,9 +233,9 @@ protected void addAllSourceFiles(final LinkedHashSet sourceFiles) th
public boolean visit(IResourceProxy proxy) throws CoreException {
switch(proxy.getType()) {
case IResource.FILE :
- // GROOVY edit
- //if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(proxy.getName())) {
- // GRECLIPSE-404 must call 'isJavaLikeFile' directly in order to make the Scala-Eclipse plugin's weaving happy
+ /* GROOVY edit -- GRECLIPSE-404 must call 'isJavaLikeFile' directly in order to make the Scala-Eclipse plugin's weaving happy
+ if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(proxy.getName())) {
+ */
String resourceName = proxy.getName();
if ((!isInterestingProject && org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(resourceName) && !LanguageSupportFactory.isInterestingSourceFile(resourceName)) ||
(isInterestingProject && LanguageSupportFactory.isSourceFile(resourceName, isInterestingProject))) {
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java
index 9d1b4ac5eb..0c0583d297 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java
@@ -633,13 +633,12 @@ protected boolean findSourceFiles(IResourceDelta sourceDelta, ClasspathMultiDire
if (isExcluded) return true;
String resourceName = resource.getName();
- // GROOVY add
- // determine if this is a Groovy project
+ // GROOVY add -- determine if this is a Groovy project
final boolean isInterestingProject = LanguageSupportFactory.isInterestingProject(this.javaBuilder.getProject());
// GROOVY end
- // GROOVY edit
- //if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(resourceName)) {
- // GRECLIPSE-404 must call 'isJavaLikeFile' directly in order to make the Scala-Eclipse plugin's weaving happy
+ /* GROOVY edit -- GRECLIPSE-404 must call 'isJavaLikeFile' directly in order to make the Scala-Eclipse plugin's weaving happy
+ if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(resourceName)) {
+ */
if ((!isInterestingProject && org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(resourceName) && !LanguageSupportFactory.isInterestingSourceFile(resourceName))
|| (isInterestingProject && LanguageSupportFactory.isSourceFile(resourceName, isInterestingProject))) {
// GROOVY end
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java b/jdt-patch/e423/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java
index 0d0009d8f6..e7758f4f08 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java
@@ -377,8 +377,9 @@ public SourceElementParser getSourceElementParser(IJavaProject project, ISourceE
Map options = project.getOptions(true);
options.put(JavaCore.COMPILER_TASK_TAGS, ""); //$NON-NLS-1$
- // GROOVY edit
- //SourceElementParser parser = new IndexingParser(
+ /* GROOVY edit
+ SourceElementParser parser = new IndexingParser(
+ */
SourceElementParser parser = LanguageSupportFactory.getIndexingParser(
// GROOVY end
requestor,
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java b/jdt-patch/e423/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
index 1797fd7157..25604c0637 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
@@ -435,8 +435,9 @@ protected Parser basicParser() {
DefaultErrorHandlingPolicies.proceedWithAllProblems(),
this.options,
new DefaultProblemFactory());
- // GROOVY edit
- //this.basicParser = new Parser(problemReporter, false);
+ /* GROOVY edit
+ this.basicParser = new Parser(problemReporter, false);
+ */
this.basicParser = LanguageSupportFactory.getParser(this, this.options, problemReporter, false, 1);
// GROOVY end
this.basicParser.reportOnlyOneSyntaxError = true;
diff --git a/jdt-patch/e423/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java b/jdt-patch/e423/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java
index 5aeca73ac3..fad07c2cfd 100644
--- a/jdt-patch/e423/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java
+++ b/jdt-patch/e423/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java
@@ -34,13 +34,15 @@ public class MatchLocatorParser extends Parser {
public static MatchLocatorParser createParser(ProblemReporter problemReporter, MatchLocator locator) {
if ((locator.matchContainer & PatternLocator.COMPILATION_UNIT_CONTAINER) != 0) {
- // GROOVY edit
- //return new ImportMatchLocatorParser(problemReporter, locator);
+ /* GROOVY edit
+ return new ImportMatchLocatorParser(problemReporter, locator);
+ */
return LanguageSupportFactory.getImportMatchLocatorParser(problemReporter, locator);
// GROOVY end
}
- // GROOVY edit
- //return new MatchLocatorParser(problemReporter, locator);
+ /* GROOVY edit
+ return new MatchLocatorParser(problemReporter, locator);
+ */
return LanguageSupportFactory.getMatchLocatorParser(problemReporter, locator);
// GROOVY end
}
diff --git a/pom.xml b/pom.xml
index adcef34290..3f5c70a58a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -134,7 +134,7 @@
milestone
p2
- https://download.eclipse.org/eclipse/updates/4.23-I-builds/I20220223-1800
+ https://download.eclipse.org/eclipse/updates/4.23-I-builds/I20220302-1800