mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[groovy] follow-up
This commit is contained in:
+2
-4
@@ -20,21 +20,19 @@ import com.intellij.psi.*;
|
||||
import com.intellij.psi.impl.light.LightMethodBuilder;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import groovy.beans.Bindable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.plugins.groovy.GroovyLanguage;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrField;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.GrTypeDefinition;
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.ast.AstTransformContributor;
|
||||
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public class BindableTransformContributor extends AstTransformContributor {
|
||||
|
||||
private static final String BINDABLE_FQN = Bindable.class.getName();
|
||||
private static final String PCL_FQN = PropertyChangeListener.class.getName();
|
||||
private static final String BINDABLE_FQN = "groovy.beans.Bindable";
|
||||
private static final String PCL_FQN = "java.beans.PropertyChangeListener";
|
||||
public static final String ORIGIN_INFO = "via @Bindable";
|
||||
|
||||
private static boolean isApplicable(@NotNull GrTypeDefinition clazz) {
|
||||
|
||||
@@ -30,16 +30,19 @@ class SetupRule implements TestRule {
|
||||
|
||||
@Override
|
||||
Statement apply(Statement base, Description description) {
|
||||
return {
|
||||
testCase.setUp()
|
||||
try {
|
||||
EdtTestUtil.runInEdtAndWait {
|
||||
base.evaluate()
|
||||
new Statement() {
|
||||
@Override
|
||||
void evaluate() throws Throwable {
|
||||
testCase.setUp()
|
||||
try {
|
||||
EdtTestUtil.runInEdtAndWait {
|
||||
base.evaluate()
|
||||
}
|
||||
}
|
||||
finally {
|
||||
testCase.tearDown()
|
||||
}
|
||||
}
|
||||
finally {
|
||||
testCase.tearDown()
|
||||
}
|
||||
} as Statement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user