Skip to content
Browse files

More work on compiler switching

Ensure that the switching UI shows the 2.1 compiler.
  • Loading branch information...
1 parent 2677643 commit eac78d5d3a6438424e6fc17d7a420f237a536075 @aeisenberg aeisenberg committed Feb 5, 2013
View
2 ...dehaus.groovy.frameworkadapter/src/org/codehaus/groovy/frameworkadapter/CompilerHook.java
@@ -77,7 +77,7 @@ public void frameworkStart(BundleContext context) throws BundleException {
return;
}
- System.out.println("Starting Groovy-Eclipse compiler hook. Specified compiler level: " + version);
+ System.out.println("Starting Groovy-Eclipse compiler hook. Specified compiler level: " + version.toReadableVersionString());
// ServiceReference is parameterized in 3.7, not 3.6
@SuppressWarnings("rawtypes")
View
2 ...oovy.frameworkadapter/src/org/codehaus/groovy/frameworkadapter/util/SpecifiedVersion.java
@@ -38,7 +38,7 @@ public String toVersionString() {
}
public String toReadableVersionString() {
- return majorVersion + "." + minorVersion + ".X";
+ return majorVersion + "." + minorVersion;
}
View
12 ...groovy.eclipse.ui/src/org/codehaus/groovy/eclipse/preferences/CompilerSwitchUIHelper.java
@@ -92,14 +92,10 @@ public static Composite createCompilerSwitchBlock(Composite parent) {
Label compilerVersion = new Label(compilerPage, SWT.LEFT | SWT.WRAP);
compilerVersion.setText("You are currently using Groovy Compiler version " + CompilerUtils.getGroovyVersion() + ".");
- if (activeGroovyVersion != SpecifiedVersion._17) {
- switchVersion(SpecifiedVersion._17, compilerPage);
- }
- if (activeGroovyVersion != SpecifiedVersion._18) {
- switchVersion(SpecifiedVersion._18, compilerPage);
- }
- if (activeGroovyVersion != SpecifiedVersion._20) {
- switchVersion(SpecifiedVersion._20, compilerPage);
+ for (SpecifiedVersion version : SpecifiedVersion.values()) {
+ if (activeGroovyVersion != version) {
+ switchVersion(version, compilerPage);
+ }
}
Link moreInfoLink = new Link(compilerPage, 0);

0 comments on commit eac78d5

Please sign in to comment.
Something went wrong with that request. Please try again.