Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Groovy plug-in to 2.6.0-SNAPSHOT #503

Merged
merged 3 commits into from
Feb 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Site-org.codehaus.groovy.eclipse/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
<category name="org.codehaus.groovy.compilers"/>
</feature>

<feature id="org.codehaus.groovy26.feature" url="features/org.codehaus.groovy26.feature_3.0.0.qualifier.jar" version="3.0.0.qualifier">
<category name="org.codehaus.groovy.compilers"/>
</feature>

<feature id="org.codehaus.groovy.m2eclipse.feature" url="features/org.codehaus.groovy.m2eclipse.feature_3.0.0.qualifier.jar" version="3.0.0.qualifier">
<category name="org.codehaus.groovy.m2eclipse"/>
</feature>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected String[] getDefaultClassPaths() {
System.arraycopy(cps, 0, newcps, 0, cps.length);

String[] ivyVersions = {"2.5.0", "2.4.0"};
String[] groovyVersions = {"2.5.0-indy", "2.4.13"};
String[] groovyVersions = {"2.6.0-indy", "2.5.0-indy", "2.4.13"};
try {
URL groovyJar = null;
for (String groovyVer : groovyVersions) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2017 the original author or authors.
* Copyright 2009-2018 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 @@ -28,6 +28,7 @@ public enum SpecifiedVersion {
_23(2, 3, "23"),
_24(2, 4, "24"),
_25(2, 5, "25"),
_26(2, 6, "26"),
DONT_CARE(0, 0, "-1"),
UNSPECIFIED(0, 0, "0");

Expand Down Expand Up @@ -101,6 +102,8 @@ public static SpecifiedVersion parseVersion(String jarName) {
return _24;
case 5:
return _25;
case 6:
return _26;
}
break;
}
Expand Down Expand Up @@ -146,6 +149,9 @@ public static SpecifiedVersion findVersionFromString(String compilerLevel) {
if ("25".equals(compilerLevel) || "2.5".equals(compilerLevel)) {
return _25;
}
if ("26".equals(compilerLevel) || "2.6".equals(compilerLevel)) {
return _26;
}
if ("0".equals(compilerLevel)) {
return UNSPECIFIED;
}
Expand All @@ -154,7 +160,7 @@ public static SpecifiedVersion findVersionFromString(String compilerLevel) {
}

System.out.println("Invalid Groovy compiler level specified: " + compilerLevel +
"\nMust be one of 16, 1.6, 17, 1.7, 18, 1.8, 19, 1.9, 20, 2.0, 21, 2.1, 22, 2.2, 23, 2.3, 24, 2.4, 25 or 2.5");
"\nMust be one of 16, 1.6, 17, 1.7, 18, 1.8, 19, 1.9, 20, 2.0, 21, 2.1, 22, 2.2, 23, 2.3, 24, 2.4, 25, 2.5, 26 or 2.6");

return UNSPECIFIED;
}
Expand Down Expand Up @@ -185,6 +191,8 @@ public static SpecifiedVersion findVersion(Version ver) {
return _24;
case 5:
return _25;
case 6:
return _26;
}
}
return UNSPECIFIED;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public void setHasInconsistentHierarchy(boolean b) {
/**
* Returns the ClassNode this ClassNode is redirecting to.
*/
public ClassNode redirect(){
public ClassNode redirect() {
if (redirect==null) return this;
return redirect.redirect();
}
Expand Down Expand Up @@ -562,15 +562,10 @@ public void setModifiers(int modifiers) {
redirect().modifiers = modifiers;
}

// GRECLIPSE add -- overridable method for JDTClassNode
protected void ensurePropertiesInitialized() {
}
// GRECLIPSE end

public List<PropertyNode> getProperties() {
final ClassNode r = redirect();
// GRECLIPSE add
r.ensurePropertiesInitialized();
if (r != this) return r.getProperties();
// GRECLIPSE end
if (r.properties == null)
r.properties = new ArrayList<PropertyNode> ();
Expand Down Expand Up @@ -642,24 +637,19 @@ public void addFieldFirst(FieldNode node) {
r.fieldIndex.put(node.getName(), node);
}

// GRECLIPSE add
public void addPropertyWithoutField(PropertyNode node) {
ClassNode r = redirect();
node.setDeclaringClass(r);
if (r.properties == null)
r.properties = new ArrayList<PropertyNode>();
r.properties.add(node);
}
// GRECLIPSE end

public void addProperty(PropertyNode node) {
// GRECLIPSE add
getProperties().add(node);
// GRECLIPSE end
node.setDeclaringClass(redirect());
FieldNode field = node.getField();
addField(field);
/* GRECLIPSE edit
final ClassNode r = redirect();
if (r.properties == null)
r.properties = new ArrayList<PropertyNode> ();
r.properties.add(node);
*/
}

public PropertyNode addProperty(String name,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.codehaus.groovy.ast.expr;

import org.codehaus.groovy.ast.Parameter;
import org.codehaus.groovy.ast.stmt.Statement;

public class LambdaExpression extends ClosureExpression {

public LambdaExpression(Parameter[] args, Statement code) {
super(args, code);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public void setHasInconsistentHierarchy(boolean b) {
/**
* Returns the ClassNode this ClassNode is redirecting to.
*/
public ClassNode redirect(){
public ClassNode redirect() {
if (redirect==null) return this;
return redirect.redirect();
}
Expand Down Expand Up @@ -551,15 +551,10 @@ public void setModifiers(int modifiers) {
redirect().modifiers = modifiers;
}

// GRECLIPSE add -- overridable method for JDTClassNode
protected void ensurePropertiesInitialized() {
}
// GRECLIPSE end

public List<PropertyNode> getProperties() {
final ClassNode r = redirect();
// GRECLIPSE add
r.ensurePropertiesInitialized();
if (r != this) return r.getProperties();
// GRECLIPSE end
if (r.properties == null)
r.properties = new ArrayList<PropertyNode>();
Expand Down Expand Up @@ -636,24 +631,19 @@ public Map<String, FieldNode> getFieldIndex() {
return fieldIndex;
}

// GRECLIPSE add
public void addPropertyWithoutField(PropertyNode node) {
ClassNode r = redirect();
node.setDeclaringClass(r);
if (r.properties == null)
r.properties = new ArrayList<>();
r.properties.add(node);
}
// GRECLIPSE end

public void addProperty(PropertyNode node) {
// GRECLIPSE add
getProperties().add(node);
// GRECLIPSE end
node.setDeclaringClass(redirect());
FieldNode field = node.getField();
addField(field);
/* GRECLIPSE edit
final ClassNode r = redirect();
if (r.properties == null)
r.properties = new ArrayList<PropertyNode>();
r.properties.add(node);
*/
}

public PropertyNode addProperty(String name,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.codehaus.groovy.ast.expr;

import org.codehaus.groovy.ast.Parameter;
import org.codehaus.groovy.ast.stmt.Statement;

public class LambdaExpression extends ClosureExpression {

public LambdaExpression(Parameter[] args, Statement code) {
super(args, code);
}

}
25 changes: 25 additions & 0 deletions base/org.codehaus.groovy26/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>

<classpath>
<classpathentry kind="src" path="src" output="bin" />
<classpathentry kind="src" path="src-trace" output="bin-trace" />

<classpathentry kind="lib" path="lib/ivy-2.4.0.jar" sourcepath="lib/ivy-2.4.0-sources.jar" exported="true">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/org.codehaus.groovy26/lib/ivy-2.4.0-javadoc.jar!/" />
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/groovy-2.6.0-indy.jar" sourcepath="lib/groovy-2.6.0-sources.jar" exported="true">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/org.codehaus.groovy26/lib/groovy-2.6.0-javadoc.jar!/" />
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/groovy-test-2.6.0-indy.jar" sourcepath="lib/groovy-test-2.6.0-sources.jar" exported="true">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/org.codehaus.groovy26/lib/groovy-test-2.6.0-javadoc.jar!/" />
</attributes>
</classpathentry>

<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins" />
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7" />
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" standalone="no"?>

<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean," />
<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true" />
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false" />
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;resources&gt;&lt;item path=&quot;/org.codehaus.groovy26&quot; type=&quot;4&quot;/&gt;&lt;/resources&gt;}" />
<booleanAttribute key="org.eclipse.debug.core.capture_output" value="false" />
<booleanAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON" value="false" />
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false" />
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider" />
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true" />
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="" />
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;resources&gt;&lt;item path=&quot;/org.codehaus.groovy26/src/org/codehaus/groovy/antlr/groovy.g&quot; type=&quot;1&quot;/&gt;&lt;/resources&gt;}" />
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${build_project:build.antlr2x}" />
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="incremental,auto,clean" />
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true" />
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${build_project:src/org/codehaus/groovy/antlr}" />
</launchConfiguration>
4 changes: 4 additions & 0 deletions base/org.codehaus.groovy26/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/bin
/bin-trace
/eclipse-trace.jar
/groovy-eclipse.jar
35 changes: 35 additions & 0 deletions base/org.codehaus.groovy26/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>

<projectDescription>
<name>org.codehaus.groovy26</name>
<buildSpec>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>auto,full,incremental,clean,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/Ant Builder.launch</value>
</dictionary>
<dictionary>
<key>incclean</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
line.separator=\n
93 changes: 93 additions & 0 deletions base/org.codehaus.groovy26/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=disabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=ignore
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=ignore
org.eclipse.jdt.core.compiler.problem.unusedLabel=ignore
org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=4
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
groovy.compiler.level=24
Loading