Smart completion: refactored all code into a class to avoid passing the same data into many functions

This commit is contained in:
Valentin Kipyatkov
2014-04-15 12:39:22 +04:00
parent 06b1f1ec2f
commit 73329af7b1
2 changed files with 490 additions and 480 deletions
@@ -143,8 +143,8 @@ class CompletionSession {
return isVisibleDescriptor(descriptor);
}
};
Collection<LookupElement> elements = CompletionPackage.buildSmartCompletionData(
jetReference.getExpression(), getResolveSession(), descriptors, visibilityFilter);
SmartCompletion completion = new SmartCompletion(jetReference.getExpression(), getResolveSession(), visibilityFilter);
Collection<LookupElement> elements = completion.buildLookupElements(descriptors);
if (elements != null) {
for (LookupElement element : elements) {
jetResult.addElement(element);
File diff suppressed because it is too large Load Diff