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
17 * of 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.
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.
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.
45 char[] completionName,
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.
60 void acceptError(IMarker marker);
62 * Code assist notification of a field completion.
64 * @param declaringTypePackageName Name of the package in which the type that contains this field is declared.
66 * @param declaringTypeName Name of the type declaring this new field.
68 * @param name Name of the field.
70 * @param typePackageName Name of the package in which the type of this field is declared.
72 * @param typeName Name of the type of this field.
74 * @param completionName The completion for the field.
76 * @param modifiers The modifiers of this field.
78 * @param completionStart The start position of insertion of the name of this field.
80 * @param completionEnd The end position of insertion of the name of this field.
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.
90 char[] declaringTypePackageName,
91 char[] declaringTypeName,
93 char[] typePackageName,
95 char[] completionName,
100 * Code assist notification of an interface completion.
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.
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.
115 void acceptInterface(
117 char[] interfaceName,
118 char[] completionName,
123 * Code assist notification of a keyword completion.
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.
129 void acceptKeyword(char[] keywordName, int completionStart, int completionEnd);
131 * Code assist notification of a label completion.
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.
137 void acceptLabel(char[] labelName, int completionStart, int completionEnd);
139 * Code assist notification of a local variable completion.
141 * @param name Name of the new local variable.
143 * @param typePackageName Name of the package in which the type of this new local variable is declared.
145 * @param typeName Name of the type of this new local variable.
147 * @param modifiers The modifiers of this new local variable.
149 * @param completionStart The start position of insertion of the name of this new local variable.
151 * @param completionEnd The end position of insertion of the name of this new local variable.
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.
160 void acceptLocalVariable(
162 char[] typePackageName,
168 * Code assist notification of a method completion.
170 * @param declaringTypePackageName Name of the package in which the type that contains this new method is declared.
172 * @param declaringTypeName Name of the type declaring this new method.
174 * @param selector Name of the new method.
176 * @param parameterPackageNames Names of the packages in which the parameter types are declared.
177 * Should contain as many elements as parameterTypeNames.
179 * @param parameterTypeNames Names of the parameters types.
180 * Should contain as many elements as parameterPackageNames.
182 * @param returnTypePackageName Name of the package in which the return type is declared.
184 * @param returnTypeName Name of the return type of this new method, should be <code>null</code> for a constructor.
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.
189 * @param modifiers The modifiers of this new method.
191 * @param completionStart The start position of insertion of the name of this new method.
193 * @param completionEnd The end position of insertion of the name of this new method.
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.
202 * NOTE: parameter names can be retrieved from the source model after the user selects a specific method.
205 char[] declaringTypePackageName,
206 char[] declaringTypeName,
208 char[][] parameterPackageNames,
209 char[][] parameterTypeNames,
210 char[] returnTypePackageName,
211 char[] returnTypeName,
212 char[] completionName,
217 * Code assist notification of a modifier completion.
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.
223 void acceptModifier(char[] modifierName, int completionStart, int completionEnd);
225 * Code assist notification of a package completion.
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.
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.
239 char[] completionName,
243 * Code assist notification of a type completion.
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.
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.
260 char[] completionName,