KT-17970 Intention actions to format parameter/argument list placing each on separate line

#KT-17970 Fixed
This commit is contained in:
Valentin Kipyatkov
2017-04-04 17:10:54 +03:00
parent 47fec6c9d5
commit 92a763552c
28 changed files with 293 additions and 0 deletions
@@ -20,6 +20,7 @@ import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.lexer.KtTokens;
import org.jetbrains.kotlin.psi.stubs.KotlinPlaceHolderStub;
import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes;
@@ -78,4 +79,14 @@ public class KtParameterList extends KtElementImplStub<KotlinPlaceHolderStub<KtP
if (!(parent instanceof KtFunction)) return null;
return (KtFunction) parent;
}
@Nullable
public PsiElement getRightParenthesis() {
return findChildByType(KtTokens.RPAR);
}
@Nullable
public PsiElement getLeftParenthesis() {
return findChildByType(KtTokens.LPAR);
}
}