public class PluginRegistryModel extends Object
This class may be instantiated, or further subclassed.
Modifier and Type | Field and Description |
---|---|
protected org.eclipse.core.internal.model.PluginMap |
fragments
Deprecated.
|
protected org.eclipse.core.internal.model.PluginMap |
plugins
Deprecated.
|
Constructor and Description |
---|
PluginRegistryModel()
Deprecated.
Creates a new plug-in registry model which contains no plug-ins.
|
Modifier and Type | Method and Description |
---|---|
void |
addFragment(PluginFragmentModel fragment)
Deprecated.
Adds the specified plug-in fragment to this registry.
|
void |
addPlugin(PluginDescriptorModel plugin)
Deprecated.
Adds the specified plug-in to this registry.
|
protected void |
assertIsWriteable()
Deprecated.
Checks that this model object is writeable.
|
PluginFragmentModel |
getFragment(String id)
Deprecated.
Returns the plug-in fragment with the given identifier
in this plug-in registry, or
null if there is no such
fragment. |
PluginFragmentModel |
getFragment(String id,
String version)
Deprecated.
Returns the identified plug-in fragment or
null if
the fragment does not exist. |
PluginFragmentModel[] |
getFragments()
Deprecated.
Returns the list of plug-in fragments managed by this registry.
|
PluginFragmentModel[] |
getFragments(String id)
Deprecated.
Returns all versions of the identified plug-in fragment
known to this plug-in registry.
|
PluginDescriptorModel |
getPlugin(String pluginId)
Deprecated.
Returns the plug-in descriptor with the given plug-in identifier
in this plug-in registry, or
null if there is no such
plug-in. |
PluginDescriptorModel |
getPlugin(String pluginId,
String version)
Deprecated.
Returns the identified plug-in or
null if
the plug-in does not exist. |
PluginDescriptorModel[] |
getPlugins()
Deprecated.
Returns the list of plug-ins managed by this registry.
|
PluginDescriptorModel[] |
getPlugins(String pluginId)
Deprecated.
Returns all versions of the identified plug-in descriptor
known to this plug-in registry.
|
boolean |
isReadOnly()
Deprecated.
Returns whether or not this model object is read-only.
|
boolean |
isResolved()
Deprecated.
Returns whether or not this model object has been resolved.
|
void |
markReadOnly()
Deprecated.
Sets this model object and all of its descendents to be read-only.
|
void |
markResolved()
Deprecated.
Sets this model object to be resolved.
|
static PluginRegistryModel |
parsePlugins(URL[] pluginPath,
Factory factory)
Deprecated.
Returns a plug-in registry containing all of the plug-ins discovered
on the given plug-in path.
|
void |
removeFragment(String id,
String version)
Deprecated.
Removes the fragment with id and version if it exists in this registry.
|
void |
removeFragments(String id)
Deprecated.
Removes all versions of the identified plug-in fragment from this registry.
|
void |
removePlugin(String pluginId,
String version)
Deprecated.
Removes the plug-in with id and version if it exists in this registry.
|
void |
removePlugins(String pluginId)
Deprecated.
Removes all versions of the given plug-in from this registry.
|
IStatus |
resolve(boolean trimDisabledPlugins,
boolean doCrossLinking)
Deprecated.
Runs a resolve through the entire registry.
|
protected org.eclipse.core.internal.model.PluginMap plugins
protected org.eclipse.core.internal.model.PluginMap fragments
public PluginRegistryModel()
public void addFragment(PluginFragmentModel fragment)
fragment
- the plug-in fragment to addpublic void addPlugin(PluginDescriptorModel plugin)
plugin
- the plug-in descriptor to addprotected void assertIsWriteable()
public PluginFragmentModel getFragment(String id)
null
if there is no such
fragment. If there are multiple versions of the identified fragment,
one will be non-deterministically chosen and returned.id
- the unique identifier of the plug-in fragment
(e.g. "com.example.acme"
).null
public PluginFragmentModel getFragment(String id, String version)
null
if
the fragment does not exist.id
- the unique identifier of the plug-in fragmentversion
- fragment version identifier. If null
is
specified, a non-deterministically chosen version of the identified fragment
(if any) will be returnednull
public PluginFragmentModel[] getFragments()
public PluginFragmentModel[] getFragments(String id)
id
- the unique identifier of the plug-in fragment
(e.g. "org.eclipse.core.resources"
).public PluginDescriptorModel getPlugin(String pluginId)
null
if there is no such
plug-in. If there are multiple versions of the identified plug-in,
one will be non-deterministically chosen and returned.pluginId
- the unique identifier of the plug-in
(e.g. "com.example.acme"
).null
public PluginDescriptorModel getPlugin(String pluginId, String version)
null
if
the plug-in does not exist.pluginId
- the unique identifier of the plug-in
(e.g. "org.eclipse.core.resources"
)version
- plug-in version identifier. If null
is specified,
a non-deterministically chosen version of the identified plug-in (if any)
will be returnednull
public PluginDescriptorModel[] getPlugins()
public PluginDescriptorModel[] getPlugins(String pluginId)
pluginId
- the unique identifier of the plug-in
(e.g. "org.eclipse.core.resources"
).public boolean isReadOnly()
true
if this model object is read-only,
false
otherwisemarkReadOnly()
public boolean isResolved()
true
if this model object has been resolved,
false
otherwisepublic void markReadOnly()
isReadOnly()
public void markResolved()
public void removeFragment(String id, String version)
id
- the unique identifier of the fragment to removeversion
- the version of the fragment to removepublic void removeFragments(String id)
id
- the unique identifier of the fragments to removepublic void removePlugin(String pluginId, String version)
pluginId
- the unique identifier of the plug-in to removeversion
- the version of the plug-in to removepublic void removePlugins(String pluginId)
pluginId
- the unique identifier of the plug-ins to removepublic IStatus resolve(boolean trimDisabledPlugins, boolean doCrossLinking)
If the parameter trimDisabledPlugins is set to true, all PluginDescriptorModels which are labelled as disabled will be removed from the registry.
If the paramter doCrossLinking is set to true, links will be created between ExtensionPointModels and their corresponding ExtensionModels. Not that these links will include disabled plugins if trimDisabledPlugins was set to false.
trimDisabledPlugins
- if true, remove all disabled plugins
from the registry (recommended value = true)doCrossLinking
- if true, link all ExtensionModels in the registry
to their corresponding ExtensionPointModel (recommended value = true).public static PluginRegistryModel parsePlugins(URL[] pluginPath, Factory factory)
The given plug-in path is the list of locations in which to look for plug-ins.
If an entry identifies a directory (i.e., ends in a '/'), this method
attempts to scan all sub-directories for plug-ins. Alternatively, an
entry may identify a particular plug-in manifest (plugin.xml
) file.
Note: this method does not affect the running platform. It is intended for introspecting installed plug-ins on this and other platforms. The returned registry is not the same as the platform's registry.
pluginPath
- the list of locations in which to look for plug-insfactory
- the factory to use to create runtime model objects
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.