TPTP 4.4.0 Testing Tools Project
Public API Specification

org.eclipse.hyades.test.ui.navigator
Interface ITypeProvider


public interface ITypeProvider

Type providers are responsible to collect and organize all elements of a given type located in a project. The returned node is shown in the logical view of the test navigator. The returned proxy nodes lifecyle is under the type provider responsibility. If the type provider implements the IDisposable interface, the IDisposable.dispose() will be invoked when the provider is no longer necessary. From a performance perspective, it is better for a type provider implementation to cache its returned values, unless their computing is trivial. Type providers also have the responsibility of providing updates of their content by using the provided context's IProxyNodeListener.

Since:
4.0

Method Summary
 ITypeProviderProxyNode get(org.eclipse.core.resources.IProject project, java.lang.String type)
          Returns a proxy node hierarchy based of the given type from elements located in the given project.
 void init(ITypeProviderContext context)
          Initializes the type provider with a context.
 

Method Detail

init

public void init(ITypeProviderContext context)
Initializes the type provider with a context.

Parameters:
context - The context in which the type provider will be used. The context provides various tools and information for the provider to interact with its context.

get

public ITypeProviderProxyNode get(org.eclipse.core.resources.IProject project,
                                  java.lang.String type)
Returns a proxy node hierarchy based of the given type from elements located in the given project. The returned hierarchy will appear as a special type provider node directly under the project. The implementation should not assume anything about the thread it will run in. This method may be invoked from any thread, and concurrent calls to this method may happen. However there will never be two concurrent calls for the same project.

Parameters:
project - the owner of the returned hierarchy.
type - the type of elements that type provider is interested in.
Returns:
a proxy node tree that represents all elements of the given type contained by the given project.

TPTP 4.4.0 Testing Tools Project
Public API Specification