Changes on code review

This commit is contained in:
Valentin Kipyatkov
2015-08-25 18:52:09 +03:00
parent 92f5ec2ce5
commit 0883bfa615
3 changed files with 3 additions and 5 deletions
@@ -18,7 +18,6 @@ package org.jetbrains.kotlin.idea.completion
import com.intellij.codeInsight.completion.*
import com.intellij.codeInsight.completion.impl.CamelHumpMatcher
import com.intellij.codeInsight.lookup.LookupElementDecorator
import com.intellij.openapi.project.Project
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.patterns.ElementPattern
@@ -259,6 +258,7 @@ abstract class CompletionSession(protected val configuration: CompletionSessionC
var context = expectedInfos
.map { it.fuzzyType?.type?.constructor?.declarationDescriptor?.importableFqName }
.filterNotNull()
.distinct()
.singleOrNull()
?.let { "expectedType=$it" }
@@ -266,6 +266,7 @@ abstract class CompletionSession(protected val configuration: CompletionSessionC
context = expectedInfos
.map { it.expectedName }
.filterNotNull()
.distinct()
.singleOrNull()
?.let { "expectedName=$it" }
}
@@ -22,7 +22,6 @@ import com.intellij.codeInsight.lookup.LookupEvent
import com.intellij.codeInsight.lookup.LookupManager
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.components.AbstractProjectComponent
import com.intellij.openapi.components.ServiceManager
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.editor.EditorFactory
import com.intellij.openapi.editor.RangeMarker
@@ -69,7 +68,7 @@ class LookupCancelWatcher(project: Project) : AbstractProjectComponent(project)
companion object {
fun getInstance(project: Project): LookupCancelWatcher = project.getComponent(javaClass<LookupCancelWatcher>())!!
val AUTO_POPUP_AT = Key<Int>("LookupCancelWatcher.DO_NOT_REPEAT_AUTO_POPUP_AT")
val AUTO_POPUP_AT = Key<Int>("LookupCancelWatcher.AUTO_POPUP_AT")
}
fun wasAutoPopupRecentlyCancelled(editor: Editor, offset: Int): Boolean {
@@ -6,5 +6,3 @@ enum class EnumTest(val i: Int = 0) {
}
class EAnotherClass
// ALLOW_AST_ACCESS