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