KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > codeassist > ISelectionRequestor


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.internal.codeassist;
12
13 import org.eclipse.jdt.core.compiler.CategorizedProblem;
14
15 /**
16  * A selection requestor accepts results from the selection engine.
17  */

18 public interface ISelectionRequestor {
19     /**
20      * Code assist notification of a enum selection.
21      * @param packageName char[]
22      * Declaring package name of the type.
23      *
24      * @param annotationName char[]
25      * Name of the type.
26      *
27      * @param isDeclaration boolean
28      * Answer if the selected type is a declaration
29      *
30      * @param genericTypeSignature
31      * genric type signature of the selected type if it is a
32      * parameterized type
33      *
34      * @param start
35      * Start of the selection
36      *
37      * @param end
38      * End of the selection
39      *
40      * NOTE - All package and type names are presented in their readable form:
41      * Package names are in the form "a.b.c".
42      * Nested type names are in the qualified form "A.M".
43      * The default package is represented by an empty array.
44      */

45     void acceptType(
46         char[] packageName,
47         char[] annotationName,
48         int modifiers,
49         boolean isDeclaration,
50         char[] genericTypeSignature,
51         int start,
52         int end);
53
54     /**
55      * Code assist notification of a compilation error detected during selection.
56      * @param error CategorizedProblem
57      * Only problems which are categorized as errors are notified to the requestor,
58      * warnings are silently ignored.
59      * In case an error got signaled, no other completions might be available,
60      * therefore the problem message should be presented to the user.
61      * The source positions of the problem are related to the source where it was
62      * detected (might be in another compilation unit, if it was indirectly requested
63      * during the code assist process).
64      * Note: the problem knows its originating file name.
65      */

66     void acceptError(CategorizedProblem error);
67
68     /**
69      * Code assist notification of a field selection.
70      * @param declaringTypePackageName char[]
71      * Name of the package in which the type that contains this field is declared.
72      *
73      * @param declaringTypeName char[]
74      * Name of the type declaring this new field.
75      *
76      * @param name char[]
77      * Name of the field.
78      *
79      * @param isDeclaration boolean
80      * Answer if the selected field is a declaration
81      *
82      * @param uniqueKey
83      * unique key of this field
84      *
85      * @param start
86      * Start of the selection
87      *
88      * @param end
89      * End of the selection
90      *
91      * NOTE - All package and type names are presented in their readable form:
92      * Package names are in the form "a.b.c".
93      * Nested type names are in the qualified form "A.M".
94      * The default package is represented by an empty array.
95      */

96     void acceptField(
97         char[] declaringTypePackageName,
98         char[] declaringTypeName,
99         char[] name,
100         boolean isDeclaration,
101         char[] uniqueKey,
102         int start,
103         int end);
104
105     /**
106      * Code assist notification of a method selection.
107      * @param declaringTypePackageName char[]
108      * Name of the package in which the type that contains this new method is declared.
109      *
110      * @param declaringTypeName char[]
111      * Name of the type declaring this new method.
112      *
113      * @param enclosingDeclaringTypeSignature String
114      * Type signature of the declaring type of the declaring type or <code>null</code>
115      * if declaring type is a top level type.
116      *
117      * @param selector char[]
118      * Name of the new method.
119      *
120      * @param parameterPackageNames char[][]
121      * Names of the packages in which the parameter types are declared.
122      * Should contain as many elements as parameterTypeNames.
123      *
124      * @param parameterTypeNames char[][]
125      * Names of the parameters types.
126      * Should contain as many elements as parameterPackageNames.
127      *
128      * @param parameterSignatures String[]
129      * Signature of the parameters types.
130      * Should contain as many elements as parameterPackageNames.
131      *
132      * @param isConstructor boolean
133      * Answer if the method is a constructor.
134      *
135      * @param isDeclaration boolean
136      * Answer if the selected method is a declaration
137      *
138      * @param uniqueKey
139      * unique key of the method
140      *
141      * @param start
142      * Start of the selection
143      *
144      * @param end
145      * End of the selection
146      *
147      * NOTE - All package and type names are presented in their readable form:
148      * Package names are in the form "a.b.c".
149      * Base types are in the form "int" or "boolean".
150      * Array types are in the qualified form "M[]" or "int[]".
151      * Nested type names are in the qualified form "A.M".
152      * The default package is represented by an empty array.
153      */

154     // parameters 'isDeclaration', 'start' and 'end' are use to distinguish duplicate methods declarations
155
void acceptMethod(
156         char[] declaringTypePackageName,
157         char[] declaringTypeName,
158         String JavaDoc enclosingDeclaringTypeSignature,
159         char[] selector,
160         char[][] parameterPackageNames,
161         char[][] parameterTypeNames,
162         String JavaDoc[] parameterSignatures,
163         char[][] typeParameterNames,
164         char[][][] typeParameterBoundNames,
165         boolean isConstructor,
166         boolean isDeclaration,
167         char[] uniqueKey,
168         int start,
169         int end);
170     
171     /**
172      * Code assist notification of a package selection.
173      * @param packageName char[]
174      * The package name.
175      *
176      * NOTE - All package names are presented in their readable form:
177      * Package names are in the form "a.b.c".
178      * The default package is represented by an empty array.
179      */

180     void acceptPackage(char[] packageName);
181     /**
182      * Code assist notification of a type parameter selection.
183      *
184      * @param declaringTypePackageName char[]
185      * Name of the package in which the type that contains this new method is declared.
186      *
187      * @param declaringTypeName char[]
188      * Name of the type declaring this new method.
189      *
190      * @param typeParameterName char[]
191      * Name of the type parameter.
192      *
193      * @param isDeclaration boolean
194      * Answer if the selected type parameter is a declaration
195      *
196      * @param start
197      * Start of the selection
198      *
199      * @param end
200      * End of the selection
201      *
202      * NOTE - All package and type names are presented in their readable form:
203      * Package names are in the form "a.b.c".
204      * Nested type names are in the qualified form "A.M".
205      * The default package is represented by an empty array.
206      */

207     void acceptTypeParameter(
208         char[] declaringTypePackageName,
209         char[] declaringTypeName,
210         char[] typeParameterName,
211         boolean isDeclaration,
212         int start,
213         int end);
214     
215     /**
216      * Code assist notification of a type parameter selection.
217      *
218      * @param declaringTypePackageName char[]
219      * Name of the package in which the type that contains this new method is declared.
220      *
221      * @param declaringTypeName char[]
222      * Name of the type declaring this new method.
223      *
224      * @param selector char[]
225      * Name of the declaring method.
226      *
227      * @param selectorStart int
228      * Start of the selector.
229      *
230      * @param selectorEnd int
231      * End of the selector.
232      *
233      * @param typeParameterName char[]
234      * Name of the type parameter.
235      *
236      * @param isDeclaration boolean
237      * Answer if the selected type parameter is a declaration
238      *
239      * @param start
240      * Start of the selection
241      *
242      * @param end
243      * End of the selection
244      *
245      * NOTE - All package and type names are presented in their readable form:
246      * Package names are in the form "a.b.c".
247      * Nested type names are in the qualified form "A.M".
248      * The default package is represented by an empty array.
249      */

250     void acceptMethodTypeParameter(
251         char[] declaringTypePackageName,
252         char[] declaringTypeName,
253         char[] selector,
254         int selectorStart,
255         int selectorEnd,
256         char[] typeParameterName,
257         boolean isDeclaration,
258         int start,
259         int end);
260 }
261
Popular Tags