### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.ui Index: core refactoring/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateMethodCreator.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateMethodCreator.java,v retrieving revision 1.1 diff -u -r1.1 DelegateMethodCreator.java --- core refactoring/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateMethodCreator.java 16 Dec 2005 13:16:23 -0000 1.1 +++ core refactoring/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateMethodCreator.java 3 Jan 2006 09:30:44 -0000 @@ -49,6 +49,8 @@ if (getNewElementName() == null) setNewElementName(((MethodDeclaration) getDeclaration()).getName().getIdentifier()); + + setInsertBefore(true); } protected ASTNode createBody(BodyDeclaration bd) throws JavaModelException { @@ -85,12 +87,17 @@ /** * @return the delegate incovation, either a {@link ConstructorInvocation} - * or a {@link MethodInvocation} + * or a {@link MethodInvocation}. May be null if the delegate + * method is abstract (and therefore has no body at all) */ public ASTNode getDelegateInvocation() { return fDelegateInvocation; } + /** + * @return the javadoc reference to the old method in the javadoc comment. + * May be null if no comment was created. + */ public MethodRef getJavadocReference() { return fDocMethodReference; } @@ -113,6 +120,8 @@ // we are creating type info for the javadoc final MethodRefParameter parameter= getAst().newMethodRefParameter(); parameter.setType(ASTNodeFactory.newType(getAst(), variable)); + if ((index == size - 1) && declaration.isVarargs()) + parameter.setVarargs(true); arguments.add(parameter); } } Index: core refactoring/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateCreator.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateCreator.java,v retrieving revision 1.1 diff -u -r1.1 DelegateCreator.java --- core refactoring/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateCreator.java 16 Dec 2005 13:16:23 -0000 1.1 +++ core refactoring/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateCreator.java 3 Jan 2006 09:30:44 -0000 @@ -120,11 +120,10 @@ private CompilationUnitRewrite fOriginalRewrite; private CompilationUnitRewrite fDelegateRewrite; - private AST fAst; - private boolean fIsMoveToAnotherFile; private boolean fCopy; private boolean fDeclareDeprecated; + private boolean fInsertBefore; private BodyDeclaration fDeclaration; private String fNewElementName; @@ -137,6 +136,7 @@ public DelegateCreator() { fCopy= true; fDeclareDeprecated= true; + fInsertBefore= false; } /** @@ -151,7 +151,6 @@ fPreferences= JavaPreferencesSettings.getCodeGenerationSettings(rewrite.getCu().getJavaProject()); fDelegateRewrite= new CompilationUnitRewrite(rewrite.getCu(), rewrite.getRoot()); - fAst= fDelegateRewrite.getAST(); } /** @@ -211,6 +210,19 @@ fDeclareDeprecated= declareDeprecated; } + /** + * When in copy mode, use this method to control the insertion point of the + * delegate. If the parameter is true, the delegate gets inserted before the + * original declaration. If false, the delegate gets inserted after the + * original declaration. + * + * The default is false (do not insert before). + * + * @param insertBefore insertion point + */ + public void setInsertBefore(boolean insertBefore) { + fInsertBefore= insertBefore; + } // Methods to be overridden by subclasses @@ -275,7 +287,7 @@ } protected AST getAst() { - return fAst; + return fDelegateRewrite.getAST(); } protected BodyDeclaration getDeclaration() { @@ -304,7 +316,7 @@ // Moving to a new type? if (fDestinationTypeBinding != null) { - fDestinationType= fOriginalRewrite.getImportRewrite().addImport(fDestinationTypeBinding, fAst); + fDestinationType= fOriginalRewrite.getImportRewrite().addImport(fDestinationTypeBinding, getAst()); fIsMoveToAnotherFile= true; } else fIsMoveToAnotherFile= false; @@ -350,7 +362,10 @@ CategorizedTextEditGroup groupDescription= fOriginalRewrite.createCategorizedGroupDescription(RefactoringCoreMessages.DelegateCreator_create_delegate, CATEGORY_DELEGATE); ListRewrite bodyDeclarationsListRewrite= fOriginalRewrite.getASTRewrite().getListRewrite(fDeclaration.getParent(), getTypeBodyDeclarationsProperty()); if (fCopy) - bodyDeclarationsListRewrite.insertAfter(placeholder, fDeclaration, groupDescription); + if (fInsertBefore) + bodyDeclarationsListRewrite.insertBefore(placeholder, fDeclaration, groupDescription); + else + bodyDeclarationsListRewrite.insertAfter(placeholder, fDeclaration, groupDescription); else bodyDeclarationsListRewrite.replace(fDeclaration, placeholder, groupDescription); @@ -374,23 +389,23 @@ private TagElement getDelegateJavadocTag(BodyDeclaration declaration) throws JavaModelException { Assert.isNotNull(declaration); - final String[] tokens= Strings.splitByToken(RefactoringCoreMessages.DelegateCreator_use_member_instead, " "); //$NON-NLS-1$ - final List fragments= new ArrayList(tokens.length); - String element= null; - for (int index= 0; index < tokens.length; index++) { - element= tokens[index]; - if (element != null && element.length() > 0) { - if (element.equals("{0}")) {//$NON-NLS-1$ - fragments.add(createJavadocMemberReferenceTag(declaration, fAst)); - } else { - final TextElement text= fAst.newTextElement(); - text.setText(element); - fragments.add(text); - } - } - } - - final TagElement tag= fAst.newTagElement(); + + String msg= RefactoringCoreMessages.DelegateCreator_use_member_instead; + int firstParam= msg.indexOf("{0}"); //$NON-NLS-1$ + Assert.isTrue(firstParam != -1); + + List fragments= new ArrayList(); + TextElement text= getAst().newTextElement(); + text.setText(msg.substring(0, firstParam).trim()); + fragments.add(text); + + fragments.add(createJavadocMemberReferenceTag(declaration, getAst())); + + text= getAst().newTextElement(); + text.setText(msg.substring(firstParam + 3).trim()); + fragments.add(text); + + final TagElement tag= getAst().newTagElement(); tag.setTagName(TagElement.TAG_DEPRECATED); tag.fragments().addAll(fragments); return tag; Index: core refactoring/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateFieldCreator.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateFieldCreator.java,v retrieving revision 1.1 diff -u -r1.1 DelegateFieldCreator.java --- core refactoring/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateFieldCreator.java 16 Dec 2005 13:16:23 -0000 1.1 +++ core refactoring/org/eclipse/jdt/internal/corext/refactoring/delegates/DelegateFieldCreator.java 3 Jan 2006 09:30:44 -0000 @@ -44,6 +44,8 @@ fOldFieldFragment= (VariableDeclarationFragment) ((FieldDeclaration) getDeclaration()).fragments().get(0); if (getNewElementName() == null) setNewElementName(fOldFieldFragment.getName().getIdentifier()); + + setInsertBefore(false); } protected ASTNode createBody(BodyDeclaration fd) throws JavaModelException { Index: core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureRefactoring.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureRefactoring.java,v retrieving revision 1.148 diff -u -r1.148 ChangeSignatureRefactoring.java --- core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureRefactoring.java 16 Dec 2005 13:16:23 -0000 1.148 +++ core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureRefactoring.java 3 Jan 2006 09:30:45 -0000 @@ -1789,7 +1789,11 @@ * Use ReferenceUpdate() / DocReferenceUpdate() to update these * references like any other reference. */ - new ReferenceUpdate(d.getDelegateInvocation(), d.getDelegateRewrite(), fResult).updateNode(); + final ASTNode delegateInvocation= d.getDelegateInvocation(); + if (delegateInvocation != null) + // may be null if the delegate is an interface method or + // abstract -> no body + new ReferenceUpdate(delegateInvocation, d.getDelegateRewrite(), fResult).updateNode(); new DocReferenceUpdate(d.getJavadocReference(), d.getDelegateRewrite(), fResult).updateNode(); d.createEdit(); #P org.eclipse.jdt.ui.tests.refactoring Index: resources/ChangeSignature/canModify/A_testAll45_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testAll45_out.java,v retrieving revision 1.3 diff -u -r1.3 A_testAll45_out.java --- resources/ChangeSignature/canModify/A_testAll45_out.java 25 Feb 2005 17:27:28 -0000 1.3 +++ resources/ChangeSignature/canModify/A_testAll45_out.java 3 Jan 2006 09:30:46 -0000 @@ -3,4 +3,11 @@ void m(boolean j){ m(1); } + + /** + * @deprecated use instead m(boolean j) + */ + public void m(int i, int j) { + m(j); // but what if the other direction - was value, now void? + } } \ No newline at end of file Index: resources/ChangeSignature/canModify/A_testDelegate04_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testDelegate04_out.java,v retrieving revision 1.1 diff -u -r1.1 A_testDelegate04_out.java --- resources/ChangeSignature/canModify/A_testDelegate04_out.java 16 Dec 2005 13:16:27 -0000 1.1 +++ resources/ChangeSignature/canModify/A_testDelegate04_out.java 3 Jan 2006 09:30:46 -0000 @@ -3,13 +3,13 @@ import java.util.List; class A{ - private void m() { - } - /** * @deprecated Use {@link #m()} instead */ private void m(List l) { m(); } + + private void m() { + } } Index: resources/ChangeSignature/canModify/A_test15_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_test15_out.java,v retrieving revision 1.3 diff -u -r1.3 A_test15_out.java --- resources/ChangeSignature/canModify/A_test15_out.java 25 Feb 2005 17:27:27 -0000 1.3 +++ resources/ChangeSignature/canModify/A_test15_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,5 +1,11 @@ package p; class A{ + /** + * @deprecated Use {@link #m(boolean,int)} instead + */ + private void m(int i, boolean b){ + m(b, i); + } private void m(boolean b, int i){ } private void foo(){ Index: resources/ChangeSignature/canModify/A_testAll41_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testAll41_out.java,v retrieving revision 1.3 diff -u -r1.3 A_testAll41_out.java --- resources/ChangeSignature/canModify/A_testAll41_out.java 25 Feb 2005 17:27:27 -0000 1.3 +++ resources/ChangeSignature/canModify/A_testAll41_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,5 +1,12 @@ package p; class A{ + /** + * @deprecated Use {@link #m()} instead + */ + void m(int i){ + m(); + } + void m(){ m(); } Index: resources/ChangeSignature/canModify/A_test19_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_test19_out.java,v retrieving revision 1.3 diff -u -r1.3 A_test19_out.java --- resources/ChangeSignature/canModify/A_test19_out.java 25 Feb 2005 17:27:27 -0000 1.3 +++ resources/ChangeSignature/canModify/A_test19_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,5 +1,12 @@ package p; class A { + /** + * @deprecated Use {@link #m(boolean,int)} instead + */ + public void m(int i, final boolean b){ + m(b, i); + } + public void m(final boolean b, int i){} } Index: resources/ChangeSignature/canModify/A_test27_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_test27_out.java,v retrieving revision 1.5 diff -u -r1.5 A_test27_out.java --- resources/ChangeSignature/canModify/A_test27_out.java 25 Feb 2005 17:27:27 -0000 1.5 +++ resources/ChangeSignature/canModify/A_test27_out.java 3 Jan 2006 09:30:46 -0000 @@ -10,6 +10,13 @@ } class PoolMessageEvent { + /** + * @deprecated Use {@link #PoolMessageEvent(String,Object,int,Object)} instead + */ + PoolMessageEvent( String msg, Object xml, int id ) { + this(msg, xml, id, null); + } + PoolMessageEvent( String msg, Object xml, int id, Object newParam ) { //empty } Index: resources/ChangeSignature/canModify/A_testVararg05_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testVararg05_out.java,v retrieving revision 1.3 diff -u -r1.3 A_testVararg05_out.java --- resources/ChangeSignature/canModify/A_testVararg05_out.java 25 Feb 2005 17:27:28 -0000 1.3 +++ resources/ChangeSignature/canModify/A_testVararg05_out.java 3 Jan 2006 09:30:46 -0000 @@ -2,6 +2,14 @@ class A { /** + * @see #use(Object, String[]) + * @deprecated Use {@link #use(Object)} instead + */ + public void use(Object first, String... args) { + use(first); + } + + /** * @see #use(Object) */ public void use(Object arg) { Index: resources/ChangeSignature/canModify/A_testAdd29_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testAdd29_out.java,v retrieving revision 1.3 diff -u -r1.3 A_testAdd29_out.java --- resources/ChangeSignature/canModify/A_testAdd29_out.java 25 Feb 2005 17:27:27 -0000 1.3 +++ resources/ChangeSignature/canModify/A_testAdd29_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,5 +1,12 @@ package p; class A{ + /** + * @deprecated Use {@link #m(int,int)} instead + */ + private void m(int i){ + m(0, i); + } + private void m(int x, int i){ } } \ No newline at end of file Index: resources/ChangeSignature/canModify/A_testAdd30_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testAdd30_out.java,v retrieving revision 1.4 diff -u -r1.4 A_testAdd30_out.java --- resources/ChangeSignature/canModify/A_testAdd30_out.java 25 Feb 2005 17:27:27 -0000 1.4 +++ resources/ChangeSignature/canModify/A_testAdd30_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,5 +1,12 @@ package p; class A{ + /** + * @deprecated Use {@link #m(int,int)} instead + */ + private void m(int i){ + m(i, 0); + } + private void m(int i, int x){ m(i, x); } Index: resources/ChangeSignature/canModify/A_testDelegate02_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testDelegate02_out.java,v retrieving revision 1.1 diff -u -r1.1 A_testDelegate02_out.java --- resources/ChangeSignature/canModify/A_testDelegate02_out.java 16 Dec 2005 13:16:26 -0000 1.1 +++ resources/ChangeSignature/canModify/A_testDelegate02_out.java 3 Jan 2006 09:30:46 -0000 @@ -3,14 +3,14 @@ import java.util.List; class A{ - private void m(List list) { - m(list); - } - /** * @deprecated Use {@link #m(List)} instead */ private void m() { m(null); } + + private void m(List list) { + m(list); + } } Index: resources/ChangeSignature/canModify/A_testRenameReorder26_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testRenameReorder26_out.java,v retrieving revision 1.3 diff -u -r1.3 A_testRenameReorder26_out.java --- resources/ChangeSignature/canModify/A_testRenameReorder26_out.java 25 Feb 2005 17:27:27 -0000 1.3 +++ resources/ChangeSignature/canModify/A_testRenameReorder26_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,6 +1,13 @@ package p; class A{ + /** + * @deprecated Use {@link #m(int,boolean)} instead + */ + private void m(boolean y, int a){ + m(a, y); + } + private void m(int bb, boolean zzz){ m(bb, zzz); } Index: resources/ChangeSignature/canModify/A_testAddRecursive1_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testAddRecursive1_out.java,v retrieving revision 1.4 diff -u -r1.4 A_testAddRecursive1_out.java --- resources/ChangeSignature/canModify/A_testAddRecursive1_out.java 25 Feb 2005 17:27:28 -0000 1.4 +++ resources/ChangeSignature/canModify/A_testAddRecursive1_out.java 3 Jan 2006 09:30:46 -0000 @@ -2,24 +2,72 @@ class A { int i; + /** + * @deprecated Use {@link #m(int,boolean)} instead + */ + void m(int i) { + m(i, true); + } void m(int i, boolean bool) {this.i = i;} } class Super extends A { + /** + * @deprecated Use {@link #m(int,boolean)} instead + */ + void m(int i) { + m(i, true); + } + void m(int i, boolean bool) { super.m(1, bool); } } class Recursive extends A { + /** + * @deprecated Use {@link #m(int,boolean)} instead + */ + void m(int i) { + m(i, true); + } + void m(int i, boolean bool) { if (true) m(i, bool); } } class ThisRecursive extends A { + /** + * @deprecated Use {@link #m(int,boolean)} instead + */ + void m(int i) { + m(i, true); + } + void m(int i, boolean bool) { this.m(i, bool); } } class AlmostRecursive extends A { + /** + * @deprecated Use {@link #m(int,boolean)} instead + */ + void m(int i) { + m(i, true); + } + void m(int i, boolean bool) { new A().m(i, true); } } class RecursiveOrNot extends A { + /** + * @deprecated Use {@link #m(int,boolean)} instead + */ + void m(int i) { + m(i, true); + } + void m(int i, boolean bool) { new RecursiveOrNot().m(i, bool); } } class NonRecursive extends A { + /** + * @deprecated Use {@link #m(int,boolean)} instead + */ + void m(int i) { + m(i, true); + } + void m(int i, boolean bool) { int k= i; } } class Calling extends A { Index: resources/ChangeSignature/canModify/A_testAll44_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testAll44_out.java,v retrieving revision 1.3 diff -u -r1.3 A_testAll44_out.java --- resources/ChangeSignature/canModify/A_testAll44_out.java 25 Feb 2005 17:27:27 -0000 1.3 +++ resources/ChangeSignature/canModify/A_testAll44_out.java 3 Jan 2006 09:30:46 -0000 @@ -3,4 +3,11 @@ boolean m(int j){ m(1); } + + /** + * @deprecated use instead m(int j) + */ + public void m(int i, int j) { + m(j); + } } \ No newline at end of file Index: resources/ChangeSignature/canModify/A_testAdd32_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testAdd32_out.java,v retrieving revision 1.4 diff -u -r1.4 A_testAdd32_out.java --- resources/ChangeSignature/canModify/A_testAdd32_out.java 25 Feb 2005 17:27:27 -0000 1.4 +++ resources/ChangeSignature/canModify/A_testAdd32_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,5 +1,12 @@ package p; class A{ + /** + * @deprecated Use {@link #m(int,int)} instead + */ + private void m(int i){ + m(0, i); + } + private void m(int x, int i){ m(x, i); } Index: resources/ChangeSignature/canModify/A_testAdd33_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testAdd33_out.java,v retrieving revision 1.4 diff -u -r1.4 A_testAdd33_out.java --- resources/ChangeSignature/canModify/A_testAdd33_out.java 25 Feb 2005 17:27:28 -0000 1.4 +++ resources/ChangeSignature/canModify/A_testAdd33_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,5 +1,12 @@ package p; class A{ + /** + * @deprecated Use {@link #m(int)} instead + */ + private void m(){ + m(0); + } + private void m(int x){ m(x); } Index: resources/ChangeSignature/canModify/A_testAll43_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testAll43_out.java,v retrieving revision 1.4 diff -u -r1.4 A_testAll43_out.java --- resources/ChangeSignature/canModify/A_testAll43_out.java 25 Feb 2005 17:27:28 -0000 1.4 +++ resources/ChangeSignature/canModify/A_testAll43_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,5 +1,12 @@ package p; class A{ + /** + * @deprecated Use {@link #m(int)} instead + */ + void m(int i, int j){ + m(j); + } + void m(int j){ m(1); } Index: resources/ChangeSignature/canModify/A_testVararg07_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testVararg07_out.java,v retrieving revision 1.3 diff -u -r1.3 A_testVararg07_out.java --- resources/ChangeSignature/canModify/A_testVararg07_out.java 25 Feb 2005 17:27:27 -0000 1.3 +++ resources/ChangeSignature/canModify/A_testVararg07_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,11 +1,25 @@ package p; class A { + /** + * @deprecated Use {@link #m(int,String,Integer)} instead + */ + public void m(int i, String[] names) { + m(i, "none", 17); + } + public void m(int i, String j, Integer k) { } } class B extends A { + /** + * @deprecated Use {@link #m(int,String,Integer)} instead + */ + public void m(int i, String... names) { + m(i, "none", 17); + } + public void m(int i, String j, Integer k) { } } Index: resources/ChangeSignature/canModify/A_testAdd31_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testAdd31_out.java,v retrieving revision 1.4 diff -u -r1.4 A_testAdd31_out.java --- resources/ChangeSignature/canModify/A_testAdd31_out.java 25 Feb 2005 17:27:27 -0000 1.4 +++ resources/ChangeSignature/canModify/A_testAdd31_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,10 +1,24 @@ package p; class A{ + /** + * @deprecated Use {@link #m(int,int)} instead + */ + void m(int i){ + m(i, 0); + } + void m(int i, int x){ m(i, x); } } class B extends A{ + /** + * @deprecated Use {@link #m(int,int)} instead + */ + void m(int j){ + m(j, 0); + } + void m(int j, int x){ super.m(j, x); this.m(j, x); Index: resources/ChangeSignature/canModify/A_testAdd28_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testAdd28_out.java,v retrieving revision 1.3 diff -u -r1.3 A_testAdd28_out.java --- resources/ChangeSignature/canModify/A_testAdd28_out.java 25 Feb 2005 17:27:27 -0000 1.3 +++ resources/ChangeSignature/canModify/A_testAdd28_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,5 +1,12 @@ package p; class A{ + /** + * @deprecated Use {@link #m(int,int)} instead + */ + private void m(int i){ + m(i, 0); + } + private void m(int i, int x){ } } \ No newline at end of file Index: resources/ChangeSignature/canModify/A_testGenerics01_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testGenerics01_out.java,v retrieving revision 1.3 diff -u -r1.3 A_testGenerics01_out.java --- resources/ChangeSignature/canModify/A_testGenerics01_out.java 25 Feb 2005 17:27:28 -0000 1.3 +++ resources/ChangeSignature/canModify/A_testGenerics01_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,10 +1,24 @@ package p; class A { + /** + * @deprecated Use {@link #m(E,Integer)} instead + */ + void m(Integer i, E e) { + m(e, i); + } + void m(E e, Integer integer) {} } class Sub extends A { + /** + * @deprecated Use {@link #m(Q,Integer)} instead + */ + void m(Integer i, Q q) { + m(q, i); + } + void m(Q q, Integer integer) { super.m(q, integer); } Index: resources/ChangeSignature/canModify/A_test16_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_test16_out.java,v retrieving revision 1.3 diff -u -r1.3 A_test16_out.java --- resources/ChangeSignature/canModify/A_test16_out.java 25 Feb 2005 17:27:28 -0000 1.3 +++ resources/ChangeSignature/canModify/A_test16_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,5 +1,11 @@ package p; class A{ + /** + * @deprecated Use {@link #m(boolean,int)} instead + */ + protected void m(int i, boolean b){ + m(b, i); + } protected void m(boolean b, int i){ } private void foo(){ @@ -7,6 +13,13 @@ } } class B extends A{ + /** + * @deprecated Use {@link #m(boolean,int)} instead + */ + protected void m(int j, boolean b){ + m(b, j); + } + protected void m(boolean b, int j){ m(false, 6); super.m(true, 4); Index: resources/ChangeSignature/canModify/A_testDelegate03_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testDelegate03_out.java,v retrieving revision 1.1 diff -u -r1.1 A_testDelegate03_out.java --- resources/ChangeSignature/canModify/A_testDelegate03_out.java 16 Dec 2005 13:16:27 -0000 1.1 +++ resources/ChangeSignature/canModify/A_testDelegate03_out.java 3 Jan 2006 09:30:46 -0000 @@ -3,14 +3,14 @@ import java.util.List; class A{ - private void m(String j, int i) { - List l; - } - /** * @deprecated Use {@link #m(String,int)} instead */ private void m(int i, String j) { m(j, i); } + + private void m(String j, int i) { + List l; + } } Index: resources/ChangeSignature/canModify/A_test20_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_test20_out.java,v retrieving revision 1.3 diff -u -r1.3 A_test20_out.java --- resources/ChangeSignature/canModify/A_test20_out.java 25 Feb 2005 17:27:27 -0000 1.3 +++ resources/ChangeSignature/canModify/A_test20_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,5 +1,12 @@ package p; class A { + /** + * @deprecated Use {@link #m(int[],int)} instead + */ + void m(int a, int b[]){ + m(b, a); + } + void m(int b[], int a){} } \ No newline at end of file Index: resources/ChangeSignature/canModify/A_testDelegate01_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testDelegate01_out.java,v retrieving revision 1.1 diff -u -r1.1 A_testDelegate01_out.java --- resources/ChangeSignature/canModify/A_testDelegate01_out.java 16 Dec 2005 13:16:27 -0000 1.1 +++ resources/ChangeSignature/canModify/A_testDelegate01_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,13 +1,13 @@ package p; class A{ - private void m(String j, int i) { - m(j, i); - } - /** * @deprecated Use {@link #m(String,int)} instead */ private void m(int i, String j) { m(j, i); } + + private void m(String j, int i) { + m(j, i); + } } Index: resources/ChangeSignature/canModify/A_testVararg02_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testVararg02_out.java,v retrieving revision 1.3 diff -u -r1.3 A_testVararg02_out.java --- resources/ChangeSignature/canModify/A_testVararg02_out.java 25 Feb 2005 17:27:28 -0000 1.3 +++ resources/ChangeSignature/canModify/A_testVararg02_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,6 +1,13 @@ package p; class A { + /** + * @deprecated Use {@link #m(Object,int,String...)} instead + */ + public void m(int i, String... names) { + m(new Object(), i, names); + } + public void m(Object o, int i, String... names) { for (String name : names) { System.out.println(name); @@ -9,6 +16,13 @@ } class B extends A { + /** + * @deprecated Use {@link #m(Object,int,String[])} instead + */ + public void m(int i, String[] names) { + m(new Object(), i, names); + } + public void m(Object o, int i, String[] names) { for (String name : names) { System.out.println(name); Index: resources/ChangeSignature/canModify/A_test17_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_test17_out.java,v retrieving revision 1.3 diff -u -r1.3 A_test17_out.java --- resources/ChangeSignature/canModify/A_test17_out.java 25 Feb 2005 17:27:27 -0000 1.3 +++ resources/ChangeSignature/canModify/A_test17_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,6 +1,12 @@ package p; class A1 implements A{ + /** + * @deprecated Use {@link #m(boolean,int)} instead + */ + public void m(int i, boolean b){ + m(b, i); + } public void m(boolean b, int i){ } private void foo(){ @@ -8,11 +14,23 @@ } } class B extends A1{ + /** + * @deprecated Use {@link #m(boolean,int)} instead + */ + public void m(int j, boolean b){ + m(b, j); + } + public void m(boolean b, int j){ m(false, 6); super.m(true, 4); } } interface A { + /** + * @deprecated Use {@link #m(boolean,int)} instead + */ + public void m(int i, boolean b); + public void m(boolean b, int i); } \ No newline at end of file Index: resources/ChangeSignature/canModify/A_test18_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_test18_out.java,v retrieving revision 1.3 diff -u -r1.3 A_test18_out.java --- resources/ChangeSignature/canModify/A_test18_out.java 25 Feb 2005 17:27:27 -0000 1.3 +++ resources/ChangeSignature/canModify/A_test18_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,6 +1,12 @@ package p; class A1 implements A{ + /** + * @deprecated Use {@link #m(boolean,int)} instead + */ + public void m(int i, boolean b){ + m(b, i); + } public void m(boolean b, int i){ } private void foo(){ @@ -8,14 +14,31 @@ } } class B extends A1 implements AA{ + /** + * @deprecated Use {@link #m(boolean,int)} instead + */ + public void m(int j, boolean b){ + m(b, j); + } + public void m(boolean b, int j){ m(false, 6); super.m(true, 4); } } interface A { + /** + * @deprecated Use {@link #m(boolean,int)} instead + */ + public void m(int i, boolean b); + public void m(boolean b, int i); } interface AA { + /** + * @deprecated Use {@link #m(boolean,int)} instead + */ + public void m(int xxx, boolean yyy); + public void m(boolean yyy, int xxx); } \ No newline at end of file Index: resources/ChangeSignature/canModify/A_testAddReorderRename34_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testAddReorderRename34_out.java,v retrieving revision 1.4 diff -u -r1.4 A_testAddReorderRename34_out.java --- resources/ChangeSignature/canModify/A_testAddReorderRename34_out.java 25 Feb 2005 17:27:28 -0000 1.4 +++ resources/ChangeSignature/canModify/A_testAddReorderRename34_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,5 +1,12 @@ package p; class A{ + /** + * @deprecated Use {@link #m(boolean,Object,int)} instead + */ + private int m(int iii, boolean j){ + return m(j, null, iii); + } + private int m(boolean jj, Object x, int i){ return m(false, x, m(jj, x, i)); } Index: resources/ChangeSignature/canModify/A_testRenameReorder27_out.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/ChangeSignature/canModify/A_testRenameReorder27_out.java,v retrieving revision 1.3 diff -u -r1.3 A_testRenameReorder27_out.java --- resources/ChangeSignature/canModify/A_testRenameReorder27_out.java 25 Feb 2005 17:27:27 -0000 1.3 +++ resources/ChangeSignature/canModify/A_testRenameReorder27_out.java 3 Jan 2006 09:30:46 -0000 @@ -1,6 +1,13 @@ package p; class A{ + /** + * @deprecated Use {@link #m(int,boolean)} instead + */ + private void m(boolean y, int a){ + m(a, y); + } + private void m(int a, boolean yyy){ m(a, yyy); } Index: resources/DelegateCreator/testm03/out/A.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/DelegateCreator/testm03/out/A.java,v retrieving revision 1.1 diff -u -r1.1 A.java --- resources/DelegateCreator/testm03/out/A.java 16 Dec 2005 13:16:27 -0000 1.1 +++ resources/DelegateCreator/testm03/out/A.java 3 Jan 2006 09:30:46 -0000 @@ -2,20 +2,20 @@ public class A { + /** + * @deprecated Use {@link #foo()} instead + */ @Some @Thing @Else void foo() { - + foo(); } - /** - * @deprecated Use {@link #foo()} instead - */ @Some @Thing @Else void foo() { - foo(); + } } Index: resources/DelegateCreator/testm01/out/A.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/DelegateCreator/testm01/out/A.java,v retrieving revision 1.1 diff -u -r1.1 A.java --- resources/DelegateCreator/testm01/out/A.java 16 Dec 2005 13:16:28 -0000 1.1 +++ resources/DelegateCreator/testm01/out/A.java 3 Jan 2006 09:30:46 -0000 @@ -2,14 +2,14 @@ public class A { - void foo() { - - } - /** * @deprecated Use {@link #foo()} instead */ void foo() { foo(); } + + void foo() { + + } } Index: resources/DelegateCreator/testm06/out/A.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/DelegateCreator/testm06/out/A.java,v retrieving revision 1.1 diff -u -r1.1 A.java --- resources/DelegateCreator/testm06/out/A.java 16 Dec 2005 13:16:28 -0000 1.1 +++ resources/DelegateCreator/testm06/out/A.java 3 Jan 2006 09:30:46 -0000 @@ -2,14 +2,14 @@ public class A { - static void foo() { - - } - /** * @deprecated Use {@link B#bar()} instead */ static void foo() { B.bar(); } + + static void foo() { + + } } Index: resources/DelegateCreator/testm04/out/A.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/DelegateCreator/testm04/out/A.java,v retrieving revision 1.1 diff -u -r1.1 A.java --- resources/DelegateCreator/testm04/out/A.java 16 Dec 2005 13:16:27 -0000 1.1 +++ resources/DelegateCreator/testm04/out/A.java 3 Jan 2006 09:30:46 -0000 @@ -2,14 +2,14 @@ public class A { - void foo() { - - } - /** * @deprecated Use {@link #bar()} instead */ void foo() { bar(); } + + void foo() { + + } } Index: resources/DelegateCreator/testm10/out/A.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/DelegateCreator/testm10/out/A.java,v retrieving revision 1.1 diff -u -r1.1 A.java --- resources/DelegateCreator/testm10/out/A.java 16 Dec 2005 13:16:27 -0000 1.1 +++ resources/DelegateCreator/testm10/out/A.java 3 Jan 2006 09:30:46 -0000 @@ -2,10 +2,10 @@ public interface A { - void foo(); - /** * @deprecated Use {@link #foo()} instead */ void foo(); + + void foo(); } Index: resources/DelegateCreator/testm09/out/A.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/DelegateCreator/testm09/out/A.java,v retrieving revision 1.1 diff -u -r1.1 A.java --- resources/DelegateCreator/testm09/out/A.java 16 Dec 2005 13:16:27 -0000 1.1 +++ resources/DelegateCreator/testm09/out/A.java 3 Jan 2006 09:30:46 -0000 @@ -2,10 +2,10 @@ public abstract class A { - abstract void foo(); - /** * @deprecated Use {@link #foo()} instead */ abstract void foo(); + + abstract void foo(); } Index: resources/DelegateCreator/testm11/out/A.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/DelegateCreator/testm11/out/A.java,v retrieving revision 1.1 diff -u -r1.1 A.java --- resources/DelegateCreator/testm11/out/A.java 16 Dec 2005 13:16:27 -0000 1.1 +++ resources/DelegateCreator/testm11/out/A.java 3 Jan 2006 09:30:46 -0000 @@ -2,12 +2,12 @@ public class A { - A() { } - /** * @deprecated Use {@link #A()} instead */ A() { this(); } + + A() { } } Index: resources/DelegateCreator/testm02/out/A.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/DelegateCreator/testm02/out/A.java,v retrieving revision 1.1 diff -u -r1.1 A.java --- resources/DelegateCreator/testm02/out/A.java 16 Dec 2005 13:16:27 -0000 1.1 +++ resources/DelegateCreator/testm02/out/A.java 3 Jan 2006 09:30:46 -0000 @@ -4,18 +4,18 @@ /** * This is the method foo. + * @deprecated Use {@link #foo()} instead * */ void foo() { - + foo(); } /** * This is the method foo. - * @deprecated Use {@link #foo()} instead * */ void foo() { - foo(); + } } Index: test cases/org/eclipse/jdt/ui/tests/refactoring/ChangeSignatureTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ChangeSignatureTests.java,v retrieving revision 1.70 diff -u -r1.70 ChangeSignatureTests.java --- test cases/org/eclipse/jdt/ui/tests/refactoring/ChangeSignatureTests.java 16 Dec 2005 13:16:26 -0000 1.70 +++ test cases/org/eclipse/jdt/ui/tests/refactoring/ChangeSignatureTests.java 3 Jan 2006 09:30:47 -0000 @@ -207,6 +207,10 @@ helper1(newOrder, signature, null, null); } + private void helper1(String[] newOrder, String[] signature, boolean createDelegate) throws Exception{ + helper1(newOrder, signature, null, null, createDelegate); + } + private void helper1(String[] newOrder, String[] signature, String[] oldNames, String[] newNames) throws Exception{ helper1(newOrder, signature, oldNames, newNames, false); } @@ -728,30 +732,30 @@ } public void test15() throws Exception{ - helper1(new String[]{"b", "i"}, new String[]{"I", "Z"}); + helper1(new String[]{"b", "i"}, new String[]{"I", "Z"}, true); } public void test16() throws Exception{ - helper1(new String[]{"b", "i"}, new String[]{"I", "Z"}); + helper1(new String[]{"b", "i"}, new String[]{"I", "Z"}, true); } public void test17() throws Exception{ //exception because of bug 11151 - helper1(new String[]{"b", "i"}, new String[]{"I", "Z"}); + helper1(new String[]{"b", "i"}, new String[]{"I", "Z"}, true); } public void test18() throws Exception{ //exception because of bug 11151 - helper1(new String[]{"b", "i"}, new String[]{"I", "Z"}); + helper1(new String[]{"b", "i"}, new String[]{"I", "Z"}, true); } public void test19() throws Exception{ // printTestDisabledMessage("bug 7274 - reorder parameters: incorrect when parameters have more than 1 modifiers"); - helper1(new String[]{"b", "i"}, new String[]{"I", "Z"}); + helper1(new String[]{"b", "i"}, new String[]{"I", "Z"}, true); } public void test20() throws Exception{ // printTestDisabledMessage("bug 18147"); - helper1(new String[]{"b", "a"}, new String[]{"I", "[I"}); + helper1(new String[]{"b", "a"}, new String[]{"I", "[I"}, true); } //constructor tests @@ -877,15 +881,15 @@ int newVisibility= JdtFlags.VISIBILITY_CODE_INVALID;//retain int[] deleted= null; String newReturnTypeName= null; - helperDoAll("Query.PoolMessageEvent", "PoolMessageEvent", signature, newParamInfo, newIndices, oldParamNames, newParamNames, null, permutation, newVisibility, deleted, newReturnTypeName); + helperDoAll("Query.PoolMessageEvent", "PoolMessageEvent", signature, newParamInfo, newIndices, oldParamNames, newParamNames, null, permutation, newVisibility, deleted, newReturnTypeName, true); } public void testRenameReorder26() throws Exception{ - helper1(new String[]{"a", "y"}, new String[]{"Z", "I"}, new String[]{"y", "a"}, new String[]{"zzz", "bb"}); + helper1(new String[]{"a", "y"}, new String[]{"Z", "I"}, new String[]{"y", "a"}, new String[]{"zzz", "bb"}, true); } public void testRenameReorder27() throws Exception{ - helper1(new String[]{"a", "y"}, new String[]{"Z", "I"}, new String[]{"y", "a"}, new String[]{"yyy", "a"}); + helper1(new String[]{"a", "y"}, new String[]{"Z", "I"}, new String[]{"y", "a"}, new String[]{"yyy", "a"}, true); } public void testAdd28()throws Exception{ @@ -895,7 +899,7 @@ String[] newDefaultValues= {"0"}; ParameterInfo[] newParamInfo= createNewParamInfos(newTypes, newNames, newDefaultValues); int[] newIndices= {1}; - helperAdd(signature, newParamInfo, newIndices); + helperAdd(signature, newParamInfo, newIndices, true); } public void testAdd29()throws Exception{ @@ -905,7 +909,7 @@ String[] newDefaultValues= {"0"}; ParameterInfo[] newParamInfo= createNewParamInfos(newTypes, newNames, newDefaultValues); int[] newIndices= {0}; - helperAdd(signature, newParamInfo, newIndices); + helperAdd(signature, newParamInfo, newIndices, true); } public void testAdd30()throws Exception{ @@ -915,7 +919,7 @@ String[] newDefaultValues= {"0"}; ParameterInfo[] newParamInfo= createNewParamInfos(newTypes, newNames, newDefaultValues); int[] newIndices= {1}; - helperAdd(signature, newParamInfo, newIndices); + helperAdd(signature, newParamInfo, newIndices, true); } public void testAdd31()throws Exception{ @@ -925,7 +929,7 @@ String[] newDefaultValues= {"0"}; ParameterInfo[] newParamInfo= createNewParamInfos(newTypes, newNames, newDefaultValues); int[] newIndices= {1}; - helperAdd(signature, newParamInfo, newIndices); + helperAdd(signature, newParamInfo, newIndices, true); } public void testAdd32()throws Exception{ @@ -935,7 +939,7 @@ String[] newDefaultValues= {"0"}; ParameterInfo[] newParamInfo= createNewParamInfos(newTypes, newNames, newDefaultValues); int[] newIndices= {0}; - helperAdd(signature, newParamInfo, newIndices); + helperAdd(signature, newParamInfo, newIndices, true); } public void testAdd33()throws Exception{ @@ -945,7 +949,7 @@ String[] newDefaultValues= {"0"}; ParameterInfo[] newParamInfo= createNewParamInfos(newTypes, newNames, newDefaultValues); int[] newIndices= {0}; - helperAdd(signature, newParamInfo, newIndices); + helperAdd(signature, newParamInfo, newIndices, true); } public void testAddReorderRename34()throws Exception{ @@ -962,7 +966,7 @@ int[] deletedIndices= null; int newVisibility= JdtFlags.VISIBILITY_CODE_INVALID;//retain String newReturnTypeName= null; - helperDoAll("A", "m", signature, newParamInfo, newIndices, oldParamNames, newParamNames, null, permutation, newVisibility, deletedIndices, newReturnTypeName); + helperDoAll("A", "m", signature, newParamInfo, newIndices, oldParamNames, newParamNames, null, permutation, newVisibility, deletedIndices, newReturnTypeName, true); } public void testAll35()throws Exception{ @@ -1081,7 +1085,7 @@ int[] deletedIndices= {0}; int newVisibility= Modifier.NONE; String newReturnTypeName= null; - helperDoAll("A", "m", signature, newParamInfo, newIndices, oldParamNames, newParamNames, null, permutation, newVisibility, deletedIndices, newReturnTypeName); + helperDoAll("A", "m", signature, newParamInfo, newIndices, oldParamNames, newParamNames, null, permutation, newVisibility, deletedIndices, newReturnTypeName, true); } public void testAll42()throws Exception{ @@ -1115,7 +1119,7 @@ int[] deletedIndices= {0}; int newVisibility= Modifier.NONE; String newReturnTypeName= null; - helperDoAll("A", "m", signature, newParamInfo, newIndices, oldParamNames, newParamNames, null, permutation, newVisibility, deletedIndices, newReturnTypeName); + helperDoAll("A", "m", signature, newParamInfo, newIndices, oldParamNames, newParamNames, null, permutation, newVisibility, deletedIndices, newReturnTypeName, true); } public void testAll44()throws Exception{ @@ -1511,7 +1515,7 @@ String[] newDefaultValues= {"true"}; ParameterInfo[] newParamInfo= createNewParamInfos(newTypes, newNames, newDefaultValues); int[] newIndices= {1}; - helperAdd(signature, newParamInfo, newIndices); + helperAdd(signature, newParamInfo, newIndices, true); } public void testException01() throws Exception { @@ -1824,7 +1828,7 @@ int[] deletedIndices= {}; int newVisibility= Modifier.PUBLIC; String newReturnTypeName= null; - helperDoAll("A", "m", signature, newParamInfo, newIndices, oldParamNames, newParamNames, null, permutation, newVisibility, deletedIndices, newReturnTypeName); + helperDoAll("A", "m", signature, newParamInfo, newIndices, oldParamNames, newParamNames, null, permutation, newVisibility, deletedIndices, newReturnTypeName, true); } public void testVararg03() throws Exception { @@ -1876,7 +1880,7 @@ int[] deletedIndices= {1}; int newVisibility= Modifier.PUBLIC; String newReturnTypeName= null; - helperDoAll("A", "use", signature, newParamInfo, newIndices, oldParamNames, newParamNames, null, permutation, newVisibility, deletedIndices, newReturnTypeName); + helperDoAll("A", "use", signature, newParamInfo, newIndices, oldParamNames, newParamNames, null, permutation, newVisibility, deletedIndices, newReturnTypeName, true); } public void testVararg06() throws Exception { @@ -1912,7 +1916,7 @@ int[] deletedIndices= { 1 }; int newVisibility= Modifier.PUBLIC; String newReturnTypeName= null; - helperDoAll("A", "m", signature, newParamInfo, newIndices, oldParamNames, newParamNames, null, permutation, newVisibility, deletedIndices, newReturnTypeName); + helperDoAll("A", "m", signature, newParamInfo, newIndices, oldParamNames, newParamNames, null, permutation, newVisibility, deletedIndices, newReturnTypeName, true); } public void testVararg08() throws Exception { @@ -1984,7 +1988,7 @@ int[] deletedIndices= { }; int newVisibility= Modifier.NONE; String newReturnTypeName= null; - helperDoAll("A", "m", signature, newParamInfo, newIndices, oldParamNames, newParamNames, newParameterTypeNames, permutation, newVisibility, deletedIndices, newReturnTypeName); + helperDoAll("A", "m", signature, newParamInfo, newIndices, oldParamNames, newParamNames, newParameterTypeNames, permutation, newVisibility, deletedIndices, newReturnTypeName, true); } public void testGenerics02() throws Exception { @@ -2040,25 +2044,25 @@ String newReturnTypeName= null; helperDoAll("A", "m", signature, newParamInfo, newIndices, oldParamNames, newParamNames, newParameterTypeNames, permutation, newVisibility, deletedIndices, newReturnTypeName); } - - public void testGenerics05() throws Exception { - String[] signature= {"QClass;"}; - String[] newNames= {}; - String[] newTypes= {}; - String[] newDefaultValues= {}; - ParameterInfo[] newParamInfo= createNewParamInfos(newTypes, newNames, newDefaultValues); - int[] newIndices= {}; - - String[] oldParamNames= { "arg" }; - String[] newParamNames= { "arg" }; - String[] newParameterTypeNames= {"Class"}; - int[] permutation= {0}; - int[] deletedIndices= {}; - int newVisibility= Modifier.PUBLIC; - String newReturnTypeName= null; - helperDoAll("I", "test", signature, newParamInfo, newIndices, oldParamNames, newParamNames, newParameterTypeNames, permutation, newVisibility, deletedIndices, newReturnTypeName); - } + public void testGenerics05() throws Exception { + String[] signature= { "QClass;" }; + String[] newNames= {}; + String[] newTypes= {}; + String[] newDefaultValues= {}; + ParameterInfo[] newParamInfo= createNewParamInfos(newTypes, newNames, newDefaultValues); + int[] newIndices= {}; + + String[] oldParamNames= { "arg" }; + String[] newParamNames= { "arg" }; + String[] newParameterTypeNames= { "Class" }; + int[] permutation= { 0 }; + int[] deletedIndices= {}; + int newVisibility= Modifier.PUBLIC; + String newReturnTypeName= null; + helperDoAll("I", "test", signature, newParamInfo, newIndices, oldParamNames, newParamNames, newParameterTypeNames, permutation, + newVisibility, deletedIndices, newReturnTypeName); + } public void testDelegate01() throws Exception { // simple reordering with delegate Index: resources/DelegateCreator/testm05/out/A.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/DelegateCreator/testm05/out/A.java,v retrieving revision 1.1 diff -u -r1.1 A.java --- resources/DelegateCreator/testm05/out/A.java 16 Dec 2005 13:16:26 -0000 1.1 +++ resources/DelegateCreator/testm05/out/A.java 3 Jan 2006 09:30:46 -0000 @@ -2,14 +2,14 @@ public class A { - static void foo() { - - } - /** * @deprecated Use {@link B#foo()} instead */ static void foo() { B.foo(); } + + static void foo() { + + } } Index: resources/DelegateCreator/testm07/out/A.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/DelegateCreator/testm07/out/A.java,v retrieving revision 1.1 diff -u -r1.1 A.java --- resources/DelegateCreator/testm07/out/A.java 16 Dec 2005 13:16:28 -0000 1.1 +++ resources/DelegateCreator/testm07/out/A.java 3 Jan 2006 09:30:46 -0000 @@ -2,14 +2,14 @@ public class A { - static void /*abstract*/ foo(String/*aaa*/a,/*x*/String/*bar*/ b/*foo*/) /*foo*/{ - - }//bar - /** * @deprecated Use {@link #bar(String,String)} instead */ static void /*abstract*/ foo(String/*aaa*/a,/*x*/String/*bar*/ b/*foo*/) /*foo*/{ bar(a, b); }//bar + + static void /*abstract*/ foo(String/*aaa*/a,/*x*/String/*bar*/ b/*foo*/) /*foo*/{ + + }//bar } Index: resources/DelegateCreator/testm08/out/A.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests.refactoring/resources/DelegateCreator/testm08/out/A.java,v retrieving revision 1.1 diff -u -r1.1 A.java --- resources/DelegateCreator/testm08/out/A.java 16 Dec 2005 13:16:27 -0000 1.1 +++ resources/DelegateCreator/testm08/out/A.java 3 Jan 2006 09:30:46 -0000 @@ -4,12 +4,12 @@ public class A { - static void foo() { } - /** * @deprecated Use {@link E#foo()} instead */ static void foo() { E.foo(); } + + static void foo() { } }