mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SortContentAction: consistent count of expr to be available: IDEA-185785
This commit is contained in:
@@ -234,7 +234,7 @@ public class SortContentAction extends PsiElementBaseIntentionAction {
|
||||
PsiMethodCallExpression call = PsiTreeUtil.getParentOfType(list, PsiMethodCallExpression.class);
|
||||
if (call == null) return null;
|
||||
PsiExpression[] arguments = call.getArgumentList().getExpressions();
|
||||
if (arguments.length < MIN_EXPRESSION_COUNT + 1) return null;
|
||||
if (arguments.length < MIN_EXPRESSION_COUNT) return null;
|
||||
PsiMethod method = tryCast(call.getMethodExpression().resolve(), PsiMethod.class);
|
||||
if (method == null) return null;
|
||||
PsiParameterList parameterList = method.getParameterList();
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Sort content" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
private static void foo(int... vararg) {}
|
||||
|
||||
private void test() {
|
||||
foo(1, 3, 4);
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Sort content" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
private static void foo(int... vararg) {}
|
||||
|
||||
private void test() {
|
||||
foo(1, <caret>4, 3);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user