support @PostConstruct in our magnificent injector
This commit is contained in:
@@ -74,6 +74,8 @@ public class InjectorForJavaSemanticServices {
|
||||
namespaceFactoryImpl.setModuleDescriptor(moduleDescriptor);
|
||||
namespaceFactoryImpl.setTrace(bindingTrace);
|
||||
|
||||
psiClassFinderForJvm.initialize();
|
||||
|
||||
}
|
||||
|
||||
public JavaSemanticServices getJavaSemanticServices() {
|
||||
|
||||
@@ -204,6 +204,8 @@ public class InjectorForTopDownAnalyzerForJvm {
|
||||
javaTypeTransformer.setJavaSemanticServices(javaSemanticServices);
|
||||
javaTypeTransformer.setResolver(javaDescriptorResolver);
|
||||
|
||||
psiClassFinderForJvm.initialize();
|
||||
|
||||
}
|
||||
|
||||
public TopDownAnalyzer getTopDownAnalyzer() {
|
||||
|
||||
+5
-2
@@ -31,6 +31,7 @@ import org.jetbrains.jet.lang.resolve.FqName;
|
||||
import org.jetbrains.jet.lang.resolve.java.alt.AltClassFinder;
|
||||
import org.jetbrains.jet.plugin.JetFileType;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.inject.Inject;
|
||||
|
||||
/**
|
||||
@@ -46,6 +47,10 @@ public class PsiClassFinderForJvm implements PsiClassFinder {
|
||||
@Inject
|
||||
public void setProject(Project project) {
|
||||
this.project = project;
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void initialize() {
|
||||
this.altClassFinder = new AltClassFinder(project);
|
||||
this.javaSearchScope = new DelegatingGlobalSearchScope(GlobalSearchScope.allScope(project)) {
|
||||
@Override
|
||||
@@ -57,8 +62,6 @@ public class PsiClassFinderForJvm implements PsiClassFinder {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public PsiClass findPsiClass(@NotNull FqName qualifiedName) {
|
||||
|
||||
Reference in New Issue
Block a user