KickJava   Java API By Example, From Geeks To Geeks.

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


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.core.resources.IMarker;
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  * @deprecated Use {@link CompletionRequestor} instead.
24  */

25 public interface ICodeCompletionRequestor {
26 /**
27  * Code assist notification of a class completion.
28  *
29  * @param packageName Declaring package name of the class.
30  * @param className Name of the class.
31  * @param completionName The completion for the class.
32  * Can include ';' for imported classes.
33  * @param modifiers The modifiers of the class.
34  * @param completionStart The start position of insertion of the name of the class.
35  * @param completionEnd The end position of insertion of the name of the class.
36  *
37  * NOTE - All package and type names are presented in their readable form:
38  * Package names are in the form "a.b.c".
39  * Nested type names are in the qualified form "A.M".
40  * The default package is represented by an empty array.
41  */

42 void acceptClass(
43     char[] packageName,
44     char[] className,
45     char[] completionName,
46     int modifiers,
47     int completionStart,
48     int completionEnd);
49 /**
50  * Code assist notification of a compilation error detected during completion.
51  * @param marker Only problems which are categorized as errors are notified to the requestor,
52  * warnings are silently ignored.
53  * In case an error got signaled, no other completions might be available,
54  * therefore the problem message should be presented to the user.
55  * The source positions of the problem are related to the source where it was
56  * detected (might be in another compilation unit, if it was indirectly requested
57  * during the code assist process).
58  * Note: the problem knows its originating file name.
59  */

60 void acceptError(IMarker marker);
61 /**
62  * Code assist notification of a field completion.
63  *
64  * @param declaringTypePackageName Name of the package in which the type that contains this field is declared.
65  *
66  * @param declaringTypeName Name of the type declaring this new field.
67  *
68  * @param name Name of the field.
69  *
70  * @param typePackageName Name of the package in which the type of this field is declared.
71  *
72  * @param typeName Name of the type of this field.
73  *
74  * @param completionName The completion for the field.
75  *
76  * @param modifiers The modifiers of this field.
77  *
78  * @param completionStart The start position of insertion of the name of this field.
79  *
80  * @param completionEnd The end position of insertion of the name of this field.
81  *
82  * NOTE - All package and type names are presented in their readable form:
83  * Package names are in the form "a.b.c".
84  * Base types are in the form "int" or "boolean".
85  * Array types are in the qualified form "M[]" or "int[]".
86  * Nested type names are in the qualified form "A.M".
87  * The default package is represented by an empty array.
88  */

89 void acceptField(
90     char[] declaringTypePackageName,
91     char[] declaringTypeName,
92     char[] name,
93     char[] typePackageName,
94     char[] typeName,
95     char[] completionName,
96     int modifiers,
97     int completionStart,
98     int completionEnd);
99 /**
100  * Code assist notification of an interface completion.
101  *
102  * @param packageName Declaring package name of the interface.
103  * @param interfaceName Name of the interface.
104  * @param completionName The completion for the interface.
105  * Can include ';' for imported interfaces.
106  * @param modifiers The modifiers of the interface.
107  * @param completionStart The start position of insertion of the name of the interface.
108  * @param completionEnd The end position of insertion of the name of the interface.
109  *
110  * NOTE - All package and type names are presented in their readable form:
111  * Package names are in the form "a.b.c".
112  * Nested type names are in the qualified form "A.M".
113  * The default package is represented by an empty array.
114  */

115 void acceptInterface(
116     char[] packageName,
117     char[] interfaceName,
118     char[] completionName,
119     int modifiers,
120     int completionStart,
121     int completionEnd);
122 /**
123  * Code assist notification of a keyword completion.
124  *
125  * @param keywordName The keyword source.
126  * @param completionStart The start position of insertion of the name of this keyword.
127  * @param completionEnd The end position of insertion of the name of this keyword.
128  */

129 void acceptKeyword(char[] keywordName, int completionStart, int completionEnd);
130 /**
131  * Code assist notification of a label completion.
132  *
133  * @param labelName The label source.
134  * @param completionStart The start position of insertion of the name of this label.
135  * @param completionEnd The end position of insertion of the name of this label.
136  */

137 void acceptLabel(char[] labelName, int completionStart, int completionEnd);
138 /**
139  * Code assist notification of a local variable completion.
140  *
141  * @param name Name of the new local variable.
142  *
143  * @param typePackageName Name of the package in which the type of this new local variable is declared.
144  *
145  * @param typeName Name of the type of this new local variable.
146  *
147  * @param modifiers The modifiers of this new local variable.
148  *
149  * @param completionStart The start position of insertion of the name of this new local variable.
150  *
151  * @param completionEnd The end position of insertion of the name of this new local variable.
152  *
153  * NOTE - All package and type names are presented in their readable form:
154  * Package names are in the form "a.b.c".
155  * Base types are in the form "int" or "boolean".
156  * Array types are in the qualified form "M[]" or "int[]".
157  * Nested type names are in the qualified form "A.M".
158  * The default package is represented by an empty array.
159  */

160 void acceptLocalVariable(
161     char[] name,
162     char[] typePackageName,
163     char[] typeName,
164     int modifiers,
165     int completionStart,
166     int completionEnd);
167 /**
168  * Code assist notification of a method completion.
169  *
170  * @param declaringTypePackageName Name of the package in which the type that contains this new method is declared.
171  *
172  * @param declaringTypeName Name of the type declaring this new method.
173  *
174  * @param selector Name of the new method.
175  *
176  * @param parameterPackageNames Names of the packages in which the parameter types are declared.
177  * Should contain as many elements as parameterTypeNames.
178  *
179  * @param parameterTypeNames Names of the parameters types.
180  * Should contain as many elements as parameterPackageNames.
181  *
182  * @param returnTypePackageName Name of the package in which the return type is declared.
183  *
184  * @param returnTypeName Name of the return type of this new method, should be <code>null</code> for a constructor.
185  *
186  * @param completionName The completion for the method.
187  * Can include zero, one or two brackets. If the closing bracket is included, then the cursor should be placed before it.
188  *
189  * @param modifiers The modifiers of this new method.
190  *
191  * @param completionStart The start position of insertion of the name of this new method.
192  *
193  * @param completionEnd The end position of insertion of the name of this new method.
194  *
195  * NOTE - All package and type names are presented in their readable form:
196  * Package names are in the form "a.b.c".
197  * Base types are in the form "int" or "boolean".
198  * Array types are in the qualified form "M[]" or "int[]".
199  * Nested type names are in the qualified form "A.M".
200  * The default package is represented by an empty array.
201  *
202  * NOTE: parameter names can be retrieved from the source model after the user selects a specific method.
203  */

204 void acceptMethod(
205     char[] declaringTypePackageName,
206     char[] declaringTypeName,
207     char[] selector,
208     char[][] parameterPackageNames,
209     char[][] parameterTypeNames,
210     char[] returnTypePackageName,
211     char[] returnTypeName,
212     char[] completionName,
213     int modifiers,
214     int completionStart,
215     int completionEnd);
216 /**
217  * Code assist notification of a modifier completion.
218  *
219  * @param modifierName The new modifier.
220  * @param completionStart The start position of insertion of the name of this new modifier.
221  * @param completionEnd The end position of insertion of the name of this new modifier.
222  */

223 void acceptModifier(char[] modifierName, int completionStart, int completionEnd);
224 /**
225  * Code assist notification of a package completion.
226  *
227  * @param packageName The package name.
228  * @param completionName The completion for the package.
229  * Can include '.*;' for imports.
230  * @param completionStart The start position of insertion of the name of this new package.
231  * @param completionEnd The end position of insertion of the name of this new package.
232  *
233  * NOTE - All package names are presented in their readable form:
234  * Package names are in the form "a.b.c".
235  * The default package is represented by an empty array.
236  */

237 void acceptPackage(
238     char[] packageName,
239     char[] completionName,
240     int completionStart,
241     int completionEnd);
242 /**
243  * Code assist notification of a type completion.
244  *
245  * @param packageName Declaring package name of the type.
246  * @param typeName Name of the type.
247  * @param completionName The completion for the type.
248  * Can include ';' for imported types.
249  * @param completionStart The start position of insertion of the name of the type.
250  * @param completionEnd The end position of insertion of the name of the type.
251  *
252  * NOTE - All package and type names are presented in their readable form:
253  * Package names are in the form "a.b.c".
254  * Nested type names are in the qualified form "A.M".
255  * The default package is represented by an empty array.
256  */

257 void acceptType(
258     char[] packageName,
259     char[] typeName,
260     char[] completionName,
261     int completionStart,
262     int completionEnd);
263 }
264
Popular Tags