Package org.eclipse.pde.core.plugin
Interface IPluginBase
- All Superinterfaces:
IAdaptable
,IExtensions
,IIdentifiable
,IPluginObject
,IWritable
A model object that represents the content of a plug-in or
fragment manifest. This object contains data that is common
for both plug-ins and fragments.
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
A property that will be used to notify that import order in a plug-in has changed.static final String
A property that will be used to notify that library order in a plug-in has changed.static final String
A property that will be used to notify that the provider name has changed.static final String
A property that will be used to notify that 3.0 release compatibility flag has been changed.static final String
A property that will be used to notify that a version has changed.Fields inherited from interface org.eclipse.pde.core.plugin.IExtensions
P_EXTENSION_ORDER
Fields inherited from interface org.eclipse.pde.core.IIdentifiable
P_ID
Fields inherited from interface org.eclipse.pde.core.plugin.IPluginObject
P_NAME
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(IPluginImport pluginImport) Adds a new plug-in import to this plugin.void
add
(IPluginLibrary library) Adds a new library to this plugin.default boolean
Returns whether this plugin exports its external annotations (.eea files) to be considered by clients performing annotation based null analysis.Returns imports defined in this plug-in.Returns libraries referenced in this plug-in.Returns a name of the plug-in provider.Returns version of the manifest grammarReturns this plug-in's versionvoid
remove
(IPluginImport pluginImport) Removes an import from the plugin.void
remove
(IPluginLibrary library) Removes a library from the plugin.void
setProviderName
(String providerName) Sets the name of the plug-in provider.void
setSchemaVersion
(String schemaVersion) Sets the R3.0 compatibility flagvoid
setVersion
(String version) Sets the version of the plug-in.void
swap
(IPluginImport import1, IPluginImport import2) Swaps the positions of the plug-ins provided in in the dependency list.void
swap
(IPluginLibrary l1, IPluginLibrary l2) Swaps the positions of the provided libraries in the list of libraries.Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
Methods inherited from interface org.eclipse.pde.core.plugin.IExtensions
add, add, getExtensionPoints, getExtensions, getIndexOf, remove, remove, swap
Methods inherited from interface org.eclipse.pde.core.IIdentifiable
getId, setId
Methods inherited from interface org.eclipse.pde.core.plugin.IPluginObject
getModel, getName, getParent, getPluginBase, getPluginModel, getResourceString, getTranslatedName, isInTheModel, isValid, setInTheModel, setName
-
Field Details
-
P_PROVIDER
A property that will be used to notify that the provider name has changed.- See Also:
-
P_VERSION
A property that will be used to notify that a version has changed.- See Also:
-
P_LIBRARY_ORDER
A property that will be used to notify that library order in a plug-in has changed.- See Also:
-
P_IMPORT_ORDER
A property that will be used to notify that import order in a plug-in has changed.- See Also:
-
P_SCHEMA_VERSION
A property that will be used to notify that 3.0 release compatibility flag has been changed.- See Also:
-
-
Method Details
-
add
Adds a new library to this plugin. This method will throw a CoreException if model is not editable.- Parameters:
library
- the new library- Throws:
CoreException
- if the model is not editable
-
add
Adds a new plug-in import to this plugin. This method will throw a CoreException if model is not editable.- Parameters:
pluginImport
- the new import object- Throws:
CoreException
- if the model is not editable
-
remove
Removes an import from the plugin. This method will throw a CoreException if the model is not editable.- Parameters:
pluginImport
- the import object- Throws:
CoreException
- if the model is not editable
-
getLibraries
IPluginLibrary[] getLibraries()Returns libraries referenced in this plug-in.- Returns:
- an array of libraries
-
getImports
IPluginImport[] getImports()Returns imports defined in this plug-in.- Returns:
- an array of import objects
-
getProviderName
String getProviderName()Returns a name of the plug-in provider.- Returns:
- plug-in provider name
-
getVersion
String getVersion()Returns this plug-in's version- Returns:
- the version of the plug-in
-
remove
Removes a library from the plugin. This method will throw a CoreException if the model is not editable.- Parameters:
library
- the library object- Throws:
CoreException
- if the model is not editable
-
setProviderName
Sets the name of the plug-in provider. This method will throw a CoreException if the model is not editable.- Parameters:
providerName
- the new provider name- Throws:
CoreException
- if the model is not editable
-
setVersion
Sets the version of the plug-in. This method will throw a CoreException if the model is not editable.- Parameters:
version
- the new plug-in version- Throws:
CoreException
- if the model is not editable
-
swap
Swaps the positions of the provided libraries in the list of libraries. Libraries are looked up by the class loader in the order of declaration. If two libraries contain classes with the same name, library order will determine which one is encountered first.- Parameters:
l1
- the first library objectl2
- the second library object- Throws:
CoreException
- if the model is not editable
-
swap
Swaps the positions of the plug-ins provided in in the dependency list. This order is the one used used by the classloader when loading classes.- Parameters:
import1
- the first import objectimport2
- the second import object- Throws:
CoreException
- if the model is not editable
-
getSchemaVersion
String getSchemaVersion()Returns version of the manifest grammar- Returns:
- version of the manifest grammar, or null
-
setSchemaVersion
Sets the R3.0 compatibility flag- Parameters:
schemaVersion
- version of the manifest grammar- Throws:
CoreException
- if the model is not editable
-
exportsExternalAnnotations
default boolean exportsExternalAnnotations()Returns whether this plugin exports its external annotations (.eea files) to be considered by clients performing annotation based null analysis. This is read from the manifest headerEclipse-ExportExternalAnnotations
.- Since:
- 3.15
-