KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > web > jsf > refactoring > JSFSafeDeletePlugin


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.web.jsf.refactoring;
21
22 //TODO: RETOUCHE refactoring
23

24 /**
25  *
26  * @author Petr Pisl
27  */

28 public class JSFSafeDeletePlugin /*implements RefactoringPlugin*/{
29     
30 // /** This one is important creature - makes sure that cycles between plugins won't appear */
31
// private static ThreadLocal semafor = new ThreadLocal();
32
//
33
// private SafeDeleteRefactoring refactoring;
34
//
35
// private static final ErrorManager err =
36
// ErrorManager.getDefault().getInstance("org.netbeans.modules.web.jsf.refactoring"); // NOI18N
37
//
38
//
39
//
40
// /** Creates a new instance of JSFWhereUsedPlugin */
41
// public JSFSafeDeletePlugin(SafeDeleteRefactoring refactoring) {
42
// this.refactoring = refactoring;
43
// }
44
//
45
// public Problem preCheck() {
46
// return null;
47
// }
48
//
49
// public Problem checkParameters() {
50
// return null;
51
// }
52
//
53
// public Problem fastCheckParameters() {
54
// return null;
55
// }
56
//
57
// public void cancelRequest() {
58
// }
59
//
60
// public Problem prepare(RefactoringElementsBag refactoringElements) {
61
// if (semafor.get() == null) {
62
// semafor.set(new Object());
63
// Element[] elements = refactoring.getElementsToDelete();
64
// for (int i = 0; i < elements.length; i++) {
65
// if (elements[i] instanceof JavaClass){
66
// JavaClass jClass = (JavaClass) elements[i];
67
// List <Occurrences.OccurrenceItem> items = Occurrences.getAllOccurrences(jClass, "");
68
// for (Occurrences.OccurrenceItem item : items) {
69
// refactoringElements.add(refactoring, new JSFSafeDeleteClassElement(item));
70
// }
71
// }
72
//
73
// }
74
// semafor.set(null);
75
// }
76
// return null;
77
// }
78
//
79
//
80
// public static class JSFSafeDeleteClassElement extends SimpleRefactoringElementImpl implements ExternalChange {
81
// private Occurrences.OccurrenceItem item;
82
//
83
// JSFSafeDeleteClassElement(Occurrences.OccurrenceItem item){
84
// this.item = item;
85
// }
86
//
87
// public String getText() {
88
// return getDisplayText();
89
// }
90
//
91
// public String getDisplayText() {
92
// return item.getRenameMessage();
93
// }
94
//
95
// public void performChange() {
96
// JavaMetamodel.getManager().registerExtChange(this);
97
// }
98
//
99
// public void performExternalChange() {
100
// item.performSafeDelete();
101
// }
102
//
103
// public void undoExternalChange() {
104
// item.undoSafeDelete();
105
// }
106
//
107
// public Element getJavaElement() {
108
// return null;
109
// }
110
//
111
// public FileObject getParentFile() {
112
// return item.getConfigDO().getPrimaryFile();
113
// }
114
//
115
// public PositionBounds getPosition() {
116
// return item.getElementDefinitionPosition();
117
// }
118
// }
119
}
120
Popular Tags