1 /*******************************************************************************
2 * Copyright (c) 2000, 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.core;
13 import org.eclipse.core.resources.IMarker;
16 * A completion requestor accepts results as they are computed and is aware of
17 * source positions to complete the various different results.
19 * This interface may be implemented by clients.
23 * @deprecated Use {@link CompletionRequestor} instead.
25 public interface ICodeCompletionRequestor {
27 * Code assist notification of a class completion.
30 * Declaring package name of the class.
33 * @param completionName
34 * The completion for the class. Can include ';' for imported
37 * The modifiers of the class.
38 * @param completionStart
39 * The start position of insertion of the name of the class.
40 * @param completionEnd
41 * The end position of insertion of the name of the class.
43 * NOTE - All package and type names are presented in their readable form:
44 * Package names are in the form "a.b.c". Nested type names are in the
45 * qualified form "A.M". The default package is represented by an empty
48 void acceptClass(char[] packageName, char[] className,
49 char[] completionName, int modifiers, int completionStart,
53 * Code assist notification of a compilation error detected during
57 * Only problems which are categorized as errors are notified to
58 * the requestor, warnings are silently ignored. In case an error
59 * 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
62 * where it was detected (might be in another compilation unit,
63 * if it was indirectly requested during the code assist
64 * process). Note: the problem knows its originating file name.
66 void acceptError(IMarker marker);
69 * Code assist notification of a field completion.
71 * @param declaringTypePackageName
72 * Name of the package in which the type that contains this field
75 * @param declaringTypeName
76 * Name of the type declaring this new field.
81 * @param typePackageName
82 * Name of the package in which the type of this field is
86 * Name of the type of this field.
88 * @param completionName
89 * The completion for the field.
92 * The modifiers of this field.
94 * @param completionStart
95 * The start position of insertion of the name of this field.
97 * @param completionEnd
98 * The end position of insertion of the name of this field.
100 * NOTE - All package and type names are presented in their readable form:
101 * Package names are in the form "a.b.c". Base types are in the form "int"
102 * or "boolean". Array types are in the qualified form "M[]" or "int[]".
103 * Nested type names are in the qualified form "A.M". The default package is
104 * represented by an empty array.
106 void acceptField(char[] declaringTypePackageName, char[] declaringTypeName,
107 char[] name, char[] typePackageName, char[] typeName,
108 char[] completionName, int modifiers, int completionStart,
112 * Code assist notification of an interface completion.
115 * Declaring package name of the interface.
116 * @param interfaceName
117 * Name of the interface.
118 * @param completionName
119 * The completion for the interface. Can include ';' for imported
122 * The modifiers of the interface.
123 * @param completionStart
124 * The start position of insertion of the name of the interface.
125 * @param completionEnd
126 * The end position of insertion of the name of the interface.
128 * NOTE - All package and type names are presented in their readable form:
129 * Package names are in the form "a.b.c". Nested type names are in the
130 * qualified form "A.M". The default package is represented by an empty
133 void acceptInterface(char[] packageName, char[] interfaceName,
134 char[] completionName, int modifiers, int completionStart,
138 * Code assist notification of a keyword completion.
141 * The keyword source.
142 * @param completionStart
143 * The start position of insertion of the name of this keyword.
144 * @param completionEnd
145 * The end position of insertion of the name of this keyword.
147 void acceptKeyword(char[] keywordName, int completionStart,
151 * Code assist notification of a label completion.
155 * @param completionStart
156 * The start position of insertion of the name of this label.
157 * @param completionEnd
158 * The end position of insertion of the name of this label.
160 void acceptLabel(char[] labelName, int completionStart, int completionEnd);
163 * Code assist notification of a local variable completion.
166 * Name of the new local variable.
168 * @param typePackageName
169 * Name of the package in which the type of this new local
170 * variable is declared.
173 * Name of the type of this new local variable.
176 * The modifiers of this new local variable.
178 * @param completionStart
179 * The start position of insertion of the name of this new local
182 * @param completionEnd
183 * The end position of insertion of the name of this new local
186 * NOTE - All package and type names are presented in their readable form:
187 * Package names are in the form "a.b.c". Base types are in the form "int"
188 * or "boolean". Array types are in the qualified form "M[]" or "int[]".
189 * Nested type names are in the qualified form "A.M". The default package is
190 * represented by an empty array.
192 void acceptLocalVariable(char[] name, char[] typePackageName,
193 char[] typeName, int modifiers, int completionStart,
197 * Code assist notification of a method completion.
199 * @param declaringTypePackageName
200 * Name of the package in which the type that contains this new
201 * method is declared.
203 * @param declaringTypeName
204 * Name of the type declaring this new method.
207 * Name of the new method.
209 * @param parameterPackageNames
210 * Names of the packages in which the parameter types are
211 * declared. Should contain as many elements as
212 * parameterTypeNames.
214 * @param parameterTypeNames
215 * Names of the parameters types. Should contain as many elements
216 * as parameterPackageNames.
218 * @param returnTypePackageName
219 * Name of the package in which the return type is declared.
221 * @param returnTypeName
222 * Name of the return type of this new method, should be
223 * <code>null</code> for a constructor.
225 * @param completionName
226 * The completion for the method. Can include zero, one or two
227 * brackets. If the closing bracket is included, then the cursor
228 * should be placed before it.
231 * The modifiers of this new method.
233 * @param completionStart
234 * The start position of insertion of the name of this new
237 * @param completionEnd
238 * The end position of insertion of the name of this new method.
240 * NOTE - All package and type names are presented in their readable form:
241 * Package names are in the form "a.b.c". Base types are in the form "int"
242 * or "boolean". Array types are in the qualified form "M[]" or "int[]".
243 * Nested type names are in the qualified form "A.M". The default package is
244 * represented by an empty array.
246 * NOTE: parameter names can be retrieved from the source model after the
247 * user selects a specific method.
249 void acceptMethod(char[] declaringTypePackageName,
250 char[] declaringTypeName, char[] selector,
251 char[][] parameterPackageNames, char[][] parameterTypeNames,
252 char[] returnTypePackageName, char[] returnTypeName,
253 char[] completionName, int modifiers, int completionStart,
257 * Code assist notification of a modifier completion.
259 * @param modifierName
261 * @param completionStart
262 * The start position of insertion of the name of this new
264 * @param completionEnd
265 * The end position of insertion of the name of this new
268 void acceptModifier(char[] modifierName, int completionStart,
272 * Code assist notification of a package completion.
276 * @param completionName
277 * The completion for the package. Can include '.*;' for imports.
278 * @param completionStart
279 * The start position of insertion of the name of this new
281 * @param completionEnd
282 * The end position of insertion of the name of this new package.
284 * NOTE - All package names are presented in their readable form: Package
285 * names are in the form "a.b.c". The default package is represented by an
288 void acceptPackage(char[] packageName, char[] completionName,
289 int completionStart, int completionEnd);
292 * Code assist notification of a type completion.
295 * Declaring package name of the type.
298 * @param completionName
299 * The completion for the type. Can include ';' for imported
301 * @param completionStart
302 * The start position of insertion of the name of the type.
303 * @param completionEnd
304 * The end position of insertion of the name of the type.
306 * NOTE - All package and type names are presented in their readable form:
307 * Package names are in the form "a.b.c". Nested type names are in the
308 * qualified form "A.M". The default package is represented by an empty
311 void acceptType(char[] packageName, char[] typeName, char[] completionName,
312 int completionStart, int completionEnd);