public class ModelEntry extends PlatformObject
This class is not meant to be extended or instantiated by clients.
Modifier and Type | Field and Description |
---|---|
protected ArrayList<IPluginModelBase> |
fExternalEntries
The list of external models with the same entry ID
|
protected ArrayList<IPluginModelBase> |
fWorkspaceEntries
The list of workspace models with the same entry ID
|
Constructor and Description |
---|
ModelEntry(String id)
Constructor
|
Modifier and Type | Method and Description |
---|---|
IPluginModelBase[] |
getActiveModels()
Returns all the plug-ins, with the model entry ID, that are currently active.
|
IPluginModelBase[] |
getExternalModels()
Returns all plug-ins in the target platform that have the model entry ID.
|
String |
getId()
Returns the model entry ID
|
IPluginModelBase |
getModel()
Returns the plug-in model for the best match plug-in with the given ID.
|
IPluginModelBase |
getModel(BundleDescription desc)
Return the plug-in model associated with the given bundle description or
null if none is found. |
IPluginModelBase[] |
getWorkspaceModels()
Returns all the workspace plug-ins that have the model entry ID
|
boolean |
hasExternalModels()
Returns
true if there are target plug-ins associated with the ID
of this model entry; false otherwise. |
boolean |
hasWorkspaceModels()
Returns
true if there are workspace plug-ins associated with the ID
of this model entry; false otherwise. |
getAdapter
protected ArrayList<IPluginModelBase> fWorkspaceEntries
protected ArrayList<IPluginModelBase> fExternalEntries
public ModelEntry(String id)
id
- the entry IDpublic IPluginModelBase[] getWorkspaceModels()
public IPluginModelBase[] getExternalModels()
public IPluginModelBase getModel()
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.
public IPluginModelBase[] getActiveModels()
Workspace plug-ins are always active. Target plug-ins are only active if:
public String getId()
public IPluginModelBase getModel(BundleDescription desc)
null
if none is found.desc
- the given bundle descriptionpublic boolean hasWorkspaceModels()
true
if there are workspace plug-ins associated with the ID
of this model entry; false
otherwise.true
if there are workspace plug-ins associated with the ID
of this model entry; false
otherwise.public boolean hasExternalModels()
true
if there are target plug-ins associated with the ID
of this model entry; false
otherwise.true
if there are target plug-ins associated with the ID
of this model entry; false
otherwise.
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.