Remove unnecessary intermediate class
This commit is contained in:
@@ -24,6 +24,7 @@ import com.intellij.psi.search.DelegatingGlobalSearchScope;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.idea.JetFileType;
|
||||
import org.jetbrains.kotlin.load.java.structure.JavaClass;
|
||||
import org.jetbrains.kotlin.load.java.structure.JavaPackage;
|
||||
import org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl;
|
||||
@@ -31,9 +32,8 @@ import org.jetbrains.kotlin.load.java.structure.impl.JavaPackageImpl;
|
||||
import org.jetbrains.kotlin.name.ClassId;
|
||||
import org.jetbrains.kotlin.name.FqName;
|
||||
import org.jetbrains.kotlin.name.FqNameUnsafe;
|
||||
import org.jetbrains.kotlin.idea.JetFileType;
|
||||
import org.jetbrains.kotlin.resolve.jvm.JavaClassFinderPostConstruct;
|
||||
import org.jetbrains.kotlin.resolve.jvm.KotlinJavaPsiFacade;
|
||||
import org.jetbrains.kotlin.resolve.jvm.JavaPsiFacadeImpl;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.inject.Inject;
|
||||
@@ -43,7 +43,7 @@ public class JavaClassFinderImpl implements JavaClassFinder {
|
||||
private GlobalSearchScope baseScope;
|
||||
|
||||
private GlobalSearchScope javaSearchScope;
|
||||
private KotlinJavaPsiFacade javaFacade;
|
||||
private JavaPsiFacadeImpl javaFacade;
|
||||
|
||||
@Inject
|
||||
public void setProject(@NotNull Project project) {
|
||||
@@ -75,7 +75,7 @@ public class JavaClassFinderImpl implements JavaClassFinder {
|
||||
return project;
|
||||
}
|
||||
};
|
||||
javaFacade = new KotlinJavaPsiFacade(project, javaSearchScope);
|
||||
javaFacade = new JavaPsiFacadeImpl(project, javaSearchScope);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.resolve.jvm;
|
||||
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiPackage;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class KotlinJavaPsiFacade {
|
||||
private final JavaPsiFacadeImpl javaPsiFacadeWrapper;
|
||||
|
||||
public KotlinJavaPsiFacade(Project project, GlobalSearchScope searchScope) {
|
||||
javaPsiFacadeWrapper = new JavaPsiFacadeImpl(project, searchScope);
|
||||
}
|
||||
|
||||
public PsiClass findClass(@NotNull String qualifiedName, @NotNull GlobalSearchScope scope) {
|
||||
return javaPsiFacadeWrapper.findClass(qualifiedName, scope);
|
||||
}
|
||||
|
||||
public PsiPackage findPackage(@NotNull String qualifiedName) {
|
||||
return javaPsiFacadeWrapper.findPackage(qualifiedName);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user