mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disable split declarations inside lambda code block only; allow inside expression-lambda
IDEA-CR-49008 GitOrigin-RevId: cfb8962f71bd0c2f4870413279495ef4262cd30d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b22d78d95d
commit
6ebf3349dc
+1
-1
@@ -36,7 +36,7 @@ public class SplitDeclarationAction extends PsiElementBaseIntentionAction {
|
||||
if (!element.getLanguage().isKindOf(JavaLanguage.INSTANCE)) return false;
|
||||
|
||||
final PsiDeclarationStatement
|
||||
context = PsiTreeUtil.getParentOfType(element, PsiDeclarationStatement.class, false, PsiClass.class, PsiLambdaExpression.class, PsiSwitchExpression.class);
|
||||
context = PsiTreeUtil.getParentOfType(element, PsiDeclarationStatement.class, false, PsiClass.class, PsiCodeBlock.class);
|
||||
return context != null && isAvailableOnDeclarationStatement(context);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user