IDEA-104408 groovy-all has different CommandLineParser

This commit is contained in:
Max Medvedev
2013-04-11 15:03:53 +04:00
parent 7619b3423d
commit 2da70fbc6e
2 changed files with 6 additions and 2 deletions
@@ -81,6 +81,9 @@ public abstract class GroovyConfigUtils extends AbstractConfigUtils {
if (groovyJarVersion == null) {
groovyJarVersion = getSDKJarVersion(path + "/embeddable", GROOVY_ALL_JAR_PATTERN, MANIFEST_PATH);
}
if (groovyJarVersion == null) {
groovyJarVersion = getSDKJarVersion(path, GROOVY_ALL_JAR_PATTERN, MANIFEST_PATH);
}
return groovyJarVersion == null ? UNDEFINED_VERSION : groovyJarVersion;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -82,7 +82,8 @@ public class DefaultGroovyShellRunner extends GroovyShellRunner {
private static boolean hasGroovyAll(Module module) {
GlobalSearchScope scope = GlobalSearchScope.moduleWithDependenciesAndLibrariesScope(module);
JavaPsiFacade facade = JavaPsiFacade.getInstance(module.getProject());
return facade.findClass("org.apache.commons.cli.CommandLineParser", scope) != null &&
return (facade.findClass("org.apache.commons.cli.CommandLineParser", scope) != null ||
facade.findClass("groovyjarjarcommonscli.CommandLineParser", scope) != null) &&
facade.findClass("groovy.ui.GroovyMain", scope) != null;
}