diff --git a/annotations/com/intellij/codeInsight/editorActions/annotations.xml b/annotations/com/intellij/codeInsight/editorActions/annotations.xml
index 70bff5ebfbb..59fe9e5fcd9 100644
--- a/annotations/com/intellij/codeInsight/editorActions/annotations.xml
+++ b/annotations/com/intellij/codeInsight/editorActions/annotations.xml
@@ -173,10 +173,9 @@
-
-
+ val=""fun select(e: PsiElement, editorText: CharSequence, cursorOffset: Int, editor: Editor): List<TextRange>?""/>
-
-
-
+ val=""fun select(e: PsiElement, editorText: CharSequence, cursorOffset: Int, editor: Editor): List<TextRange>?""/>
- {
+ override fun select(e: PsiElement, editorText: CharSequence, cursorOffset: Int, editor: Editor): List? {
val result = ArrayList()
val node = e.getNode()!!
diff --git a/idea/src/org/jetbrains/jet/plugin/editor/wordSelection/JetListSelectioner.kt b/idea/src/org/jetbrains/jet/plugin/editor/wordSelection/JetListSelectioner.kt
index 230003ab596..2e8ba072ee2 100644
--- a/idea/src/org/jetbrains/jet/plugin/editor/wordSelection/JetListSelectioner.kt
+++ b/idea/src/org/jetbrains/jet/plugin/editor/wordSelection/JetListSelectioner.kt
@@ -34,10 +34,10 @@ public class JetListSelectioner : BasicSelectioner() {
override fun canSelect(e: PsiElement)
= e is JetParameterList || e is JetValueArgumentList || e is JetTypeParameterList || e is JetTypeArgumentList
- override fun select(e: PsiElement, editorText: CharSequence, cursorOffset: Int, editor: Editor): List {
+ override fun select(e: PsiElement, editorText: CharSequence, cursorOffset: Int, editor: Editor): List? {
val node = e.getNode()!!
- val startNode = node.findChildByType(TokenSet.create(JetTokens.LPAR, JetTokens.LT)) ?: return listOf()
- val endNode = node.findChildByType(TokenSet.create(JetTokens.RPAR, JetTokens.GT)) ?: return listOf()
+ val startNode = node.findChildByType(TokenSet.create(JetTokens.LPAR, JetTokens.LT)) ?: return null
+ val endNode = node.findChildByType(TokenSet.create(JetTokens.RPAR, JetTokens.GT)) ?: return null
return listOf(TextRange(startNode.getStartOffset() + 1, endNode.getStartOffset()))
}
}
diff --git a/idea/src/org/jetbrains/jet/plugin/editor/wordSelection/JetStatementGroupSelectioner.kt b/idea/src/org/jetbrains/jet/plugin/editor/wordSelection/JetStatementGroupSelectioner.kt
index 963b7dbd61d..e49e19b0a0e 100644
--- a/idea/src/org/jetbrains/jet/plugin/editor/wordSelection/JetStatementGroupSelectioner.kt
+++ b/idea/src/org/jetbrains/jet/plugin/editor/wordSelection/JetStatementGroupSelectioner.kt
@@ -39,9 +39,9 @@ public class JetStatementGroupSelectioner : BasicSelectioner() {
override fun canSelect(e: PsiElement)
= e is JetExpression || e is JetWhenEntry
- override fun select(e: PsiElement, editorText: CharSequence, cursorOffset: Int, editor: Editor): List {
+ override fun select(e: PsiElement, editorText: CharSequence, cursorOffset: Int, editor: Editor): List? {
val parent = e.getParent()
- if (parent !is JetBlockExpression && parent !is JetWhenExpression) return listOf()
+ if (parent !is JetBlockExpression && parent !is JetWhenExpression) return null
val startElement = e.siblings(forward = false, withItself = false)
.firstOrNull { // find preceding '{' or blank line