Cleanup
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ public class KotlinLightClassForPackage extends KotlinLightClassForPackageBase i
|
|||||||
private final FqName fqName;
|
private final FqName fqName;
|
||||||
private final Collection<JetFile> files;
|
private final Collection<JetFile> files;
|
||||||
private final int hashCode;
|
private final int hashCode;
|
||||||
private CachedValue<PsiClass> delegate;
|
private final CachedValue<PsiClass> delegate;
|
||||||
|
|
||||||
public KotlinLightClassForPackage(@NotNull PsiManager manager, @NotNull FqName fqName, @NotNull Collection<JetFile> files) {
|
public KotlinLightClassForPackage(@NotNull PsiManager manager, @NotNull FqName fqName, @NotNull Collection<JetFile> files) {
|
||||||
super(manager);
|
super(manager);
|
||||||
|
|||||||
+3
-5
@@ -53,18 +53,16 @@ public class KotlinLightClassForPackageProvider implements CachedValueProvider<P
|
|||||||
this.project = project;
|
this.project = project;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public Result<PsiClass> compute() {
|
public Result<PsiClass> compute() {
|
||||||
checkForBuiltIns();
|
checkForBuiltIns();
|
||||||
|
|
||||||
final PsiJavaFileStubImpl javaFileStub = new PsiJavaFileStubImpl(fqName.getFqName(), true);
|
PsiJavaFileStubImpl javaFileStub = new PsiJavaFileStubImpl(fqName.getFqName(), true);
|
||||||
|
|
||||||
final Stack<StubElement> stubStack = new Stack<StubElement>();
|
Stack<StubElement> stubStack = new Stack<StubElement>();
|
||||||
|
|
||||||
final ClassBuilderFactory builderFactory = new KotlinLightClassBuilderFactory(stubStack);
|
ClassBuilderFactory builderFactory = new KotlinLightClassBuilderFactory(stubStack);
|
||||||
|
|
||||||
// The context must reflect _all files in the module_. not only the current file
|
// The context must reflect _all files in the module_. not only the current file
|
||||||
// Otherwise, the analyzer gets confused and can't, for example, tell which files come as sources and which
|
// Otherwise, the analyzer gets confused and can't, for example, tell which files come as sources and which
|
||||||
|
|||||||
+5
-1
@@ -43,7 +43,11 @@ class LightClassGenerationStrategy implements GenerationStrategy {
|
|||||||
private final PsiJavaFileStubImpl answer;
|
private final PsiJavaFileStubImpl answer;
|
||||||
private final VirtualFile virtualFile;
|
private final VirtualFile virtualFile;
|
||||||
|
|
||||||
public LightClassGenerationStrategy(@NotNull VirtualFile virtualFile, Stack<StubElement> stubStack, PsiJavaFileStubImpl answer) {
|
public LightClassGenerationStrategy(
|
||||||
|
@NotNull VirtualFile virtualFile,
|
||||||
|
@NotNull Stack<StubElement> stubStack,
|
||||||
|
@NotNull PsiJavaFileStubImpl answer
|
||||||
|
) {
|
||||||
this.virtualFile = virtualFile;
|
this.virtualFile = virtualFile;
|
||||||
this.stubStack = stubStack;
|
this.stubStack = stubStack;
|
||||||
this.answer = answer;
|
this.answer = answer;
|
||||||
|
|||||||
Reference in New Issue
Block a user