~ubuntu-branches/ubuntu/quantal/netbeans/quantal

« back to all changes in this revision

Viewing changes to java/helpset/javahelp/org/netbeans/modules/java/helpset/docs/refactor/csh/extract-interface_db.html

  • Committer: Bazaar Package Importer
  • Author(s): Marek Slama
  • Date: 2008-01-29 14:11:22 UTC
  • Revision ID: james.westby@ubuntu.com-20080129141122-fnzjbo11ntghxfu7
Tags: upstream-6.0.1
ImportĀ upstreamĀ versionĀ 6.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<!--
 
3
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
 
4
* Use is subject to license terms.
 
5
-->
 
6
<html>
 
7
    <head>
 
8
        <title>Extract Interface Dialog Box</title>
 
9
        <link rel="StyleSheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
 
10
    </head>
 
11
    <body>
 
12
        <h2>Extract Interface Dialog Box</h2>
 
13
        <p><small> <a href="#seealso">See Also</a> </small></p>
 
14
        <p>Use this dialog box to specify options for the Extract Interface refactoring command.
 
15
        You can use the Extract Interface command to create a new interface based 
 
16
        on public non-static methods in the selected class. When you 
 
17
        use this operation, a new interface is created containing declarations for the 
 
18
        the methods that you select to include in the interface. In addition, the current class 
 
19
        is set to implement the new interface.</p>
 
20
       
 
21
        <p>You can open the Extract Interface dialog box by choosing Refactor &gt; Extract Interface 
 
22
            after you have selected a class in the Source Editor, Projects window, or Files window. 
 
23
        </p>
 
24
 
 
25
        <p>The dialog box has the following fields:</p>
 
26
        <ul>
 
27
            <li><b>Interface Name.</b> Contains the name of the interface 
 
28
                to be created.
 
29
            </li>
 
30
            <li><b>Members to Extract.</b> List of methods and interfaces that you can include in 
 
31
                the new interface. Select the checkbox of each method that you want to include in the interface. 
 
32
                <p>Only <tt>public</tt> and non-static methods appear in this list.</p>
 
33
                <p>If the class from which you are extracting an interface already 
 
34
                implements an interface, the implemented interface is also listed. 
 
35
                If you select the checkbox for that 
 
36
                interface, the <tt>implements</tt> clause for that new 
 
37
                interface is moved to the new interface that you are extracting.</p>
 
38
            </li>
 
39
 
 
40
           
 
41
        </ul>
 
42
 
 
43
        <p>If you want to preview the changes, you need to follow these steps 
 
44
        to complete the refactoring:</p>
 
45
        <ol>
 
46
            <li>Click Preview. 
 
47
                <p>The Refactoring 
 
48
                window opens and displays a tree view of the code to be affected by the refactoring.</p>
 
49
            </li>
 
50
            <li>Check the items displayed in the Refactoring window to make sure that you want them 
 
51
            all changed. Clear the checkbox next to any parts of the code that 
 
52
            you do not want changed.
 
53
            <li>Click Do Refactoring.</li>
 
54
        </ol>        
 
55
        
 
56
        <ul class="note">
 
57
            <li>You should always perform a clean build after completing
 
58
                any refactoring commands. You can do a clean build by right-clicking the project's 
 
59
                node in the Projects window and choosing Clean and Build Project.
 
60
            </li>
 
61
        </ul>
 
62
 
 
63
        <dl>
 
64
            <dt><a name="seealso">See Also</a></dt>
 
65
            <dd><a href="../aboutRefactoring.html">About Refactoring</a></dd>
 
66
            <dd><a href="../refactorQuickRef.html">Refactoring: Quick Reference</a>
 
67
            <dd><a href="../undo.html">Undoing Refactoring Changes</a></dd>
 
68
        </dl>
 
69
        <hr>
 
70
        <small><a href="../../credits.html">Legal Notices</a></small>
 
71
        <table cellpadding="50" border="0">
 
72
            <tr>
 
73
                <td>&nbsp;</td>
 
74
            </tr>
 
75
        </table>
 
76
    </body>
 
77
</html>