mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] move statements: take care of error elements
^KTIJ-31312 fixed GitOrigin-RevId: 1de2219e328f0c7ac38816a1f468556a061cd932
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d67c2fc0a3
commit
5d2db4e7e8
+4
@@ -504,6 +504,10 @@ class KotlinExpressionMover : AbstractKotlinUpDownMover() {
|
||||
return element
|
||||
}
|
||||
|
||||
if (element is PsiErrorElement) {
|
||||
return element
|
||||
}
|
||||
|
||||
if (getParentFileAnnotationEntry(element) != null) return null
|
||||
|
||||
val movableElement = element.getParentOfTypesAndPredicate(
|
||||
|
||||
+5
@@ -1385,6 +1385,11 @@ public abstract class KotlinFirMoveStatementTestGenerated extends AbstractKotlin
|
||||
KotlinTestUtils.runTest(this::doTestLine, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("additionalClosingBrace.kt")
|
||||
public void testAdditionalClosingBrace() throws Exception {
|
||||
runTest("../../idea/tests/testData/codeInsight/moveUpDown/line/additionalClosingBrace.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("fileAnnotation.kt")
|
||||
public void testFileAnnotation() throws Exception {
|
||||
runTest("../../idea/tests/testData/codeInsight/moveUpDown/line/fileAnnotation.kt");
|
||||
|
||||
+5
@@ -1385,6 +1385,11 @@ public abstract class MoveStatementTestGenerated extends AbstractMoveStatementTe
|
||||
KotlinTestUtils.runTest(this::doTestLine, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("additionalClosingBrace.kt")
|
||||
public void testAdditionalClosingBrace() throws Exception {
|
||||
runTest("testData/codeInsight/moveUpDown/line/additionalClosingBrace.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("fileAnnotation.kt")
|
||||
public void testFileAnnotation() throws Exception {
|
||||
runTest("testData/codeInsight/moveUpDown/line/fileAnnotation.kt");
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// MOVE: up
|
||||
fun dispose(editor: Editor) {
|
||||
val disposable = editor.getUserData(AIDiffKeys.AI_DIFF_VIEWER) as AIInEditorDiffViewer?
|
||||
if (disposable != null) {
|
||||
|
||||
}
|
||||
Disposer.dispose(disposable))<caret>
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// MOVE: up
|
||||
fun dispose(editor: Editor) {
|
||||
val disposable = editor.getUserData(AIDiffKeys.AI_DIFF_VIEWER) as AIInEditorDiffViewer?
|
||||
if (disposable != null) {
|
||||
|
||||
Disposer.dispose(disposable))<selection><caret></selection>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user