KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > refactoring > java > api > ui > JavaRefactoringActionsFactory


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.refactoring.java.api.ui;
21
22 import org.netbeans.modules.refactoring.java.ui.ExtractInterfaceAction;
23 import org.openide.util.ContextAwareAction;
24
25 /**
26  * Factory class providing instances of refactoring actions.
27  * <p><b>Usage:</b></p>
28  * <pre>
29  * InstanceContent ic = new InstanceContent();
30  * ic.add(node);
31  * Lookup l = new AbstractLookup(ic);
32  * Action a = RefactoringActionsFactory.encapsulateFieldsAction().createContextAwareInstance(l);
33  * a.actionPerformed(RefactoringActionsFactory.DEFAULT_EVENT);
34  * </pre>
35  *
36  * For help on creating and registering actions
37  * See <a HREF=http://wiki.netbeans.org/wiki/view/RefactoringFAQ>Refactoring FAQ</a>
38  *
39  * @author Jan Becicka
40  */

41 public final class JavaRefactoringActionsFactory {
42     
43     private JavaRefactoringActionsFactory(){}
44     
45    /**
46      * Factory method for EncapsulateFieldsAction
47      * @return an instance of EncapsulateFieldsAction
48      */

49     public static ContextAwareAction encapsulateFieldsAction() {
50         throw new UnsupportedOperationException JavaDoc("Not supported yet.");
51 // return (EncapsulateFieldAction) EncapsulateFieldAction.findObject(EncapsulateFieldAction.class, true);
52
}
53     
54     /**
55      * Factory method for ChangeParametersAction
56      * @return an instance of ChangeParametersAction
57      */

58     public static ContextAwareAction changeParametersAction() {
59         throw new UnsupportedOperationException JavaDoc("Not supported yet.");
60 // return (ChangeParametersAction) ChangeParametersAction.findObject(ChangeParametersAction.class, true);
61
}
62     
63     
64     /**
65      * Factory method for PullUpAction
66      * @return an instance of PullUpAction
67      */

68     public static ContextAwareAction pullUpAction() {
69         throw new UnsupportedOperationException JavaDoc("Not supported yet.");
70 // return (PullUpAction) PullUpAction.findObject(PullUpAction.class, true);
71
}
72     
73     /**
74      * Factory method for PushDownAction
75      * @return an instance of PushDownAction
76      */

77     public static ContextAwareAction pushDownAction() {
78         throw new UnsupportedOperationException JavaDoc("Not supported yet.");
79 // return (PushDownAction) PushDownAction.findObject(PushDownAction.class, true);
80
}
81     
82     /**
83      * Factory method for InnerToOuterAction
84      * @return an instance of InnerToOuterAction
85      */

86     public static ContextAwareAction innerToOuterAction() {
87         throw new UnsupportedOperationException JavaDoc("Not supported yet.");
88 // return (InnerToOuterAction) InnerToOuterAction.findObject(InnerToOuterAction.class, true);
89
}
90
91     /**
92      * Factory method for UseSuperTypeAction
93      * @return an instance of UseSuperTypeAction
94      */

95     public static ContextAwareAction useSuperTypeAction() {
96         throw new UnsupportedOperationException JavaDoc("Not supported yet.");
97 // return (UseSuperTypeAction) UseSuperTypeAction.findObject(UseSuperTypeAction.class, true);
98
}
99     
100     public static ContextAwareAction extractSuperclassAction() {
101         throw new UnsupportedOperationException JavaDoc("Not supported yet.");
102     }
103     
104     public static ContextAwareAction extractInterfaceAction() {
105         return (ExtractInterfaceAction) ExtractInterfaceAction.findObject(ExtractInterfaceAction.class, true);
106     }
107 }
108
Popular Tags