KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > core > ICompletionRequestor


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.core;
12
13 import org.eclipse.jdt.core.compiler.IProblem;
14
15 /**
16  * A completion requestor accepts results as they are computed and is aware
17  * of source positions to complete the various different results.
18  * <p>
19  * This interface may be implemented by clients.
20  * </p>
21  *
22  * @see ICodeAssist
23  * @since 2.0
24  * @deprecated Use {@link CompletionRequestor} instead.
25  */

26 public interface ICompletionRequestor {
27 /**
28  * Code assist notification of an anonymous type declaration completion.
29  * @param superTypePackageName Name of the package that contains the super type of this
30  * new anonymous type declaration.
31  * @param superTypeName Name of the super type of this new anonymous type declaration.
32  * @param parameterPackageNames Names of the packages in which the parameter types are declared.
33  * Should contain as many elements as parameterTypeNames.
34  * @param parameterTypeNames Names of the parameter types.
35  * Should contain as many elements as parameterPackageNames.
36  * @param parameterNames Names of the parameters.
37  * Should contain as many elements as parameterPackageNames.
38  * @param completionName The completion for the anonymous type declaration.
39  * Can include zero, one or two brackets. If the closing bracket is included,
40  * then the cursor should be placed before it.
41  * @param modifiers The modifiers of the constructor.
42  * @param completionStart The start position of insertion of the name of this new anonymous type declaration.
43  * @param completionEnd The end position of insertion of the name of this new anonymous type declaration.
44  * @param relevance The relevance of the completion proposal
45  * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
46  * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
47  * value is higher.
48  *
49  * NOTE - All package and type names are presented in their readable form:
50  * Package names are in the form "a.b.c".
51  * Base types are in the form "int" or "boolean".
52  * Array types are in the qualified form "M[]" or "int[]".
53  * Nested type names are in the qualified form "A.M".
54  * The default package is represented by an empty array.
55  *
56  * NOTE: parameter names can be retrieved from the source model after the user selects a specific method.
57  *
58  * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
59  */

60 void acceptAnonymousType(
61     char[] superTypePackageName,
62     char[] superTypeName,
63     char[][] parameterPackageNames,
64     char[][] parameterTypeNames,
65     char[][] parameterNames,
66     char[] completionName,
67     int modifiers,
68     int completionStart,
69     int completionEnd,
70     int relevance);
71 /**
72  * Code assist notification of a class completion.
73  *
74  * @param packageName Declaring package name of the class.
75  * @param className Name of the class.
76  * @param completionName The completion for the class. Can include ';' for imported classes.
77  * @param modifiers The modifiers of the class.
78  * @param completionStart The start position of insertion of the name of the class.
79  * @param completionEnd The end position of insertion of the name of the class.
80  * @param relevance The relevance of the completion proposal
81  * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
82  * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
83  * value is higher.
84  *
85  * NOTE - All package and type names are presented in their readable form:
86  * Package names are in the form "a.b.c".
87  * Nested type names are in the qualified form "A.M".
88  * The default package is represented by an empty array.
89  *
90  * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
91  */

92 void acceptClass(
93     char[] packageName,
94     char[] className,
95     char[] completionName,
96     int modifiers,
97     int completionStart,
98     int completionEnd,
99     int relevance);
100 /**
101  * Code assist notification of a compilation error detected during completion.
102  * @param error Only problems which are categorized as non-syntax errors are notified to the
103  * requestor, warnings are silently ignored.
104  * In case an error got signalled, no other completions might be available,
105  * therefore the problem message should be presented to the user.
106  * The source positions of the problem are related to the source where it was
107  * detected (might be in another compilation unit, if it was indirectly requested
108  * during the code assist process).
109  * Note: the problem knows its originating file name.
110  *
111  * @deprecated Use {@link CompletionRequestor#completionFailure(IProblem)} instead.
112  */

113 void acceptError(IProblem error);
114 /**
115  * Code assist notification of a field completion.
116  *
117  * @param declaringTypePackageName Name of the package in which the type that contains this field is declared.
118  * @param declaringTypeName Name of the type declaring this new field.
119  * @param name Name of the field.
120  * @param typePackageName Name of the package in which the type of this field is declared.
121  * @param typeName Name of the type of this field.
122  * @param completionName The completion for the field.
123  * @param modifiers The modifiers of this field.
124  * @param completionStart The start position of insertion of the name of this field.
125  * @param completionEnd The end position of insertion of the name of this field.
126  * @param relevance The relevance of the completion proposal
127  * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
128  * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
129  * value is higher.
130  *
131  * NOTE - All package and type names are presented in their readable form:
132  * Package names are in the form "a.b.c".
133  * Base types are in the form "int" or "boolean".
134  * Array types are in the qualified form "M[]" or "int[]".
135  * Nested type names are in the qualified form "A.M".
136  * The default package is represented by an empty array.
137  *
138  * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
139  */

140 void acceptField(
141     char[] declaringTypePackageName,
142     char[] declaringTypeName,
143     char[] name,
144     char[] typePackageName,
145     char[] typeName,
146     char[] completionName,
147     int modifiers,
148     int completionStart,
149     int completionEnd,
150     int relevance);
151 /**
152  * Code assist notification of an interface completion.
153  *
154  * @param packageName Declaring package name of the interface.
155  * @param interfaceName Name of the interface.
156  * @param completionName The completion for the interface. Can include ';' for imported interfaces.
157  * @param modifiers The modifiers of the interface.
158  * @param completionStart The start position of insertion of the name of the interface.
159  * @param completionEnd The end position of insertion of the name of the interface.
160  * @param relevance The relevance of the completion proposal
161  * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
162  * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
163  * value is higher.
164  *
165  * NOTE - All package and type names are presented in their readable form:
166  * Package names are in the form "a.b.c".
167  * Nested type names are in the qualified form "A.M".
168  * The default package is represented by an empty array.
169  *
170  * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
171  */

172 void acceptInterface(
173     char[] packageName,
174     char[] interfaceName,
175     char[] completionName,
176     int modifiers,
177     int completionStart,
178     int completionEnd,
179     int relevance);
180 /**
181  * Code assist notification of a keyword completion.
182  * @param keywordName The keyword source.
183  * @param completionStart The start position of insertion of the name of this keyword.
184  * @param completionEnd The end position of insertion of the name of this keyword.
185  * @param relevance The relevance of the completion proposal
186  * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
187  * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
188  * value is higher.
189  * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
190  */

191 void acceptKeyword(char[] keywordName, int completionStart, int completionEnd, int relevance);
192 /**
193  * Code assist notification of a label completion.
194  *
195  * @param labelName The label source.
196  * @param completionStart The start position of insertion of the name of this label.
197  * @param completionEnd The end position of insertion of the name of this label.
198  * @param relevance The relevance of the completion proposal
199  * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
200  * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
201  * value is higher.
202  * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
203  */

204 void acceptLabel(char[] labelName, int completionStart, int completionEnd, int relevance);
205 /**
206  * Code assist notification of a local variable completion.
207  *
208  * @param name Name of the new local variable.
209  * @param typePackageName Name of the package in which the type of this new local variable is declared.
210  * @param typeName Name of the type of this new local variable.
211  * @param modifiers The modifiers of this new local variable.
212  * @param completionStart The start position of insertion of the name of this new local variable.
213  * @param completionEnd The end position of insertion of the name of this new local variable.
214  * @param relevance The relevance of the completion proposal
215  * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
216  * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
217  * value is higher.
218  *
219  * NOTE - All package and type names are presented in their readable form:
220  * Package names are in the form "a.b.c".
221  * Base types are in the form "int" or "boolean".
222  * Array types are in the qualified form "M[]" or "int[]".
223  * Nested type names are in the qualified form "A.M".
224  * The default package is represented by an empty array.
225  *
226  * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
227  */

228 void acceptLocalVariable(
229     char[] name,
230     char[] typePackageName,
231     char[] typeName,
232     int modifiers,
233     int completionStart,
234     int completionEnd,
235     int relevance);
236 /**
237  * Code assist notification of a method completion.
238  *
239  * @param declaringTypePackageName Name of the package in which the type that contains this new method is declared.
240  * @param declaringTypeName Name of the type declaring this new method.
241  * @param selector Name of the new method.
242  * @param parameterPackageNames Names of the packages in which the parameter types are declared.
243  * Should contain as many elements as parameterTypeNames.
244  * @param parameterTypeNames Names of the parameter types.
245  * Should contain as many elements as parameterPackageNames.
246  * @param parameterNames Names of the parameters.
247  * Should contain as many elements as parameterPackageNames.
248  * @param returnTypePackageName Name of the package in which the return type is declared.
249  * @param returnTypeName Name of the return type of this new method, should be <code>null</code> for a constructor.
250  * @param completionName The completion for the method. Can include zero, one or two brackets. If the closing bracket is included, then the cursor should be placed before it.
251  * @param modifiers The modifiers of this new method.
252  * @param completionStart The start position of insertion of the name of this new method.
253  * @param completionEnd The end position of insertion of the name of this new method.
254  * @param relevance The relevance of the completion proposal
255  * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
256  * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
257  * value is higher.
258  *
259  * NOTE - All package and type names are presented in their readable form:
260  * Package names are in the form "a.b.c".
261  * Base types are in the form "int" or "boolean".
262  * Array types are in the qualified form "M[]" or "int[]".
263  * Nested type names are in the qualified form "A.M".
264  * The default package is represented by an empty array.
265  *
266  * NOTE: parameter names can be retrieved from the source model after the user selects a specific method.
267  *
268  * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
269  */

270 void acceptMethod(
271     char[] declaringTypePackageName,
272     char[] declaringTypeName,
273     char[] selector,
274     char[][] parameterPackageNames,
275     char[][] parameterTypeNames,
276     char[][] parameterNames,
277     char[] returnTypePackageName,
278     char[] returnTypeName,
279     char[] completionName,
280     int modifiers,
281     int completionStart,
282     int completionEnd,
283     int relevance);
284
285 /**
286  * Code assist notification of a method completion.
287  *
288  * @param declaringTypePackageName Name of the package in which the type that contains this new method is declared.
289  * @param declaringTypeName Name of the type declaring this new method.
290  * @param selector Name of the new method.
291  * @param parameterPackageNames Names of the packages in which the parameter types are declared.
292  * Should contain as many elements as parameterTypeNames.
293  * @param parameterTypeNames Names of the parameter types.
294  * Should contain as many elements as parameterPackageNames.
295  * @param parameterNames Names of the parameters.
296  * Should contain as many elements as parameterPackageNames.
297  * @param returnTypePackageName Name of the package in which the return type is declared.
298  * @param returnTypeName Name of the return type of this new method, should be <code>null</code> for a constructor.
299  * @param completionName The completion for the method. Can include zero, one or two brackets. If the closing bracket is included, then the cursor should be placed before it.
300  * @param modifiers The modifiers of this new method.
301  * @param completionStart The start position of insertion of the name of this new method.
302  * @param completionEnd The end position of insertion of the name of this new method.
303  * @param relevance The relevance of the completion proposal
304  * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
305  * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
306  * value is higher.
307  *
308  * NOTE - All package and type names are presented in their readable form:
309  * Package names are in the form "a.b.c".
310  * Base types are in the form "int" or "boolean".
311  * Array types are in the qualified form "M[]" or "int[]".
312  * Nested type names are in the qualified form "A.M".
313  * The default package is represented by an empty array.
314  *
315  * NOTE: parameter names can be retrieved from the source model after the user selects a specific method.
316  *
317  * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
318  */

319 void acceptMethodDeclaration(
320     char[] declaringTypePackageName,
321     char[] declaringTypeName,
322     char[] selector,
323     char[][] parameterPackageNames,
324     char[][] parameterTypeNames,
325     char[][] parameterNames,
326     char[] returnTypePackageName,
327     char[] returnTypeName,
328     char[] completionName,
329     int modifiers,
330     int completionStart,
331     int completionEnd,
332     int relevance);
333 /**
334  * Code assist notification of a modifier completion.
335  *
336  * @param modifierName The new modifier.
337  * @param completionStart The start position of insertion of the name of this new modifier.
338  * @param completionEnd The end position of insertion of the name of this new modifier.
339  * @param relevance The relevance of the completion proposal
340  * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
341  * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
342  * value is higher.
343  * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
344  */

345 void acceptModifier(char[] modifierName, int completionStart, int completionEnd, int relevance);
346 /**
347  * Code assist notification of a package completion.
348  *
349  * @param packageName The package name.
350  * @param completionName The completion for the package. Can include '.*;' for imports.
351  * @param completionStart The start position of insertion of the name of this new package.
352  * @param completionEnd The end position of insertion of the name of this new package.
353  * @param relevance The relevance of the completion proposal
354  * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
355  * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
356  * value is higher.
357  *
358  * NOTE - All package names are presented in their readable form:
359  * Package names are in the form "a.b.c".
360  * The default package is represented by an empty array.
361  * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
362  */

363 void acceptPackage(
364     char[] packageName,
365     char[] completionName,
366     int completionStart,
367     int completionEnd,
368     int relevance);
369 /**
370  * Code assist notification of a type completion.
371  *
372  * @param packageName Declaring package name of the type.
373  * @param typeName Name of the type.
374  * @param completionName The completion for the type. Can include ';' for imported types.
375  * @param completionStart The start position of insertion of the name of the type.
376  * @param completionEnd The end position of insertion of the name of the type.
377  * @param relevance The relevance of the completion proposal
378  * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
379  * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
380  * value is higher.
381  *
382  * NOTE - All package and type names are presented in their readable form:
383  * Package names are in the form "a.b.c".
384  * Nested type names are in the qualified form "A.M".
385  * The default package is represented by an empty array.
386  * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
387  */

388 void acceptType(
389     char[] packageName,
390     char[] typeName,
391     char[] completionName,
392     int completionStart,
393     int completionEnd,
394     int relevance);
395     
396 /**
397  * Code assist notification of a variable name completion.
398  *
399  * @param typePackageName Name of the package in which the type of this variable is declared.
400  * @param typeName Name of the type of this variable.
401  * @param name Name of the variable.
402  * @param completionName The completion for the variable.
403  * @param completionStart The start position of insertion of the name of this variable.
404  * @param completionEnd The end position of insertion of the name of this variable.
405  * @param relevance The relevance of the completion proposal
406  * It is a positive integer which are used for determine if this proposal is more relevant than another proposal.
407  * This value can only be used for compare relevance. A proposal is more relevant than another if his relevance
408  * value is higher.
409  *
410  * NOTE - All package and type names are presented in their readable form:
411  * Package names are in the form "a.b.c".
412  * Base types are in the form "int" or "boolean".
413  * Array types are in the qualified form "M[]" or "int[]".
414  * Nested type names are in the qualified form "A.M".
415  * The default package is represented by an empty array.
416  * @deprecated Use {@link CompletionRequestor#accept(CompletionProposal)} instead.
417  */

418 void acceptVariableName(
419     char[] typePackageName,
420     char[] typeName,
421     char[] name,
422     char[] completionName,
423     int completionStart,
424     int completionEnd,
425     int relevance);
426 }
427
Popular Tags