Removed redundant parameter.
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ public class IDELightClassGenerationSupport extends LightClassGenerationSupport
|
||||
@NotNull
|
||||
@Override
|
||||
public LightClassConstructionContext analyzeRelevantCode(@NotNull Collection<JetFile> files) {
|
||||
KotlinDeclarationsCache cache = KotlinCacheManager.getInstance(project).getDeclarationsFromProject(project);
|
||||
KotlinDeclarationsCache cache = KotlinCacheManager.getInstance(project).getDeclarationsFromProject();
|
||||
return new LightClassConstructionContext(cache.getBindingContext(), null);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class KotlinCacheManager {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public KotlinDeclarationsCache getDeclarationsFromProject(@NotNull Project project) {
|
||||
public KotlinDeclarationsCache getDeclarationsFromProject() {
|
||||
// To prevent dead locks, the lock below must be obtained only inside a read action
|
||||
ApplicationManager.getApplication().assertReadAccessAllowed();
|
||||
synchronized (declarationAnalysisLock) {
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ public class KotlinSignatureInJavaMarkerProvider implements LineMarkerProvider {
|
||||
return;
|
||||
}
|
||||
|
||||
KotlinDeclarationsCache declarationsCache = KotlinCacheManager.getInstance(project).getDeclarationsFromProject(project);
|
||||
KotlinDeclarationsCache declarationsCache = KotlinCacheManager.getInstance(project).getDeclarationsFromProject();
|
||||
BindingContext bindingContext = declarationsCache.getBindingContext();
|
||||
DelegatingBindingTrace bindingTrace = new DelegatingBindingTrace(bindingContext, "wrapped context of declarations cache");
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class FinalSupertypeFix extends JetIntentionAction<JetClass> {
|
||||
return false;
|
||||
}
|
||||
|
||||
BindingContext context = KotlinCacheManager.getInstance(project).getDeclarationsFromProject(project).getBindingContext();
|
||||
BindingContext context = KotlinCacheManager.getInstance(project).getDeclarationsFromProject().getBindingContext();
|
||||
ClassDescriptor childClassDescriptor = context.get(BindingContext.CLASS, childClass);
|
||||
if (childClassDescriptor == null) {
|
||||
return false;
|
||||
|
||||
@@ -53,7 +53,7 @@ public class MakeClassAnAnnotationClassFix extends JetIntentionAction<JetAnnotat
|
||||
return false;
|
||||
}
|
||||
|
||||
BindingContext context = KotlinCacheManager.getInstance(project).getDeclarationsFromProject(project).getBindingContext();
|
||||
BindingContext context = KotlinCacheManager.getInstance(project).getDeclarationsFromProject().getBindingContext();
|
||||
AnnotationDescriptor annotationDescriptor = context.get(BindingContext.ANNOTATION, annotationEntry);
|
||||
if (annotationDescriptor == null) {
|
||||
return false;
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class RenameParameterToMatchOverriddenMethodFix extends JetIntentionActio
|
||||
return false;
|
||||
}
|
||||
|
||||
BindingContext context = KotlinCacheManager.getInstance(project).getDeclarationsFromProject(project).getBindingContext();
|
||||
BindingContext context = KotlinCacheManager.getInstance(project).getDeclarationsFromProject().getBindingContext();
|
||||
VariableDescriptor parameterDescriptor = context.get(BindingContext.VALUE_PARAMETER, parameter);
|
||||
if (parameterDescriptor == null) {
|
||||
return false;
|
||||
|
||||
@@ -75,7 +75,7 @@ public class KotlinAnnotatedElementsSearcher extends AnnotatedElementsSearcher {
|
||||
public void run() {
|
||||
//TODO LazyResolve
|
||||
Project project = elt.getProject();
|
||||
KotlinDeclarationsCache declarations = KotlinCacheManager.getInstance(project).getDeclarationsFromProject(project);
|
||||
KotlinDeclarationsCache declarations = KotlinCacheManager.getInstance(project).getDeclarationsFromProject();
|
||||
BindingContext context = declarations.getBindingContext();
|
||||
|
||||
JetDeclaration parentOfType = PsiTreeUtil.getParentOfType(elt, JetDeclaration.class);
|
||||
|
||||
Reference in New Issue
Block a user