1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 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.internal.codeassist;
13 import net.sourceforge.phpdt.internal.compiler.env.INameEnvironment;
16 * This interface defines the API that may be used to implement any search-based
17 * tool (such as a CodeAssist, a Finder, ...). It is mainly used to hide from
18 * the search tool the implementation of the underlying environment and its
21 public interface ISearchableNameEnvironment extends INameEnvironment {
24 * Find the packages that start with the given prefix. A valid prefix is a
25 * qualified name separated by periods (ex. java.util). The packages found
26 * are passed to: ISearchRequestor.acceptPackage(char[][] packageName)
28 void findPackages(char[] prefix, ISearchRequestor requestor);
31 * Find the top-level types (classes and interfaces) that are defined in the
32 * current environment and whose name starts with the given prefix. The
33 * prefix is a qualified name separated by periods or a simple name (ex.
36 * The types found are passed to one of the following methods (if additional
37 * information is known about the types):
38 * ISearchRequestor.acceptType(char[][] packageName, char[] typeName)
39 * ISearchRequestor.acceptClass(char[][] packageName, char[] typeName, int
40 * modifiers) ISearchRequestor.acceptInterface(char[][] packageName, char[]
41 * typeName, int modifiers)
43 * This method can not be used to find member types... member types are
44 * found relative to their enclosing type.
46 void findTypes(char[] prefix, ISearchRequestor requestor);