Allow moving out to arbitrary blocks and moving any declaration into class body
This commit is contained in:
@@ -809,6 +809,12 @@ public class JetPsiUtil {
|
||||
return first ? results.get(0) : results.get(results.size() - 1);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static PsiElement findChildByType(@NotNull PsiElement element, @NotNull IElementType type) {
|
||||
ASTNode node = element.getNode().findChildByType(type);
|
||||
return node == null ? null : node.getPsi();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static JetExpression getCalleeExpressionIfAny(@NotNull JetExpression expression) {
|
||||
if (expression instanceof JetCallElement) {
|
||||
|
||||
Reference in New Issue
Block a user