KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > ui > refactoring > IRefactoringProcessorIds


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.ui.refactoring;
12
13 import org.eclipse.core.runtime.IProgressMonitor;
14
15 import org.eclipse.core.resources.IResourceVisitor;
16 import org.eclipse.core.resources.mapping.ResourceMapping;
17 import org.eclipse.core.resources.mapping.ResourceMappingContext;
18
19 import org.eclipse.ltk.core.refactoring.IResourceMapper;
20
21 import org.eclipse.jdt.core.refactoring.IJavaElementMapper;
22
23 import org.eclipse.jdt.internal.corext.refactoring.rename.RenameCompilationUnitProcessor;
24 import org.eclipse.jdt.internal.corext.refactoring.rename.RenameEnumConstProcessor;
25 import org.eclipse.jdt.internal.corext.refactoring.rename.RenameFieldProcessor;
26 import org.eclipse.jdt.internal.corext.refactoring.rename.RenameJavaProjectProcessor;
27 import org.eclipse.jdt.internal.corext.refactoring.rename.RenameMethodProcessor;
28 import org.eclipse.jdt.internal.corext.refactoring.rename.RenamePackageProcessor;
29 import org.eclipse.jdt.internal.corext.refactoring.rename.RenameResourceProcessor;
30 import org.eclipse.jdt.internal.corext.refactoring.rename.RenameSourceFolderProcessor;
31 import org.eclipse.jdt.internal.corext.refactoring.rename.RenameTypeProcessor;
32 import org.eclipse.jdt.internal.corext.refactoring.reorg.JavaCopyProcessor;
33 import org.eclipse.jdt.internal.corext.refactoring.reorg.JavaDeleteProcessor;
34 import org.eclipse.jdt.internal.corext.refactoring.reorg.JavaMoveProcessor;
35
36 /**
37  * Interface to define the processor IDs provided by the JDT refactoring.
38  *
39  * <p>
40  * This interface declares static final fields only; it is not intended to be
41  * implemented.
42  * </p>
43  *
44  * @since 3.0
45  */

46 public interface IRefactoringProcessorIds {
47
48     /**
49      * Processor ID of the rename Java project processor
50      * (value <code>"org.eclipse.jdt.ui.renameJavaProjectProcessor"</code>).
51      *
52      * The rename Java project processor loads the following participants:
53      * <ul>
54      * <li>participants registered for renaming <code>IJavaProject</code>.</li>
55      * <li>participants registered for renaming <code>IProject</code>.</li>
56      * </ul>
57      */

58     public static String JavaDoc RENAME_JAVA_PROJECT_PROCESSOR= RenameJavaProjectProcessor.IDENTIFIER;
59     
60     /**
61      * Processor ID of the rename source folder
62      * (value <code>"org.eclipse.jdt.ui.renameSourceFolderProcessor"</code>).
63      *
64      * The rename package fragment root processor loads the following participants:
65      * <ul>
66      * <li>participants registered for renaming <code>IPackageFragmentRoot</code>.</li>
67      * <li>participants registered for renaming <code>IFolder</code>.</li>
68      * </ul>
69      */

70     public static String JavaDoc RENAME_SOURCE_FOLDER_PROCESSOR= RenameSourceFolderProcessor.IDENTIFIER;
71     
72     /**
73      * Processor ID of the rename package fragment processor
74      * (value <code>"org.eclipse.jdt.ui.renamePackageProcessor"</code>).
75      *
76      * The rename package fragment processor loads the following participants:
77      * <ul>
78      * <li>participants registered for renaming <code>IPackageFragment</code>.</li>
79      * <li>participants registered for moving <code>IFile</code> to participate in the
80      * file moves caused by the package fragment rename.</li>
81      * <li>participants registered for creating <code>IFolder</code> if the package
82      * rename results in creating a new destination folder.</li>
83      * <li>participants registered for deleting <code>IFolder</code> if the package
84      * rename results in deleting the folder corresponding to the package
85      * fragment to be renamed.</li>
86      * </ul>
87      *
88      * <p>Since 3.3:</p>
89      *
90      * <p>The refactoring processor moves and renames Java elements and resources.
91      * Rename package fragment participants can retrieve the new location of
92      * Java elements and resources through the interfaces
93      * {@link IJavaElementMapper} and {@link IResourceMapper}, which can be
94      * retrieved from the processor using the getAdapter() method.</p>
95      */

96     public static String JavaDoc RENAME_PACKAGE_FRAGMENT_PROCESSOR= RenamePackageProcessor.IDENTIFIER;
97     
98     /**
99      * Processor ID of the rename compilation unit processor
100      * (value <code>"org.eclipse.jdt.ui.renameCompilationUnitProcessor"</code>).
101      *
102      * The rename compilation unit processor loads the following participants:
103      * <ul>
104      * <li>participants registered for renaming <code>ICompilationUnit</code>.</li>
105      * <li>participants registered for renaming <code>IFile</code>.</li>
106      * <li>participants registered for renaming <code>IType</code> if the
107      * compilation unit contains a top level type.</li>
108      * </ul>
109      */

110     public static String JavaDoc RENAME_COMPILATION_UNIT_PROCESSOR= RenameCompilationUnitProcessor.IDENTIFIER;
111     
112     /**
113      * Processor ID of the rename type processor
114      * (value <code>"org.eclipse.jdt.ui.renameTypeProcessor"</code>).
115      *
116      * The rename type processor loads the following participants:
117      * <ul>
118      * <li>participants registered for renaming <code>IType</code>.</li>
119      * <li>participants registered for renaming <code>ICompilationUnit</code> if the
120      * type is a public top level type.</li>
121      * <li>participants registered for renaming <code>IFile</code> if the compilation
122      * unit gets rename as well.</li>
123      * </ul>
124      *
125      * <p>Since 3.2:</p>
126      *
127      * <p>Participants that declare <pre> &lt;param name="handlesSimilarDeclarations" value="false"/&gt; </pre>
128      * in their extension contribution will not be loaded if the user selects the
129      * "update similar declarations" feature.</p>
130      *
131      * <p>Rename type participants can retrieve information about similar declarations by casting the
132      * RenameArguments to RenameTypeArguments. The new signatures of similar declarations
133      * (and of other Java elements or resources) are available
134      * through the interfaces {@link IJavaElementMapper} and {@link IResourceMapper}, which can be retrieved from the
135      * processor using the getAdapter() method.</p>
136      *
137      */

138     public static String JavaDoc RENAME_TYPE_PROCESSOR= RenameTypeProcessor.IDENTIFIER;
139     
140     /**
141      * Processor ID of the rename method processor
142      * (value <code>"org.eclipse.jdt.ui.renameMethodProcessor"</code>).
143      *
144      * The rename method processor loads the following participants:
145      * <ul>
146      * <li>participants registered for renaming <code>IMethod</code>. Renaming
147      * virtual methods will rename methods with the same name in the type
148      * hierarchy of the type declaring the method to be renamed as well.
149      * For those derived methods participants will be loaded as well.</li>
150      * </ul>
151      */

152     public static String JavaDoc RENAME_METHOD_PROCESSOR= RenameMethodProcessor.IDENTIFIER;
153     
154     /**
155      * Processor ID of the rename field processor
156      * (value <code>"org.eclipse.jdt.ui.renameFieldProcessor"</code>).
157      *
158      * The rename filed processor loads the following participants:
159      * <ul>
160      * <li>participants registered for renaming <code>IField</code>.</li>
161      * <li>participants registered for renaming <code>IMethod</code> if
162      * corresponding setter and getter methods are renamed as well.</li>
163      * </ul>
164      */

165     public static String JavaDoc RENAME_FIELD_PROCESSOR= RenameFieldProcessor.IDENTIFIER;
166
167     /**
168      * Processor ID of the rename enum constant processor
169      * (value <code>"org.eclipse.jdt.ui.renameEnumConstProcessor"</code>).
170      *
171      * The rename filed processor loads the following participants:
172      * <ul>
173      * <li>participants registered for renaming <code>IField</code>.</li>
174      * </ul>
175      * @since 3.1
176      */

177     public static String JavaDoc RENAME_ENUM_CONSTANT_PROCESSOR= RenameEnumConstProcessor.IDENTIFIER;
178
179     /**
180      * Processor ID of the rename resource processor
181      * (value <code>"org.eclipse.jdt.ui.renameResourceProcessor"</code>).
182      *
183      * The rename resource processor loads the following participants:
184      * <ul>
185      * <li>participants registered for renaming <code>IResource</code>.</li>
186      * </ul>
187      */

188     public static String JavaDoc RENAME_RESOURCE_PROCESSOR= RenameResourceProcessor.IDENTIFIER;
189     
190     /**
191      * Processor ID of the move resource processor
192      * (value <code>"org.eclipse.jdt.ui.MoveProcessor"</code>).
193      *
194      * The move processor loads the following participants, depending on the type of
195      * element that gets moved:
196      * <ul>
197      * <li><code>IPackageFragmentRoot</code>: participants registered for moving
198      * package fragment roots together with participants moving a <code>IFolder
199      * </code>.</li>
200      * <li><code>IPackageFragment</code>: participants registered for moving
201      * package fragments. Additionally move file, create folder and delete
202      * folder participants are loaded to reflect the resource changes
203      * caused by a moving a package fragment.</li>
204      * <li><code>ICompilationUnit</code>: participants registered for moving
205      * compilation units and <code>IFile</code>. If the compilation unit
206      * contains top level types, participants for these types are loaded
207      * as well.</li>
208      * <li><code>IResource</code>: participants registered for moving resources.</li>
209      * </ul>
210      */

211     public static String JavaDoc MOVE_PROCESSOR= JavaMoveProcessor.IDENTIFIER;
212     
213     /**
214      * Processor ID of the move static member processor
215      * (value <code>"org.eclipse.jdt.ui.MoveStaticMemberProcessor"</code>).
216      *
217      * The move static members processor loads participants registered for the
218      * static Java element that gets moved. No support is available to participate
219      * in non static member moves.
220      */

221     public static String JavaDoc MOVE_STATIC_MEMBERS_PROCESSOR= "org.eclipse.jdt.ui.MoveStaticMemberProcessor"; //$NON-NLS-1$
222

223     /**
224      * Processor ID of the delete resource processor
225      * (value <code>"org.eclipse.jdt.ui.DeleteProcessor"</code>).
226      *
227      * The delete processor loads the following participants, depending on the type of
228      * element that gets deleted:
229      * <ul>
230      * <li><code>IJavaProject</code>: participants registered for deleting <code>IJavaProject
231      * </code> and <code>IProject</code></li>.
232      * <li><code>IPackageFragmentRoot</code>: participants registered for deleting
233      * <code>IPackageFragmentRoot</code> and <code>IFolder</code>.
234      * <li><code>IPackageFragment</code>: participants registered for deleting
235      * <code>IPackageFragment</code>. Additionally delete file and delete folder
236      * participants are loaded to reflect the resource changes caused by
237      * deleting a package fragment.</li>
238      * <li><code>ICompilationUnit</code>: participants registered for deleting compilation
239      * units and files. Additionally type delete participants are loaded to reflect the
240      * deletion of the top level types declared in the compilation unit.</li>
241      * <li><code>IType</code>: participants registered for deleting types. Additional
242      * compilation unit and file delete participants are loaded if the type to be deleted
243      * is the only top level type of a compilation unit.</li>
244      * <li><code>IMember</code>: participants registered for deleting members.</li>
245      * <li><code>IResource</code>: participants registered for deleting resources.</li>
246      * </ul>
247      */

248     public static String JavaDoc DELETE_PROCESSOR= JavaDeleteProcessor.IDENTIFIER;
249
250     /**
251      * Processor ID of the copy processor (value <code>"org.eclipse.jdt.ui.CopyProcessor"</code>).
252      *
253      * The copy processor is used when copying elements via drag and drop or when pasting
254      * elements from the clipboard. The copy processor loads the following participants,
255      * depending on the type of the element that gets copied:
256      * <ul>
257      * <li><code>IJavaProject</code>: no participants are loaded.</li>
258      * <li><code>IPackageFragmentRoot</code>: participants registered for copying
259      * <code>IPackageFragmentRoot</code> and <code>ResourceMapping</code>.</li>
260      * <li><code>IPackageFragment</code>: participants registered for copying
261      * <code>IPackageFragment</code> and <code>ResourceMapping</code>.</li>
262      * <li><code>ICompilationUnit</code>: participants registered for copying
263      * <code>ICompilationUnit</code> and <code>ResourceMapping</code>.</li>
264      * <li><code>IType</code>: like ICompilationUnit if the primary top level type is copied.
265      * Otherwise no participants are loaded.</li>
266      * <li><code>IMember</code>: no participants are loaded.</li>
267      * <li><code>IFolder</code>: participants registered for copying folders.</li>
268      * <li><code>IFile</code>: participants registered for copying files.</li>
269      * </ul>
270      * <p>
271      * Use the method {@link ResourceMapping#accept(ResourceMappingContext context, IResourceVisitor visitor, IProgressMonitor monitor)}
272      * to enumerate the resources which form the Java element. <code>ResourceMappingContext.LOCAL_CONTEXT</code>
273      * should be use as the <code>ResourceMappingContext</code> passed to the accept method.
274      * </p>
275      * @see org.eclipse.core.resources.mapping.ResourceMapping
276      * @since 3.3
277      */

278     public static String JavaDoc COPY_PROCESSOR= JavaCopyProcessor.IDENTIFIER;
279 }
280
Popular Tags