mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-60932 - better context for availability check
This commit is contained in:
+2
-3
@@ -336,9 +336,8 @@ public class GroovyCodeFragmentFactory extends CodeFragmentFactory {
|
||||
if (context.getLanguage().equals(GroovyLanguage.INSTANCE)) {
|
||||
return true;
|
||||
}
|
||||
Project project = context.getProject();
|
||||
if (JavaPsiFacade.getInstance(project)
|
||||
.findClass("org.codehaus.groovy.control.CompilationUnit", GlobalSearchScope.allScope(project)) != null) {
|
||||
if (JavaPsiFacade.getInstance(context.getProject())
|
||||
.findClass("org.codehaus.groovy.control.CompilationUnit", context.getResolveScope()) != null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user