Removed redundant parameter.

This commit is contained in:
Evgeny Gerashchenko
2013-02-15 21:03:49 +04:00
parent 8d101ad5fa
commit eb20fb8b39
7 changed files with 7 additions and 7 deletions
@@ -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) {
@@ -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;
@@ -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);