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
9 * IBM Corporation - initial API and implementation
10 ******************************************************************************/
11 package net.sourceforge.phpdt.internal.codeassist;
13 import net.sourceforge.phpdt.core.compiler.IProblem;
16 * A selection requestor accepts results from the selection engine.
18 public interface ISelectionRequestor {
20 * Code assist notification of a class selection.
21 * @param packageName char[]
22 * Declaring package name of the class.
24 * @param className char[]
27 * @param needQualification boolean
28 * Flag indicating if the type name
29 * must be qualified by its package name (depending on imports).
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.
39 boolean needQualification);
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.
53 void acceptError(IProblem error);
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.
60 * @param declaringTypeName char[]
61 * Name of the type declaring this new field.
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.
72 char[] declaringTypePackageName,
73 char[] declaringTypeName,
77 * Code assist notification of an interface selection.
78 * @param packageName char[]
79 * Declaring package name of the interface.
81 * @param interfaceName char[]
82 * Name of the interface.
84 * @param needQualification boolean
85 * Flag indicating if the type name
86 * must be qualified by its package name (depending on imports).
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.
96 boolean needQualification);
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.
103 * @param declaringTypeName char[]
104 * Name of the type declaring this new method.
106 * @param selector char[]
107 * Name of the new method.
109 * @param parameterPackageNames char[][]
110 * Names of the packages in which the parameter types are declared.
111 * Should contain as many elements as parameterTypeNames.
113 * @param parameterTypeNames char[][]
114 * Names of the parameters types.
115 * Should contain as many elements as parameterPackageNames.
117 * @param isConstructor boolean
118 * Answer if the method is a constructor.
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.
128 char[] declaringTypePackageName,
129 char[] declaringTypeName,
131 char[][] parameterPackageNames,
132 char[][] parameterTypeNames,
133 boolean isConstructor);
136 * Code assist notification of a package selection.
137 * @param packageName char[]
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.
144 void acceptPackage(char[] packageName);