Auto-popup completion remebers cancellation for parameter name/type completion only

This commit is contained in:
Valentin Kipyatkov
2015-09-03 16:32:35 +03:00
parent 997aef8fee
commit 6dca9a4558
@@ -165,14 +165,14 @@ class BasicCompletionSession(configuration: CompletionSessionConfiguration,
}
public fun shouldDisableAutoPopup(): Boolean {
if (LookupCancelWatcher.getInstance(project).wasAutoPopupRecentlyCancelled(parameters.editor, position.startOffset)) {
return true
}
if (completionKind == CompletionKind.PARAMETER_NAME || completionKind == CompletionKind.ANNOTATION_TYPES_OR_PARAMETER_NAME) {
if (!shouldCompleteParameterNameAndType() || TemplateManager.getInstance(project).getActiveTemplate(parameters.editor) != null) {
return true
}
if (LookupCancelWatcher.getInstance(project).wasAutoPopupRecentlyCancelled(parameters.editor, position.startOffset)) {
return true
}
}
return false