This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 200232
Collapse All | Expand All

(-)a/refactoring.java/apichanges.xml (+89 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
5
Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
6
7
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
8
Other names may be trademarks of their respective owners.
9
10
11
The contents of this file are subject to the terms of either the GNU
12
General Public License Version 2 only ("GPL") or the Common
13
Development and Distribution License("CDDL") (collectively, the
14
"License"). You may not use this file except in compliance with the
15
License. You can obtain a copy of the License at
16
http://www.netbeans.org/cddl-gplv2.html
17
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
18
specific language governing permissions and limitations under the
19
License.  When distributing the software, include this License Header
20
Notice in each file and include the License file at
21
nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
22
particular file as subject to the "Classpath" exception as provided
23
by Oracle in the GPL Version 2 section of the License file that
24
accompanied this code. If applicable, add the following below the
25
License Header, with the fields enclosed by brackets [] replaced by
26
your own identifying information:
27
"Portions Copyrighted [year] [name of copyright owner]"
28
29
Contributor(s):
30
31
The Original Software is NetBeans. The Initial Developer of the Original
32
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
33
Microsystems, Inc. All Rights Reserved.
34
35
If you wish your version of this file to be governed by only the CDDL
36
or only the GPL Version 2, indicate your decision by adding
37
"[Contributor] elects to include this software in this distribution
38
under the [CDDL or GPL Version 2] license." If you do not indicate a
39
single choice of license, a recipient has the option to distribute
40
your version of this file under either the CDDL, the GPL Version 2 or
41
to extend the choice of license to its licensees as provided above.
42
However, if you add GPL Version 2 code and therefore, elected the GPL
43
Version 2 license, then the option applies only if the new code is
44
made subject to such option by the copyright holder.
45
-->
46
<!DOCTYPE apichanges PUBLIC "-//NetBeans//DTD API changes list 1.0//EN" "../nbbuild/javadoctools/apichanges.dtd">
47
<apichanges>
48
<apidefs>
49
    <apidef name="JavaRefactoringAPI">Java Refactoring API</apidef>
50
</apidefs>
51
<changes>
52
    <change id="ChangeParameters">
53
        <api name="refactoring"/>
54
        <summary>Method name and return type added, to allow them to be changed from the refactoring.</summary>
55
        <version major="1" minor="18"/>
56
        <date day="19" month="7" year="2011"/>
57
        <author login="ralphbenjamin"/>
58
        <compatibility addition="yes"/>
59
        <description>
60
            <p>
61
                The Change Method Parameters refactoring should be changed to
62
                allow changing the method signature. The api needs to store the
63
                new name for the method, if the method needs to be renamed, and
64
                it needs to store the new return type, if the return type needs
65
                to be changed.
66
            </p>    
67
        </description>
68
        <class package="org.netbeans.modules.refactoring.java.api" name="ChangeParametersRefactoring"/>
69
        <issue number="200232"/>
70
    </change>
71
</changes>
72
    <htmlcontents>
73
        <head>
74
            <title>Change History for the Java Refactoring API</title>
75
            <link rel="stylesheet" href="prose.css" type="text/css"/>
76
        </head>
77
        <body>
78
            <p class="overviewlink"><a href="overview-summary.html">Overview</a></p>
79
            <h1>Introduction</h1>
80
            <p>This document lists changes made to the Java Refactoring API.</p>
81
            
82
            <!-- The actual lists of changes, as summaries and details: -->
83
            <hr/>
84
            <standard-changelists module-code-name="$codebase"/>
85
            
86
            <hr/><p>@FOOTER@</p>
87
        </body>
88
    </htmlcontents>
89
</apichanges>
(-)a/refactoring.java/nbproject/project.properties (-1 / +1 lines)
Lines 1-7 Link Here
1
javac.source=1.6
1
javac.source=1.6
2
javadoc.arch=${basedir}/arch.xml
2
javadoc.arch=${basedir}/arch.xml
3
3
4
spec.version.base=1.24.0
4
spec.version.base=1.25.0
5
#test configs
5
#test configs
6
test.config.find.includes=\
6
test.config.find.includes=\
7
    **/FindUsagesSuite.class
7
    **/FindUsagesSuite.class
(-)a/refactoring.java/src/org/netbeans/modules/refactoring/java/api/ChangeParametersRefactoring.java (+45 lines)
Lines 45-50 Link Here
45
45
46
import java.util.Set;
46
import java.util.Set;
47
import javax.lang.model.element.Modifier;
47
import javax.lang.model.element.Modifier;
48
import org.netbeans.api.annotations.common.CheckForNull;
49
import org.netbeans.api.annotations.common.NullAllowed;
48
import org.netbeans.api.java.source.TreePathHandle;
50
import org.netbeans.api.java.source.TreePathHandle;
49
import org.netbeans.modules.refactoring.api.AbstractRefactoring;
51
import org.netbeans.modules.refactoring.api.AbstractRefactoring;
50
import org.openide.util.lookup.Lookups;
52
import org.openide.util.lookup.Lookups;
Lines 61-66 Link Here
61
 * @author  Pavel Flaska
63
 * @author  Pavel Flaska
62
 * @author  Tomas Hurka
64
 * @author  Tomas Hurka
63
 * @author  Jan Becicka
65
 * @author  Jan Becicka
66
 * @author  Ralph Ruijs
64
 */
67
 */
65
public final class ChangeParametersRefactoring extends AbstractRefactoring {
68
public final class ChangeParametersRefactoring extends AbstractRefactoring {
66
    
69
    
Lines 70-75 Link Here
70
    private ParameterInfo[] paramTable;
73
    private ParameterInfo[] paramTable;
71
    // new modifier
74
    // new modifier
72
    private Set<Modifier> modifiers;
75
    private Set<Modifier> modifiers;
76
    private String methodName;
77
    private String returnType;
73
    
78
    
74
    /**
79
    /**
75
     * Creates a new instance of change parameters refactoring.
80
     * Creates a new instance of change parameters refactoring.
Lines 97-102 Link Here
97
    }
102
    }
98
    
103
    
99
    /**
104
    /**
105
     * Get the new return type.
106
     * 
107
     * @return returnType, null if it will not change
108
     * @since 1.25
109
     */
110
    public @CheckForNull String getReturnType() {
111
        return returnType;
112
    }
113
114
    /**
115
     * Get the new method name.
116
     * 
117
     * @return methodName, null if it will no change
118
     * @since 1.25
119
     */
120
    public @CheckForNull String getMethodName() {
121
        return methodName;
122
    }
123
124
    /**
100
     * Sets new parameters for a method
125
     * Sets new parameters for a method
101
     * @param paramTable new parameters
126
     * @param paramTable new parameters
102
     */
127
     */
Lines 112-117 Link Here
112
        this.modifiers = modifiers;
137
        this.modifiers = modifiers;
113
    }
138
    }
114
    
139
    
140
    /**
141
     * Sets the new method name.
142
     * 
143
     * @param methodName the new method name, null if it does not change
144
     * @since 1.25
145
     */
146
    public void setMethodName(@NullAllowed String methodName) {
147
        this.methodName = methodName;
148
    }
149
150
    /**
151
     * Sets the new return type for the method.
152
     * 
153
     * @param returnType the return type to set, null if it does not change
154
     * @since 1.25
155
     */
156
    public void setReturnType(@NullAllowed String returnType) {
157
        this.returnType = returnType;
158
    }
159
    
115
    ////////////////////////////////////////////////////////////////////////////
160
    ////////////////////////////////////////////////////////////////////////////
116
    // INNER CLASSES
161
    // INNER CLASSES
117
    ////////////////////////////////////////////////////////////////////////////
162
    ////////////////////////////////////////////////////////////////////////////

Return to bug 200232