mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
change signature: reorder params with javadoc without * (IDEA-110332)
This commit is contained in:
@@ -1137,7 +1137,7 @@ public class RefactoringUtil {
|
||||
paramTag.delete();
|
||||
}
|
||||
for (PsiDocTag psiDocTag : newTags) {
|
||||
anchor = docComment.addAfter(psiDocTag, anchor);
|
||||
anchor = anchor != null && anchor.isValid() ? docComment.addAfter(psiDocTag, anchor) : docComment.add(psiDocTag);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
class X {
|
||||
|
||||
/**
|
||||
* Has a method called {@link #mymethod(int, int)}.
|
||||
*/
|
||||
public class TestRefactorLink {
|
||||
/**
|
||||
@return nothing
|
||||
@param y yparam
|
||||
@param z zparam
|
||||
*/
|
||||
public void <caret>mymethod(int y, int z) { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
class X {
|
||||
|
||||
/**
|
||||
* Has a method called {@link #mymethod(int, int)}.
|
||||
*/
|
||||
public class TestRefactorLink {
|
||||
/**
|
||||
@return nothing
|
||||
* @param z zparam
|
||||
* @param y yparam
|
||||
*/
|
||||
public void mymethod(int z, int y) { }
|
||||
}
|
||||
}
|
||||
@@ -155,6 +155,13 @@ public class ChangeSignatureTest extends LightRefactoringTestCase {
|
||||
}, false);
|
||||
}
|
||||
|
||||
public void testParamJavadoc0() throws Exception {
|
||||
doTest(null, new ParameterInfoImpl[] {
|
||||
new ParameterInfoImpl(1, "z", PsiType.INT),
|
||||
new ParameterInfoImpl(0, "y", PsiType.INT)
|
||||
}, false);
|
||||
}
|
||||
|
||||
public void testParamJavadoc1() throws Exception {
|
||||
doTest(null, new ParameterInfoImpl[]{
|
||||
new ParameterInfoImpl(0, "z", PsiType.BOOLEAN)
|
||||
|
||||
Reference in New Issue
Block a user