|
Eclipse PDE Release 3.5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.pde.core.plugin.PluginRegistry
public class PluginRegistry
The central access point for models representing plug-ins found in the workspace and in the targret platform.
This class provides static methods only; it is not intended to be instantiated or subclassed by clients.
Constructor Summary | |
---|---|
PluginRegistry()
|
Method Summary | |
---|---|
static ModelEntry |
findEntry(String id)
Returns a model entry containing all workspace and target plug-ins by the given ID |
static IPluginModelBase |
findModel(org.eclipse.osgi.service.resolver.BundleDescription desc)
Returns a plug-in model associated with the given bundle description |
static IPluginModelBase |
findModel(IProject project)
Returns the plug-in model corresponding to the given project, or null
if the project does not represent a plug-in project or if it contains a manifest file
that is malformed or missing vital information. |
static IPluginModelBase |
findModel(String id)
Returns the plug-in model for the best match plug-in with the given ID. |
static IPluginModelBase[] |
getActiveModels()
Returns all plug-ins and fragments in the workspace as well as all plug-ins and fragments that are checked on the Target Platform preference page. |
static IPluginModelBase[] |
getActiveModels(boolean includeFragments)
Returns all plug-ins and (possibly) fragments in the workspace as well as all plug-ins and (possibly) fragments that are checked on the Target Platform preference page. |
static IPluginModelBase[] |
getAllModels()
Returns all plug-ins and fragments in the workspace as well as all target plug-ins and fragments, regardless whether or not they are checked or not on the Target Platform preference page. |
static IPluginModelBase[] |
getAllModels(boolean includeFragments)
Returns all plug-ins and (possibly) fragments in the workspace as well as all plug-ins and (possibly) fragments, regardless whether or not they are checked on the Target Platform preference page. |
static IPluginModelBase[] |
getExternalModels()
Return the model manager that keeps track of plug-ins in the target platform |
static IPluginModelBase[] |
getWorkspaceModels()
Returns all plug-in models in the workspace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PluginRegistry()
Method Detail |
---|
public static ModelEntry findEntry(String id)
id
- the plug-in ID
public static IPluginModelBase findModel(String id)
A workspace plug-in is always preferably returned over a target plug-in. A plug-in that is checked/enabled on the Target Platform preference page is always preferably returned over a target plug-in that is unchecked/disabled.
In the case of a tie among workspace plug-ins or among target plug-ins, the plug-in with the highest version is returned.
In the case of a tie among more than one suitable plug-in that have the same version, one of those plug-ins is randomly returned.
id
- the plug-in ID
public static IPluginModelBase findModel(IProject project)
null
if the project does not represent a plug-in project or if it contains a manifest file
that is malformed or missing vital information.
project
- the project
null
if the project
is not a plug-in projectpublic static IPluginModelBase findModel(org.eclipse.osgi.service.resolver.BundleDescription desc)
desc
- the bundle description
null
if none existspublic static IPluginModelBase[] getActiveModels()
If a workspace plug-in/fragment has the same ID as a target plug-in/fragment, the target counterpart is skipped and not included.
Equivalent to getActiveModels(true)
public static IPluginModelBase[] getActiveModels(boolean includeFragments)
If a workspace plug-in/fragment has the same ID as a target plug-in, the target counterpart is skipped and not included.
The returned result includes fragments only if includeFragments
is set to true
includeFragments
- a boolean indicating if fragments are desired in the returned
result
public static IPluginModelBase[] getAllModels()
If a workspace plug-in/fragment has the same ID as a target plug-in, the target counterpart is skipped and not included.
Equivalent to getAllModels(true)
public static IPluginModelBase[] getAllModels(boolean includeFragments)
If a workspace plug-in/fragment has the same ID as a target plug-in/fragment, the target counterpart is skipped and not included.
The returned result includes fragments only if includeFragments
is set to true
includeFragments
- a boolean indicating if fragments are desired in the returned
result
public static IPluginModelBase[] getWorkspaceModels()
public static IPluginModelBase[] getExternalModels()
|
Eclipse PDE Release 3.5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |