diff --git a/idea/src/org/jetbrains/jet/plugin/codeInsight/upDownMover/AbstractJetUpDownMover.java b/idea/src/org/jetbrains/jet/plugin/codeInsight/upDownMover/AbstractJetUpDownMover.java index 19485e963e6..f5f723eee3d 100644 --- a/idea/src/org/jetbrains/jet/plugin/codeInsight/upDownMover/AbstractJetUpDownMover.java +++ b/idea/src/org/jetbrains/jet/plugin/codeInsight/upDownMover/AbstractJetUpDownMover.java @@ -21,20 +21,30 @@ public abstract class AbstractJetUpDownMover extends LineMover { } protected abstract boolean checkSourceElement(@NotNull PsiElement element); - protected abstract LineRange getElementSourceLineRange(@NotNull PsiElement element, @NotNull Editor editor, @NotNull LineRange oldRange); + + protected abstract LineRange getElementSourceLineRange( + @NotNull PsiElement element, + @NotNull Editor editor, + @NotNull LineRange oldRange + ); + + protected PsiElement adjustElement(PsiElement element, Editor editor, boolean first) { + return element; + } + + protected final Pair adjustElementRange(Pair elementRange, Editor editor) { + PsiElement first = adjustElement(elementRange.first, editor, true); + PsiElement second = adjustElement(elementRange.second, editor, false); + return new Pair(first, second); + } @Nullable - protected LineRange getSourceRange(@NotNull PsiElement firstElement, @NotNull PsiElement lastElement, @NotNull Editor editor, LineRange oldRange) { - if (firstElement == lastElement) { - LineRange sourceRange = getElementSourceLineRange(firstElement, editor, oldRange); - - if (sourceRange != null) { - sourceRange.firstElement = sourceRange.lastElement = firstElement; - } - - return sourceRange; - } - + protected LineRange getSourceRange( + @NotNull PsiElement firstElement, + @NotNull PsiElement lastElement, + @NotNull Editor editor, + LineRange oldRange + ) { PsiElement parent = PsiTreeUtil.findCommonParent(firstElement, lastElement); int topExtension = 0; @@ -50,7 +60,8 @@ public abstract class AbstractJetUpDownMover extends LineMover { comment = lastElement; extendDown = true; lastElement = block.getLastChild(); - } else if (checkCommentAtBlockBound(lastElement, firstElement, block)) { + } + else if (checkCommentAtBlockBound(lastElement, firstElement, block)) { comment = firstElement; firstElement = block.getFirstChild(); } @@ -72,11 +83,12 @@ public abstract class AbstractJetUpDownMover extends LineMover { if (parent == null) return null; - Pair combinedRange = getElementRange(parent, firstElement, lastElement); + Pair originalRange = getElementRange(parent, firstElement, lastElement); + Pair combinedRange = adjustElementRange(originalRange, editor); if (combinedRange == null - || !checkSourceElement(combinedRange.first) - || !checkSourceElement(combinedRange.second)) { + || !checkSourceElement(originalRange.first) + || !checkSourceElement(originalRange.second)) { return null; } @@ -89,9 +101,14 @@ public abstract class AbstractJetUpDownMover extends LineMover { LineRange parentLineRange = getElementSourceLineRange(parent, editor, oldRange); LineRange sourceRange = new LineRange(lineRange1.startLine - topExtension, lineRange2.endLine + bottomExtension); - if (parentLineRange != null && sourceRange.contains(parentLineRange)) { + + if (parentLineRange != null + && sourceRange.startLine == parentLineRange.startLine + && sourceRange.endLine == parentLineRange.endLine + ) { sourceRange.firstElement = sourceRange.lastElement = parent; - } else { + } + else { sourceRange.firstElement = combinedRange.first; sourceRange.lastElement = combinedRange.second; } diff --git a/idea/src/org/jetbrains/jet/plugin/codeInsight/upDownMover/JetDeclarationMover.java b/idea/src/org/jetbrains/jet/plugin/codeInsight/upDownMover/JetDeclarationMover.java index 7d7a85a5115..dd0a71bf8d9 100644 --- a/idea/src/org/jetbrains/jet/plugin/codeInsight/upDownMover/JetDeclarationMover.java +++ b/idea/src/org/jetbrains/jet/plugin/codeInsight/upDownMover/JetDeclarationMover.java @@ -107,10 +107,12 @@ public class JetDeclarationMover extends AbstractJetUpDownMover { } @Nullable - private static PsiElement skipInsignificantElements(@NotNull PsiElement element, boolean down) { + private static PsiElement skipInsignificantElements(@Nullable PsiElement element, boolean down) { + if (element == null) return null; + PsiElement result = element; - while (result instanceof PsiWhiteSpace || result.getTextLength() == 0) { + while (result instanceof PsiWhiteSpace || result instanceof PsiComment || result.getTextLength() == 0) { result = down ? result.getNextSibling() : result.getPrevSibling(); if (result == null) break; } @@ -120,12 +122,19 @@ public class JetDeclarationMover extends AbstractJetUpDownMover { @Override protected LineRange getElementSourceLineRange(@NotNull PsiElement element, @NotNull Editor editor, @NotNull LineRange oldRange) { - JetDeclaration declaration = (JetDeclaration) element; + PsiElement first; + PsiElement last; - PsiElement first = skipInsignificantElements(declaration.getFirstChild(), true); - PsiElement last = skipInsignificantElements(declaration.getLastChild(), false); + if (element instanceof JetDeclaration) { + first = skipInsignificantElements(element.getFirstChild(), true); + last = skipInsignificantElements(element.getLastChild(), false); + + if (first == null || last == null) return null; + } + else { + first = last = element; + } - if (first == null || last == null) return null; TextRange textRange1 = first.getTextRange(); TextRange textRange2 = last.getTextRange(); @@ -137,21 +146,29 @@ public class JetDeclarationMover extends AbstractJetUpDownMover { int startLine = editor.offsetToLogicalPosition(textRange1.getStartOffset()).line; int endLine = editor.offsetToLogicalPosition(textRange2.getEndOffset()).line + 1; - if (startLine == oldRange.startLine || startLine == oldRange.endLine + if (element instanceof PsiComment + || startLine == oldRange.startLine || startLine == oldRange.endLine || endLine == oldRange.startLine || endLine == oldRange.endLine) { return new LineRange(startLine, endLine); } TextRange lineTextRange = new TextRange(doc.getLineStartOffset(oldRange.startLine), doc.getLineEndOffset(oldRange.endLine)); - for (PsiElement anchor : getDeclarationAnchors(declaration)) { - TextRange suspectTextRange = anchor.getTextRange(); - if (suspectTextRange != null && lineTextRange.intersects(suspectTextRange)) return new LineRange(startLine, endLine); + if (element instanceof JetDeclaration) { + for (PsiElement anchor : getDeclarationAnchors((JetDeclaration) element)) { + TextRange suspectTextRange = anchor.getTextRange(); + if (suspectTextRange != null && lineTextRange.intersects(suspectTextRange)) return new LineRange(startLine, endLine); + } } return null; } + @Override + protected PsiElement adjustElement(PsiElement element, Editor editor, boolean first) { + return first ? getTopmostSiblingCommentOrOriginal(element, editor) : element; + } + @Nullable private static LineRange getTargetRange( @NotNull Editor editor, @@ -164,6 +181,10 @@ public class JetDeclarationMover extends AbstractJetUpDownMover { PsiElement nextParent = null; + if (target instanceof PsiComment) { + target = PsiTreeUtil.getNextSiblingOfType(target, JetDeclaration.class); + } + // moving out of code block if (sibling.getNode().getElementType() == (down ? JetTokens.RBRACE : JetTokens.LBRACE)) { // elements which aren't immediately placed in class body can't leave the block @@ -181,15 +202,24 @@ public class JetDeclarationMover extends AbstractJetUpDownMover { } // moving into code block // element may move only into class body - else if (sibling instanceof JetClassOrObject) { - JetClassOrObject jetClassOrObject = (JetClassOrObject) sibling; - JetClassBody classBody = jetClassOrObject.getBody(); + else { + PsiElement adjustedSibling = sibling; + if (adjustedSibling instanceof PsiComment || isEmptyNamespaceHeader(adjustedSibling)) { + adjustedSibling = PsiTreeUtil.getNextSiblingOfType(adjustedSibling, JetDeclaration.class); + } - // confined elements can't leave their block - if (classBody != null) { - nextParent = classBody; - start = down ? jetClassOrObject : classBody.getRBrace(); - end = down ? classBody.getLBrace() : classBody.getRBrace(); + if (adjustedSibling instanceof JetClassOrObject) { + JetClassOrObject jetClassOrObject = (JetClassOrObject) adjustedSibling; + JetClassBody classBody = jetClassOrObject.getBody(); + + // confined elements can't leave their block + if (classBody != null) { + nextParent = classBody; + if (!down) { + start = classBody.getRBrace(); + } + end = down ? classBody.getLBrace() : classBody.getRBrace(); + } } } @@ -208,16 +238,30 @@ public class JetDeclarationMover extends AbstractJetUpDownMover { if (target instanceof JetPropertyAccessor && !(sibling instanceof JetPropertyAccessor)) return null; - if (start != null && start.getFirstChild() != null) { + if (!down && start instanceof JetDeclaration) { + start = getTopmostSiblingCommentOrOriginal(start, editor); + } + else if (start != null && start.getFirstChild() != null) { start = skipInsignificantElements(start.getFirstChild(), true); } - if (end != null && end.getFirstChild() != null) { + + if (down && end instanceof PsiComment) { + PsiElement nextDeclaration = PsiTreeUtil.getNextSiblingOfType(end, JetDeclaration.class); + if (nextDeclaration != null) { + end = nextDeclaration; + } + } + else if (end != null && end.getFirstChild() != null) { end = skipInsignificantElements(end.getLastChild(), false); } return start != null && end != null ? new LineRange(start, end, editor.getDocument()) : null; } + private static boolean isEmptyNamespaceHeader(PsiElement adjustedSibling) { + return adjustedSibling instanceof JetNamespaceHeader && adjustedSibling.getTextLength() == 0; + } + @Override public boolean checkAvailable(@NotNull Editor editor, @NotNull PsiFile file, @NotNull MoveInfo info, boolean down) { if (!super.checkAvailable(editor, file, info, down)) return false; @@ -249,4 +293,19 @@ public class JetDeclarationMover extends AbstractJetUpDownMover { info.toMove2 = getTargetRange(editor, sibling, down, sourceRange.firstElement); return true; } + + @NotNull + private static PsiElement getTopmostSiblingCommentOrOriginal(@NotNull PsiElement originalElement, @NotNull Editor editor) { + PsiElement element = originalElement; + PsiElement sibling = element.getPrevSibling(); + while (sibling instanceof PsiComment + || (sibling instanceof PsiWhiteSpace && getElementLineCount(sibling, editor) <= 1) + || (sibling != null && (sibling.getText() == null || sibling.getText().isEmpty()))) { + if (sibling instanceof PsiComment) { + element = sibling; + } + sibling = sibling.getPrevSibling(); + } + return element; + } } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace1.kt index f238eae366c..4d31aab64f2 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace1.kt @@ -1,7 +1,10 @@ // MOVE: down +// class A class A { + // val x val x = "" + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace1.kt.after index 9c3c6850e8a..09877092920 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace1.kt.after @@ -1,8 +1,11 @@ // MOVE: down +// class A class A { + // val x val x = "" } +// class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace2.kt index 4013210f036..4dd85a9ef3b 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace2.kt @@ -1,8 +1,11 @@ // MOVE: up +// class A class A { + // class B class B { } + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace2.kt.after index 016f4e20de3..d75c20f3229 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace2.kt.after @@ -1,8 +1,11 @@ -// MOVE: up +// class B class B { } +// MOVE: up +// class A class A { + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace3.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace3.kt index 4df12cc2365..f6edb0e98e1 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace3.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace3.kt @@ -1,7 +1,10 @@ // MOVE: down +// class A class A { + // class B class B { - class B { + // class C + class C { } } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace3.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace3.kt.after index eff2f26ab80..429bb73b84b 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace3.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace3.kt.after @@ -1,8 +1,11 @@ // MOVE: down +// class A class A { + // class B class B { } - class B { + // class C + class C { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace4.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace4.kt index 9b3c200f843..7ce1e5fecec 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace4.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace4.kt @@ -1,7 +1,10 @@ // MOVE: up +// class A class A { + // class B class B { - class B { + // class C + class C { } } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace4.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace4.kt.after index af47bd31201..4d6d84089c1 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace4.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace4.kt.after @@ -1,8 +1,11 @@ // MOVE: up +// class A class A { - class B { + // class C + class C { } + // class B class B { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace5.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace5.kt index b2b6b8f865a..0fe3cee3044 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace5.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace5.kt @@ -1,6 +1,9 @@ // MOVE: down +// fun foo fun foo() { + // class A class A { + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace5.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace5.kt.after index c52276366e7..6e16eb2f678 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace5.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace5.kt.after @@ -1,7 +1,10 @@ // MOVE: down +// fun foo fun foo() { + // class A class A { } + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace6.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace6.kt index aa4e230f674..2fa4a6d390b 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace6.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace6.kt @@ -1,6 +1,9 @@ // MOVE: up +// fun foo fun foo() { + // class A class A { + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace6.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace6.kt.after index 831f7025b08..bb4a9a8d486 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace6.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace6.kt.after @@ -1,8 +1,11 @@ // MOVE: up +// fun foo fun foo() { + // class B class B { } + // class A class A { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass1.kt index df30122b176..20170c44fdb 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass1.kt @@ -1,9 +1,12 @@ // MOVE: down +// class A class A { + // class B class B { } - class B { + // class C + class C { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass1.kt.after index 7c7fc272bdd..83cfd6e5194 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass1.kt.after @@ -1,7 +1,10 @@ // MOVE: down +// class A class A { - class B { - class B { + // class C + class C { + // class B + class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass2.kt index 27843d81cb1..84e70ff9ffe 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass2.kt @@ -1,9 +1,12 @@ // MOVE: up +// class A class A { + // class B class B { } - class B { + // class C + class C { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass2.kt.after index 1cb0fe81495..9ab57830363 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass2.kt.after @@ -1,8 +1,11 @@ // MOVE: up +// class A class A { + // class B class B { - class B { + // class C + class C { } } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt index 9db424e8c1e..34b539f5c7a 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt @@ -1,5 +1,7 @@ // MOVE: down +// class A class A { + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt.after index c5b81847fbf..6cce219cee8 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt.after @@ -1,8 +1,10 @@ // MOVE: down +// class A class A { { } + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt index ff56bfabc8d..154f982c56d 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt @@ -1,8 +1,10 @@ // MOVE: up +// class A class A { { } + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt.after index 5dbb4935da5..e6ff78547fa 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt.after @@ -1,5 +1,7 @@ // MOVE: up +// class A class A { + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine1.kt index 5115c6bc9aa..c1e0909e3ff 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine1.kt @@ -1,8 +1,11 @@ // MOVE: down +// class A class A { + // class B class B { } + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine1.kt.after index af1e0f40e69..31dd61f4664 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine1.kt.after @@ -1,7 +1,10 @@ // MOVE: down +// class A class A { + // val y val y = "" + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine2.kt index 3e3b8ba0d1e..26ef0f0793f 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine2.kt @@ -1,7 +1,10 @@ // MOVE: up +// class A class A { + // val x val x = "" + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine2.kt.after index bdc0749a1cd..cb8e3b5effc 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine2.kt.after @@ -1,8 +1,11 @@ // MOVE: up +// class A class A { + // class B class B { } + // val x val x = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction1.kt index 505b9673e72..b969421ea99 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction1.kt @@ -1,8 +1,11 @@ // MOVE: down +// class A class A { + // class B class B { } + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction1.kt.after index 5b76fe3bb9d..88dbe44a5fb 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction1.kt.after @@ -1,8 +1,11 @@ // MOVE: down +// class A class A { + // fun foo fun foo() { } + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction2.kt index e864fe1af4c..8c812efd414 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction2.kt @@ -1,8 +1,11 @@ // MOVE: up +// class A class A { + // fun foo fun foo() { } + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction2.kt.after index 793416b57de..fe21e278ed9 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction2.kt.after @@ -1,8 +1,11 @@ // MOVE: up +// class A class A { + // class B class B { } + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty1.kt index bb5a18b8488..593cf166911 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty1.kt @@ -1,7 +1,10 @@ // MOVE: down +// class A class A { + // class B class B { } + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty1.kt.after index c65358748f6..3997aa7df49 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty1.kt.after @@ -1,6 +1,9 @@ // MOVE: down +// class A class A { + // val y val y = "" + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty2.kt index fa7dd65a83e..7223a0a95f8 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty2.kt @@ -1,6 +1,9 @@ // MOVE: up +// class A class A { + // val y val y = "" + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty2.kt.after index 805ab2a7edd..e3a51fd12c8 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty2.kt.after @@ -1,7 +1,10 @@ // MOVE: up +// class A class A { + // class B class B { } + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody1.kt index ab8ed8c756d..7ff908d0427 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody1.kt @@ -1,8 +1,11 @@ // MOVE: down +// class A class A +// class D class D { } +// class C class C { } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody1.kt.after index 2b29f95113c..de6888cc76e 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody1.kt.after @@ -1,8 +1,11 @@ -// MOVE: down +// class D class D { + // MOVE: down + // class A class A } +// class C class C { } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody2.kt index 44bdd3dcd47..08ba0a2aa99 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody2.kt @@ -1,8 +1,11 @@ // MOVE: up +// class D class D { } +// class A class A +// class C class C { } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody2.kt.after index 3581434ea68..bfe6cf554e7 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody2.kt.after @@ -1,8 +1,11 @@ // MOVE: up +// class D class D { + // class A class A } +// class C class C { } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody3.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody3.kt index 33ad1e2f29f..42724341ec8 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody3.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody3.kt @@ -1,5 +1,7 @@ // MOVE: down +// class A class A +// class D class D { } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody3.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody3.kt.after index 07aa38c878f..777c348e764 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody3.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody3.kt.after @@ -1,5 +1,7 @@ -// MOVE: down +// class D class D { + // MOVE: down + // class A class A } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody4.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody4.kt index 4027fb30c70..3c045d19cb5 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody4.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody4.kt @@ -1,5 +1,7 @@ // MOVE: up +// class D class D { } +// class A class A \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody4.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody4.kt.after index d52a3645981..60afa7518cf 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody4.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody4.kt.after @@ -1,5 +1,7 @@ // MOVE: up +// class D class D { + // class A class A } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum1.kt index 4ae012544bb..da019879c03 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum1.kt @@ -1,7 +1,11 @@ // MOVE: down +// class A class A { + // class B enum class B { + // X X + // Y Y } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum1.kt.after index c5204c15f7b..b3ec6e2eaf4 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum1.kt.after @@ -1,7 +1,11 @@ // MOVE: down +// class A class A { + // class B enum class B { + // Y Y + // X X } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum2.kt index bee76ae3993..94405206aaa 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum2.kt @@ -1,8 +1,12 @@ // MOVE: up // IS_APPLICABLE: false +// class A class A { + // class B enum class B { + // X X + // Y Y } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum3.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum3.kt index 174f5429afa..31664b32d0c 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum3.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum3.kt @@ -1,8 +1,12 @@ // MOVE: down // IS_APPLICABLE: false +// class A class A { + // class B enum class B { + // X X + // Y Y } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum4.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum4.kt index d4728baaea8..a25271ce9d2 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum4.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum4.kt @@ -1,7 +1,11 @@ // MOVE: up +// class A class A { + // class B enum class B { + // X X + // Y Y } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum4.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum4.kt.after index cbd8a807887..fe839dcc2a6 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum4.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum4.kt.after @@ -1,7 +1,11 @@ // MOVE: up +// class A class A { + // class B enum class B { + // Y Y + // X X } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum5.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum5.kt index 83702b078af..3f84d8772bb 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum5.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum5.kt @@ -1,10 +1,16 @@ // MOVE: up +// class A enum class A { + // U U + // V V + // class B enum class B { + // X X + // Y Y } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum5.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum5.kt.after index cc4b4b404ae..06c495fd2ce 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum5.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum5.kt.after @@ -1,10 +1,16 @@ // MOVE: up +// class A enum class A { + // U U + // V V - X + // X + X + // class B enum class B { + // Y Y } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum6.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum6.kt index 97a1cd07409..c2f51c05e25 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum6.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum6.kt @@ -1,10 +1,16 @@ // MOVE: down +// class A enum class A { + // U U + // V V + // class B enum class B { + // X X + // Y Y } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum6.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum6.kt.after index 1b3cf977b69..3ae5db60683 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum6.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum6.kt.after @@ -1,10 +1,16 @@ // MOVE: down +// class A enum class A { + // U U + // V V + // class B enum class B { + // X X } + // Y Y } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace1.kt index da0d16d59c6..dca08115cb1 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace1.kt @@ -1,7 +1,10 @@ // MOVE: down +// class A class A { + // val x val x = "" + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace1.kt.after index 3e4844d3aca..17d03765f7e 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace1.kt.after @@ -1,8 +1,11 @@ // MOVE: down +// class A class A { + // val x val x = "" } +// fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace2.kt index 890a295d7c5..77aecef8cd2 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace2.kt @@ -1,8 +1,11 @@ // MOVE: up +// class A class A { + // fun foo fun foo() { } + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace2.kt.after index 047bcb5dbe5..239d20845d4 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace2.kt.after @@ -1,8 +1,11 @@ -// MOVE: up +// fun foo fun foo() { } +// MOVE: up +// class A class A { + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace3.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace3.kt index f6c03ac3d36..7042238cb27 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace3.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace3.kt @@ -1,6 +1,9 @@ // MOVE: down +// class A class A { + // class B class B { + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace3.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace3.kt.after index 6c850a5f3f0..6dcf5eec653 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace3.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace3.kt.after @@ -1,7 +1,10 @@ // MOVE: down +// class A class A { + // class B class B { } + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace4.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace4.kt index d5e17c63f8a..eff907547be 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace4.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace4.kt @@ -1,6 +1,9 @@ // MOVE: up +// class A class A { + // class B class B { + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace4.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace4.kt.after index 862f49f1559..21ff689525c 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace4.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace4.kt.after @@ -1,8 +1,11 @@ // MOVE: up +// class A class A { + // fun foo fun foo() { } + // class B class B { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace5.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace5.kt index fcd181dca97..25bd1f71cca 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace5.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace5.kt @@ -1,6 +1,9 @@ // MOVE: down +// fun foo fun foo() { + // class B class B { + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace5.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace5.kt.after index 794f2076261..74ff1b4b6f0 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace5.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace5.kt.after @@ -1,7 +1,10 @@ // MOVE: down +// fun foo fun foo() { + // class B class B { } + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace6.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace6.kt index 42314a50cc1..0f34d4aba0e 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace6.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace6.kt @@ -1,6 +1,9 @@ // MOVE: up +// fun foo fun foo() { + // class B class B { + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace6.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace6.kt.after index 1a3e7adb4c5..097015b4e70 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace6.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace6.kt.after @@ -1,8 +1,11 @@ // MOVE: up +// fun foo fun foo() { + // fun foo fun foo() { } + // class B class B { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass1.kt index 2cd599697ee..ebdf73314cf 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass1.kt @@ -1,8 +1,11 @@ // MOVE: down +// class A class A { + // fun foo fun foo() { } + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass1.kt.after index 451987e96c0..d1bd6901831 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass1.kt.after @@ -1,6 +1,9 @@ // MOVE: down +// class A class A { + // class B class B { + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass2.kt index 64a149bd3e6..48a4402e3ff 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass2.kt @@ -1,8 +1,11 @@ // MOVE: up +// class A class A { + // class B class B { } + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass2.kt.after index bfe43bde50b..eac1d7056c3 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass2.kt.after @@ -1,8 +1,11 @@ // MOVE: up +// class A class A { + // class B class B { - fun foo() { + // fun foo + fun foo() { } } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt index 49862cd92fa..b5a4865304e 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt @@ -1,5 +1,7 @@ // MOVE: down +// class A class A { + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt.after index 256788cf66a..e6d0daf2a8a 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt.after @@ -1,8 +1,10 @@ // MOVE: down +// class A class A { { } + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt index 69731c0828e..9844046546a 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt @@ -1,8 +1,10 @@ // MOVE: up +// class A class A { { } + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt.after index 6277aed9f85..dbffada6881 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt.after @@ -1,5 +1,7 @@ // MOVE: up +// class A class A { + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine1.kt index 4094dac0928..04baec65ff1 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine1.kt @@ -1,8 +1,11 @@ // MOVE: down +// class A class A { + // fun foo fun foo() { } + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine1.kt.after index 4e4d801f3b8..a1596cce9bb 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine1.kt.after @@ -1,7 +1,10 @@ // MOVE: down +// class A class A { + // val y val y = "" + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine2.kt index 7b24eec0b88..a092e9313c5 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine2.kt @@ -1,7 +1,10 @@ // MOVE: up +// class A class A { + // val x val x = "" + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine2.kt.after index b7a881772e1..ed3db4eab70 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine2.kt.after @@ -1,8 +1,11 @@ // MOVE: up +// class A class A { + // fun foo fun foo() { } + // val x val x = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction1.kt index 4c7bdd78a3c..d4063297cd6 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction1.kt @@ -1,9 +1,12 @@ // MOVE: down +// class A class A { + // fun foo fun foo() { } - fun foo() { + // fun bar + fun bar() { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction1.kt.after index fec94704f1f..d2108ec68b7 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction1.kt.after @@ -1,8 +1,11 @@ // MOVE: down +// class A class A { - fun foo() { + // fun bar + fun bar() { } + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction2.kt index d019e81a5bb..5a28728e02f 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction2.kt @@ -1,9 +1,12 @@ // MOVE: up +// class A class A { + // fun foo fun foo() { } - fun foo() { + // fun bar + fun bar() { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction2.kt.after index 93202aaf691..739ed108af1 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction2.kt.after @@ -1,8 +1,11 @@ // MOVE: up +// class A class A { - fun foo() { + // fun bar + fun bar() { } + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty1.kt index d8a3887b204..3530c0badd1 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty1.kt @@ -1,7 +1,10 @@ // MOVE: down +// class A class A { + // fun foo fun foo() { } + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty1.kt.after index 8ea5a5d2fd8..2960eccc668 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty1.kt.after @@ -1,6 +1,9 @@ // MOVE: down +// class A class A { + // val y val y = "" + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty2.kt index e013617ebc6..c56e2f2c7cd 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty2.kt @@ -1,6 +1,9 @@ // MOVE: up +// class A class A { + // val y val y = "" + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty2.kt.after index 80a5ce4d34e..717c5181ead 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty2.kt.after @@ -1,7 +1,10 @@ // MOVE: up +// class A class A { + // fun foo fun foo() { } + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace1.kt index 2ba360e9efe..607a19f322f 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace1.kt @@ -1,6 +1,9 @@ // MOVE: down +// class A class A { + // val x val x = "" + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace1.kt.after index 660bf8af9e1..8b140d7e844 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace1.kt.after @@ -1,6 +1,9 @@ // MOVE: down +// class A class A { + // val x val x = "" } +// val y val y = "" diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace2.kt index 7f94c0ac8d8..f2f5ec77361 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace2.kt @@ -1,6 +1,9 @@ // MOVE: up +// class A class A { + // val x val x = "" + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace2.kt.after index c47556639ea..0882314d8f8 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace2.kt.after @@ -1,6 +1,9 @@ -// MOVE: up +// val x val x = "" +// MOVE: up +// class A class A { + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace3.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace3.kt index 3e5dbf4d82b..2bd2c582c1c 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace3.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace3.kt @@ -1,6 +1,9 @@ // MOVE: down +// class A class A { + // class B class B { + // val y val y = "" } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace3.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace3.kt.after index 28def27d9bb..bece750599c 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace3.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace3.kt.after @@ -1,6 +1,9 @@ // MOVE: down +// class A class A { + // class B class B { } + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace4.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace4.kt index 5e3c869f9b1..7fb2668b3f6 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace4.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace4.kt @@ -1,6 +1,9 @@ // MOVE: up +// class A class A { + // class B class B { + // val y val y = "" } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace4.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace4.kt.after index 89d0876a81a..6aec8bf7a81 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace4.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace4.kt.after @@ -1,6 +1,9 @@ // MOVE: up +// class A class A { + // val y val y = "" + // class B class B { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace5.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace5.kt index e2dfb807f51..058959dca48 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace5.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace5.kt @@ -1,6 +1,9 @@ // MOVE: down +// fun foo fun foo() { + // class B class B { + // val y val y = "" } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace5.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace5.kt.after index 8df651be8f5..f5865f313bb 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace5.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace5.kt.after @@ -1,6 +1,9 @@ // MOVE: down +// fun foo fun foo() { + // class B class B { } + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace6.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace6.kt index ab18d34ca64..20b3d10d535 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace6.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace6.kt @@ -1,6 +1,9 @@ // MOVE: up +// fun foo fun foo() { + // class B class B { + // val y val y = "" } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace6.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace6.kt.after index 12853c9e00e..5db241f256f 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace6.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace6.kt.after @@ -1,6 +1,9 @@ // MOVE: up +// fun foo fun foo() { + // val y val y = "" + // class B class B { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass1.kt index a4afb87fdf6..6f7e0e770f8 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass1.kt @@ -1,6 +1,9 @@ // MOVE: down +// class A class A { + // val x val x = "" + // class B class B { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass1.kt.after index 7d20f71189c..b2d7933c21c 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass1.kt.after @@ -1,6 +1,9 @@ // MOVE: down +// class A class A { + // class B class B { + // val x val x = "" } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass2.kt index 4b483cc8c42..7831470df9c 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass2.kt @@ -1,7 +1,10 @@ // MOVE: up +// class A class A { + // class B class B { } + // val x val x = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass2.kt.after index fd5185d4e3e..6480d44c584 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass2.kt.after @@ -1,7 +1,10 @@ // MOVE: up +// class A class A { + // class B class B { + // val x val x = "" } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt index d34dca815da..e1b4839ce91 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt @@ -1,5 +1,7 @@ // MOVE: down +// class A class A { + // val x val x = "" { diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt.after index ea29706876a..9c14d4fdfd5 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt.after @@ -1,7 +1,9 @@ // MOVE: down +// class A class A { { } + // val x val x = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt index 86d1b0124f6..0d5fbd16b57 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt @@ -1,7 +1,9 @@ // MOVE: up +// class A class A { { } + // val x val x = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt.after index 56abf6d5b73..1b1a41c6711 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt.after @@ -1,5 +1,7 @@ // MOVE: up +// class A class A { + // val x val x = "" { diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine1.kt index 3143a3065e0..7f9e7723ab4 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine1.kt @@ -1,6 +1,9 @@ // MOVE: down +// class A class A { + // val x val x = "" + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine1.kt.after index ea331d0437f..429760988cc 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine1.kt.after @@ -1,6 +1,9 @@ // MOVE: down +// class A class A { + // val y val y = "" + // val x val x = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine2.kt index 365cbec7f8c..102d5a3ec67 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine2.kt @@ -1,6 +1,9 @@ // MOVE: up +// class A class A { + // val x val x = "" + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine2.kt.after index 66a6c8aafb2..f3f3bebdee3 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine2.kt.after @@ -1,6 +1,9 @@ // MOVE: up +// class A class A { + // val y val y = "" + // val x val x = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction1.kt index 86d43aa16b2..638ff09b244 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction1.kt @@ -1,6 +1,9 @@ // MOVE: down +// class A class A { + // val x val x = "" + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction1.kt.after index 0398f74620d..75b8ef51350 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction1.kt.after @@ -1,7 +1,10 @@ // MOVE: down +// class A class A { + // fun foo fun foo() { } + // val x val x = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction2.kt index 28fbf893349..34a51354682 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction2.kt @@ -1,7 +1,10 @@ // MOVE: up +// class A class A { + // fun foo fun foo() { } + // val x val x = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction2.kt.after index 96a307f37dd..f087cc198d7 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction2.kt.after @@ -1,6 +1,9 @@ // MOVE: up +// class A class A { + // val x val x = "" + // fun foo fun foo() { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty1.kt index d88a50f3ee2..b3c2db3345f 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty1.kt @@ -1,5 +1,8 @@ // MOVE: down +// class A class A { + // val x val x = "" + // val y val y = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty1.kt.after index e46e2f58701..e77ba562089 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty1.kt.after @@ -1,5 +1,8 @@ // MOVE: down +// class A class A { + // val y val y = "" + // val x val x = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty2.kt index df38ee26773..ecd2b2a0847 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty2.kt @@ -1,5 +1,8 @@ // MOVE: up +// class A class A { + // val y val y = "" + // val x val x = "" } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty2.kt.after index f139e2efebd..61a22102e80 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty2.kt.after @@ -1,5 +1,8 @@ // MOVE: up +// class A class A { + // val x val x = "" + // val y val y = "" } \ No newline at end of file