/*******************************************************************************
* Copyright © 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*
*******************************************************************************/
package org.eclipse.edt.ide.core.internal.model.codeassist;
/**
* This interface defines the API that may be used to implement any
* search-based tool (such as a CodeAssist, a Finder, ...).
* It is mainly used to hide from the search tool the implementation
* of the underlying environment and its constructions.
*/
public interface ISearchableNameEnvironment {
/**
* Find the packages that start with the given prefix.
* A valid prefix is a qualified name separated by periods
* (ex. java.util).
* The packages found are passed to:
* ISearchRequestor.acceptPackage(char[][] packageName)
*/
void findPackages(char[] prefix, ISearchRequestor requestor);
/**
* Find the top-level types (classes and interfaces) that are defined
* in the current environment and whose name starts with the
* given prefix. The prefix is a qualified name separated by periods
* or a simple name (ex. java.util.V or V).
*
* The types found are passed to one of the following methods (if additional
* information is known about the types):
* ISearchRequestor.acceptPart(char[][] packageName, char[] typeName, int modifiers)
*
* This method can not be used to find member types... member
* types are found relative to their enclosing type.
*/
void findParts(char[] prefix, ISearchRequestor requestor);
}