deleted: export="true"
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / codeassist / ISelectionRequestor.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v0.5 
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v05.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  ******************************************************************************/
11 package net.sourceforge.phpdt.internal.codeassist;
12
13 import net.sourceforge.phpdt.core.compiler.IProblem;
14
15 /**
16  * A selection requestor accepts results from the selection engine.
17  */
18 public interface ISelectionRequestor {
19         /**
20          * Code assist notification of a class selection.
21          * @param packageName char[]
22          *              Declaring package name of the class.
23          * 
24          * @param className char[]
25          *              Name of the class.
26          * 
27          * @param needQualification boolean
28          *              Flag indicating if the type name 
29          *      must be qualified by its package name (depending on imports).
30          *
31          * NOTE - All package and type names are presented in their readable form:
32          *    Package names are in the form "a.b.c".
33          *    Nested type names are in the qualified form "A.M".
34          *    The default package is represented by an empty array.
35          */
36         void acceptClass(
37                 char[] packageName,
38                 char[] className,
39                 boolean needQualification);
40
41         /**
42          * Code assist notification of a compilation error detected during selection.
43          *  @param error net.sourceforge.phpdt.internal.compiler.IProblem
44          *      Only problems which are categorized as errors are notified to the requestor,
45          *              warnings are silently ignored.
46          *              In case an error got signaled, no other completions might be available,
47          *              therefore the problem message should be presented to the user.
48          *              The source positions of the problem are related to the source where it was
49          *              detected (might be in another compilation unit, if it was indirectly requested
50          *              during the code assist process).
51          *      Note: the problem knows its originating file name.
52          */
53         void acceptError(IProblem error);
54
55         /**
56          * Code assist notification of a field selection.
57          * @param declaringTypePackageName char[]
58          *              Name of the package in which the type that contains this field is declared.
59          * 
60          * @param declaringTypeName char[]
61          *              Name of the type declaring this new field.
62          * 
63          * @param name char[]
64          *              Name of the field.
65          *
66          * NOTE - All package and type names are presented in their readable form:
67          *    Package names are in the form "a.b.c".
68          *    Nested type names are in the qualified form "A.M".
69          *    The default package is represented by an empty array.
70          */
71         void acceptField(
72                 char[] declaringTypePackageName,
73                 char[] declaringTypeName,
74                 char[] name);
75
76         /**
77          * Code assist notification of an interface selection.
78          * @param packageName char[]
79          *              Declaring package name of the interface.
80          * 
81          * @param interfaceName char[]
82          *              Name of the interface.
83          * 
84          * @param needQualification boolean
85          *              Flag indicating if the type name 
86          *      must be qualified by its package name (depending on imports).
87          *
88          * NOTE - All package and type names are presented in their readable form:
89          *    Package names are in the form "a.b.c".
90          *    Nested type names are in the qualified form "A.I".
91          *    The default package is represented by an empty array.
92          */
93         void acceptInterface(
94                 char[] packageName,
95                 char[] interfaceName,
96                 boolean needQualification);
97
98         /**
99          * Code assist notification of a method selection.
100          * @param declaringTypePackageName char[]
101          *              Name of the package in which the type that contains this new method is declared.
102          * 
103          * @param declaringTypeName char[]
104          *              Name of the type declaring this new method.
105          * 
106          * @param selector char[]
107          *              Name of the new method.
108          * 
109          * @param parameterPackageNames char[][]
110          *              Names of the packages in which the parameter types are declared.
111          *      Should contain as many elements as parameterTypeNames.
112          * 
113          * @param parameterTypeNames char[][]
114          *              Names of the parameters types.
115          *      Should contain as many elements as parameterPackageNames.
116          * 
117          *  @param isConstructor boolean
118          *              Answer if the method is a constructor.
119          *
120          * NOTE - All package and type names are presented in their readable form:
121          *    Package names are in the form "a.b.c".
122          *    Base types are in the form "int" or "boolean".
123          *    Array types are in the qualified form "M[]" or "int[]".
124          *    Nested type names are in the qualified form "A.M".
125          *    The default package is represented by an empty array.
126          */
127         void acceptMethod(
128                 char[] declaringTypePackageName,
129                 char[] declaringTypeName,
130                 char[] selector,
131                 char[][] parameterPackageNames,
132                 char[][] parameterTypeNames,
133                 boolean isConstructor);
134
135         /**
136          * Code assist notification of a package selection.
137          * @param packageName char[]
138          *              The package name.
139          *
140          * NOTE - All package names are presented in their readable form:
141          *    Package names are in the form "a.b.c".
142          *    The default package is represented by an empty array.
143          */
144         void acceptPackage(char[] packageName);
145 }