Interface IModelProviderDescriptor


public interface IModelProviderDescriptor
A model provider descriptor contains information about a model provider obtained from the plug-in manifest (plugin.xml) file.

Model provider descriptors are platform-defined objects that exist independent of whether that model provider's plug-in has been started. In contrast, a model provider's runtime object (ModelProvider) generally runs plug-in-defined code.

Since:
3.2
See Also:
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.
  • Method Details

    • getExtendedModels

      String[] getExtendedModels()
      Return the ids of model providers that this model provider extends.
      Returns:
      the ids of model providers that this model provider extends
    • getId

      String getId()
      Returns the unique identifier of this model provider.

      The model provider identifier is composed of the model provider's plug-in id and the simple id of the provider extension. For example, if plug-in "com.xyz" defines a provider extension with id "myModelProvider", the unique model provider identifier will be "com.xyz.myModelProvider".

      Returns:
      the unique model provider identifier
    • getLabel

      String getLabel()
      Returns a displayable label for this model provider. Returns the empty string if no label for this provider is specified in the plug-in manifest file.

      Note that any translation specified in the plug-in manifest file is automatically applied.

      Returns:
      a displayable string label for this model provider, possibly the empty string
    • getMatchingResources

      IResource[] getMatchingResources(IResource[] resources) throws CoreException
      From the provides set of resources, return those that match the enablement rule specified for the model provider descriptor. The resource mappings for the returned resources can then be obtained by invoking ModelProvider.getMappings(IResource[], ResourceMappingContext, IProgressMonitor)
      Parameters:
      resources - the resources
      Returns:
      the resources that match the descriptor's enablement rule
      Throws:
      CoreException
    • getMatchingTraversals

      ResourceTraversal[] getMatchingTraversals(ResourceTraversal[] traversals) throws CoreException
      Return the set of traversals that overlap with the resources that this descriptor matches.
      Parameters:
      traversals - the traversals being tested
      Returns:
      the subset of these traversals that overlap with the resources that match this descriptor
      Throws:
      CoreException - in case of error; depends on actual implementation
    • getModelProvider

      ModelProvider getModelProvider() throws CoreException
      Return the model provider for this descriptor, instantiating it if it is the first time the method is called.
      Returns:
      the model provider for this descriptor
      Throws:
      CoreException - if the model provider could not be instantiated for some reason