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 205696
Collapse All | Expand All

(-)a/refactoring.api/src/org/netbeans/modules/refactoring/api/MoveRefactoring.java (-1 / +3 lines)
Lines 58-64 Link Here
58
 * @see AbstractRefactoring
58
 * @see AbstractRefactoring
59
 * @see RefactoringSession
59
 * @see RefactoringSession
60
 * @author Jan Becicka
60
 * @author Jan Becicka
61
 */
61
  */
62
public final class MoveRefactoring extends AbstractRefactoring {
62
public final class MoveRefactoring extends AbstractRefactoring {
63
63
64
    private Lookup target;
64
    private Lookup target;
Lines 70-75 Link Here
70
     *   <tr><th>Module</th><th>Types the Module Understands</th><th>Implementation</th></tr>
70
     *   <tr><th>Module</th><th>Types the Module Understands</th><th>Implementation</th></tr>
71
     *   <tr><td>Refactoring API (Default impl.)</td><td>{@link org.openide.filsuystems.FileObject}(s)</td><td>Does file(s) move</td></tr>
71
     *   <tr><td>Refactoring API (Default impl.)</td><td>{@link org.openide.filsuystems.FileObject}(s)</td><td>Does file(s) move</td></tr>
72
     *   <tr><td>Java Refactoring</td><td>{@link org.openide.filsuystems.FileObject}(s) with content type text/x-java</td><td>Does refactoring inside .java files</td></tr>
72
     *   <tr><td>Java Refactoring</td><td>{@link org.openide.filsuystems.FileObject}(s) with content type text/x-java</td><td>Does refactoring inside .java files</td></tr>
73
     *   <tr><td></td><td>{@link org.netbeans.api.java.source.TreePathHandle}(s)</td><td>Does refactoring of members in .java files</td></tr>
73
     * </table>
74
     * </table>
74
     * @param objectsToMove store your objects into Lookup
75
     * @param objectsToMove store your objects into Lookup
75
     */
76
     */
Lines 86-91 Link Here
86
     *        <td>Creates direstory corresponding to specified {@link java.net.URL} if does not 
87
     *        <td>Creates direstory corresponding to specified {@link java.net.URL} if does not 
87
     *            exist and moves all FileObjects into this folder.</td></tr>
88
     *            exist and moves all FileObjects into this folder.</td></tr>
88
     *   <tr><td>Java Refactoring</td><td>{@link java.net.URL}</td><td>Does move refactoring inside .java files</td></tr>
89
     *   <tr><td>Java Refactoring</td><td>{@link java.net.URL}</td><td>Does move refactoring inside .java files</td></tr>
90
     *   <tr><td></td><td>{@link org.netbeans.api.java.source.TreePathHandle}</td><td>Does refactoring of members in .java files</td></tr>
89
     * </table>
91
     * </table>
90
     * @param target
92
     * @param target
91
     */
93
     */
(-)a/refactoring.java/apichanges.xml (+15 lines)
Lines 49-54 Link Here
49
    <apidef name="JavaRefactoringAPI">Java Refactoring API</apidef>
49
    <apidef name="JavaRefactoringAPI">Java Refactoring API</apidef>
50
</apidefs>
50
</apidefs>
51
<changes>
51
<changes>
52
    <change id="JavaMoveMembersProperties">
53
            <api name="refactoring"/>
54
            <summary>Added new Move Members Properties.</summary>
55
            <version major="1" minor="31"/>
56
            <date day="30" month="11" year="2011"/>
57
            <author login="ralphbenjamin"/>
58
            <compatibility addition="yes"/>
59
            <description>
60
                <p>
61
                    Add an api for the Java Move Members Properties.
62
                </p>    
63
            </description>
64
            <class package="org.netbeans.modules.refactoring.java.api" name="JavaMoveMembersProperties"/>
65
            <issue number="205696"/>
66
    </change>
52
    <change id="IntroduceParameterRefactoring">
67
    <change id="IntroduceParameterRefactoring">
53
            <api name="refactoring"/>
68
            <api name="refactoring"/>
54
            <summary>Added new refactoring and dependent change in ChangeParameterRefactoring.</summary>
69
            <summary>Added new refactoring and dependent change in ChangeParameterRefactoring.</summary>
(-)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.30.0
4
spec.version.base=1.31.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/JavaMoveMembersProperties.java (+182 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2011 Sun Microsystems, Inc.
41
 */
42
package org.netbeans.modules.refactoring.java.api;
43
44
import org.netbeans.modules.refactoring.api.MoveRefactoring;
45
46
/**
47
 * This class is just holder for properties of the Java Move Members
48
 * Refactoring. Refactoring itself is implemented in plugins.
49
 *
50
 * @see org.netbeans.modules.refactoring.api.MoveRefactoring
51
 * @see org.netbeans.modules.refactoring.api.Context
52
 * @author Ralph Ruijs
53
 * @since 1.31
54
 */
55
public final class JavaMoveMembersProperties {
56
57
    private Visibility visibility;
58
    private boolean delegate;
59
    private boolean addDeprecated;
60
    private boolean updateJavaDoc;
61
62
    /**
63
     * Constructs a new JavaMoveMembersProperties object.
64
     */
65
    public JavaMoveMembersProperties() {
66
        visibility = Visibility.ESCALATE;
67
        delegate = false;
68
        addDeprecated = false;
69
        updateJavaDoc = true;
70
    }
71
72
    /**
73
     * The new visibility of the members.
74
     *
75
     * @return visibility
76
     */
77
    public Visibility getVisibility() {
78
        return visibility;
79
    }
80
81
    /**
82
     * The new visibility of the members.
83
     *
84
     * @param visibility the visibility to use
85
     */
86
    public void setVisibility(Visibility visibility) {
87
        this.visibility = visibility;
88
    }
89
90
    /**
91
     * Leave the old method in place and let it delegate to the new location.
92
     * All references to the method will not be touched.
93
     *
94
     * @return true if the old method will delegate to the new location, false
95
     * otherwise
96
     */
97
    public boolean isDelegate() {
98
        return delegate;
99
    }
100
101
    /**
102
     * Leave the old method in place and let it delegate to the new location.
103
     * All references to the method will not be touched.
104
     *
105
     * @param delegate true if the old method needs delegate to the new location
106
     */
107
    public void setDelegate(boolean delegate) {
108
        this.delegate = delegate;
109
    }
110
111
    /**
112
     * Add a deprecated tag to the JavaDoc of the delegating method.
113
     *
114
     * @return true if a deprecated tag needs to be added, false otherwise
115
     */
116
    public boolean isAddDeprecated() {
117
        return addDeprecated;
118
    }
119
120
    /**
121
     * Add a deprecated tag to the JavaDoc of the delegating method.
122
     *
123
     * @param addDeprecated true if a deprecated tag has to be added to the
124
     * delegate method
125
     */
126
    public void setAddDeprecated(boolean addDeprecated) {
127
        this.addDeprecated = addDeprecated;
128
    }
129
130
    /**
131
     * Update or create the JavaDoc for moved methods.
132
     *
133
     * @return true if JavaDoc will be created or the existing will be updated,
134
     * false otherwise
135
     */
136
    public boolean isUpdateJavaDoc() {
137
        return updateJavaDoc;
138
    }
139
140
    /**
141
     * Add a deprecated tag to the javadoc of the delegating method.
142
     *
143
     * @param updateJavaDoc true if the method's JavaDoc needs to be created or
144
     * updated.
145
     */
146
    public void setUpdateJavaDoc(boolean updateJavaDoc) {
147
        this.updateJavaDoc = updateJavaDoc;
148
    }
149
150
    /**
151
     * Used to specify visibility level. It can either be set explicitly, or set
152
     * to Escalate to automatically raise it to a necessary level.
153
     */
154
    public static enum Visibility {
155
156
        /**
157
         * Escalate, automatically raise the visibility to a necessary level,
158
         * based on usages.
159
         */
160
        ESCALATE,
161
        /**
162
         * As is, keep the current visibility level of the member.
163
         */
164
        ASIS,
165
        /**
166
         * Change to, or keep, the visibility public.
167
         */
168
        PUBLIC,
169
        /**
170
         * Change to, or keep, the visibility protected.
171
         */
172
        PROTECTED,
173
        /**
174
         * Change to, or keep, the visibility the default level.
175
         */
176
        DEFAULT,
177
        /**
178
         * Change to, or keep, the visibility private.
179
         */
180
        PRIVATE
181
    }
182
}

Return to bug 205696