1) Moved net.sourceforge.phpeclipse.ui\src\net\sourceforge\phpdt back to net.sourcefo...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / ICodeCompletionRequestor.java
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
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.core;
12
13 import org.eclipse.core.resources.IMarker;
14
15 /**
16  * A completion requestor accepts results as they are computed and is aware of
17  * 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
30          *            Declaring package name of the class.
31          * @param className
32          *            Name of the class.
33          * @param completionName
34          *            The completion for the class. Can include ';' for imported
35          *            classes.
36          * @param modifiers
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.
42          * 
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
46          * array.
47          */
48         void acceptClass(char[] packageName, char[] className,
49                         char[] completionName, int modifiers, int completionStart,
50                         int completionEnd);
51
52         /**
53          * Code assist notification of a compilation error detected during
54          * completion.
55          * 
56          * @param marker
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.
65          */
66         void acceptError(IMarker marker);
67
68         /**
69          * Code assist notification of a field completion.
70          * 
71          * @param declaringTypePackageName
72          *            Name of the package in which the type that contains this field
73          *            is declared.
74          * 
75          * @param declaringTypeName
76          *            Name of the type declaring this new field.
77          * 
78          * @param name
79          *            Name of the field.
80          * 
81          * @param typePackageName
82          *            Name of the package in which the type of this field is
83          *            declared.
84          * 
85          * @param typeName
86          *            Name of the type of this field.
87          * 
88          * @param completionName
89          *            The completion for the field.
90          * 
91          * @param modifiers
92          *            The modifiers of this field.
93          * 
94          * @param completionStart
95          *            The start position of insertion of the name of this field.
96          * 
97          * @param completionEnd
98          *            The end position of insertion of the name of this field.
99          * 
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.
105          */
106         void acceptField(char[] declaringTypePackageName, char[] declaringTypeName,
107                         char[] name, char[] typePackageName, char[] typeName,
108                         char[] completionName, int modifiers, int completionStart,
109                         int completionEnd);
110
111         /**
112          * Code assist notification of an interface completion.
113          * 
114          * @param packageName
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
120          *            interfaces.
121          * @param modifiers
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.
127          * 
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
131          * array.
132          */
133         void acceptInterface(char[] packageName, char[] interfaceName,
134                         char[] completionName, int modifiers, int completionStart,
135                         int completionEnd);
136
137         /**
138          * Code assist notification of a keyword completion.
139          * 
140          * @param keywordName
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.
146          */
147         void acceptKeyword(char[] keywordName, int completionStart,
148                         int completionEnd);
149
150         /**
151          * Code assist notification of a label completion.
152          * 
153          * @param labelName
154          *            The label source.
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.
159          */
160         void acceptLabel(char[] labelName, int completionStart, int completionEnd);
161
162         /**
163          * Code assist notification of a local variable completion.
164          * 
165          * @param name
166          *            Name of the new local variable.
167          * 
168          * @param typePackageName
169          *            Name of the package in which the type of this new local
170          *            variable is declared.
171          * 
172          * @param typeName
173          *            Name of the type of this new local variable.
174          * 
175          * @param modifiers
176          *            The modifiers of this new local variable.
177          * 
178          * @param completionStart
179          *            The start position of insertion of the name of this new local
180          *            variable.
181          * 
182          * @param completionEnd
183          *            The end position of insertion of the name of this new local
184          *            variable.
185          * 
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.
191          */
192         void acceptLocalVariable(char[] name, char[] typePackageName,
193                         char[] typeName, int modifiers, int completionStart,
194                         int completionEnd);
195
196         /**
197          * Code assist notification of a method completion.
198          * 
199          * @param declaringTypePackageName
200          *            Name of the package in which the type that contains this new
201          *            method is declared.
202          * 
203          * @param declaringTypeName
204          *            Name of the type declaring this new method.
205          * 
206          * @param selector
207          *            Name of the new method.
208          * 
209          * @param parameterPackageNames
210          *            Names of the packages in which the parameter types are
211          *            declared. Should contain as many elements as
212          *            parameterTypeNames.
213          * 
214          * @param parameterTypeNames
215          *            Names of the parameters types. Should contain as many elements
216          *            as parameterPackageNames.
217          * 
218          * @param returnTypePackageName
219          *            Name of the package in which the return type is declared.
220          * 
221          * @param returnTypeName
222          *            Name of the return type of this new method, should be
223          *            <code>null</code> for a constructor.
224          * 
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.
229          * 
230          * @param modifiers
231          *            The modifiers of this new method.
232          * 
233          * @param completionStart
234          *            The start position of insertion of the name of this new
235          *            method.
236          * 
237          * @param completionEnd
238          *            The end position of insertion of the name of this new method.
239          * 
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.
245          * 
246          * NOTE: parameter names can be retrieved from the source model after the
247          * user selects a specific method.
248          */
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,
254                         int completionEnd);
255
256         /**
257          * Code assist notification of a modifier completion.
258          * 
259          * @param modifierName
260          *            The new modifier.
261          * @param completionStart
262          *            The start position of insertion of the name of this new
263          *            modifier.
264          * @param completionEnd
265          *            The end position of insertion of the name of this new
266          *            modifier.
267          */
268         void acceptModifier(char[] modifierName, int completionStart,
269                         int completionEnd);
270
271         /**
272          * Code assist notification of a package completion.
273          * 
274          * @param packageName
275          *            The package name.
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
280          *            package.
281          * @param completionEnd
282          *            The end position of insertion of the name of this new package.
283          * 
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
286          * empty array.
287          */
288         void acceptPackage(char[] packageName, char[] completionName,
289                         int completionStart, int completionEnd);
290
291         /**
292          * Code assist notification of a type completion.
293          * 
294          * @param packageName
295          *            Declaring package name of the type.
296          * @param typeName
297          *            Name of the type.
298          * @param completionName
299          *            The completion for the type. Can include ';' for imported
300          *            types.
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.
305          * 
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
309          * array.
310          */
311         void acceptType(char[] packageName, char[] typeName, char[] completionName,
312                         int completionStart, int completionEnd);
313 }