org.electrocodeogram.cpc.core.api.provider.registry
Interface IManagableProviderRegistry

All Superinterfaces:
IProviderRegistry

public interface IManagableProviderRegistry
extends IProviderRegistry

This interface lists additional methods which are required to manage a IProviderRegistry. As these methods are not meant for use outside of CPCCorePlugin but are never the less required for all potential alternative provider registry implementations, they are separately listed in this interface.

All users of the provider registry will always only see an IProviderRegistry interface.

Author:
vw
See Also:
IProviderRegistry, CPCCorePlugin

Method Summary
 void registerProvider(IProviderDescriptor providerDescriptor)
          Registers a provider with the given priority.
 void shutdown()
          Called when the provider registry is being shut down.
 boolean unregisterProvider(IProviderDescriptor providerDescriptor)
          Unregisters a provider with the registry.
 
Methods inherited from interface org.electrocodeogram.cpc.core.api.provider.registry.IProviderRegistry
lookupProvider, lookupProvider, lookupProviders
 

Method Detail

registerProvider

void registerProvider(IProviderDescriptor providerDescriptor)
Registers a provider with the given priority.

When used inside of Eclipse this method is usually not needed as the provider registry will retrieve information on the registered providers directly from the Eclipse extension point framework.

Parameters:
providerDescriptor - the provider to register, never null

unregisterProvider

boolean unregisterProvider(IProviderDescriptor providerDescriptor)
Unregisters a provider with the registry.
This operation has no effect if the provider was not registered.

Only the typeClass and providerClass values of the given IProviderDescriptor are used. If multiple providers match these criteria, all are unregistered.

Parameters:
providerDescriptor - the provider to unregister, never null
Returns:
true if the provider was unregistered, false if the provider wasn't registered in the first place

shutdown

void shutdown()
Called when the provider registry is being shut down.
This typically only happens when the Eclipse IDE is being shutdown.

All registered an instantiated providers need to be notified of this fact as they may need to do some cleanup work on shutdown.