mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
support separate-jar grails in classpath (e.g. imported from eclipse)
This commit is contained in:
@@ -139,11 +139,6 @@ public abstract class AbstractConfigUtils {
|
||||
|
||||
public abstract boolean isSDKLibrary(Library library);
|
||||
|
||||
@NotNull
|
||||
public String getSDKLibVersion(Library library) {
|
||||
return getSDKVersion(LibrariesUtil.getGroovyLibraryHome(library));
|
||||
}
|
||||
|
||||
public Library[] getSDKLibrariesByModule(final Module module) {
|
||||
final Condition<Library> condition = new Condition<Library>() {
|
||||
public boolean value(Library library) {
|
||||
@@ -153,15 +148,5 @@ public abstract class AbstractConfigUtils {
|
||||
return LibrariesUtil.getLibrariesByCondition(module, condition);
|
||||
}
|
||||
|
||||
public Collection<String> getSDKVersions(final Project project) {
|
||||
return ContainerUtil.map2List(getAllSDKLibraries(project), new Function<Library, String>() {
|
||||
public String fun(Library library) {
|
||||
return getSDKLibVersion(library);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public abstract String getSDKInstallPath(Module module);
|
||||
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@ import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -37,6 +39,8 @@ import org.jetbrains.plugins.groovy.GroovyIcons;
|
||||
import org.jetbrains.plugins.groovy.util.GroovyUtils;
|
||||
import org.jetbrains.plugins.groovy.util.LibrariesUtil;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* @author ilyas
|
||||
*/
|
||||
@@ -174,4 +178,17 @@ public abstract class GroovyConfigUtils extends AbstractConfigUtils {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getSDKLibVersion(Library library) {
|
||||
return getSDKVersion(LibrariesUtil.getGroovyLibraryHome(library));
|
||||
}
|
||||
|
||||
public Collection<String> getSDKVersions(final Project project) {
|
||||
return ContainerUtil.map2List(getAllSDKLibraries(project), new Function<Library, String>() {
|
||||
public String fun(Library library) {
|
||||
return getSDKLibVersion(library);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user