blob: f20011662ef29ada749543933e82621df425a0f5 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2010 xored software, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* xored software, Inc. - initial API and Implementation (Alex Panchenko)
*******************************************************************************/
package org.eclipse.dltk.javascript.typeinfo;
import java.util.Set;
import org.eclipse.dltk.javascript.typeinfo.model.Type;
public interface ITypeProvider {
/**
* Initialize this provider to operate with the specified
* <code>context</code>. Return <code>false</code> to ignore this provider.
*
* @param source
* @return
*/
boolean initialize(ITypeInfoContext context);
/**
* Returns type with the specified name or <code>null</code>
*
* @param context
* operation context
* @param mode
* type mode, can be <code>null</code>
* @param typeName
* the type name
* @return
*/
public Type getType(ITypeInfoContext context, TypeMode mode, String typeName);
/**
* Return the type names starting with the specified prefix
*
* @param context
* operation context
* @param mode
* type mode, not <code>null</code>
* @param prefix
* the prefix, not <code>null</code>
* @return
*/
public Set<String> listTypes(ITypeInfoContext context, TypeMode mode,
String prefix);
}