org.eclipse.pde.core.plugin

## Interface IPluginModelBase

All Superinterfaces:
  IAdaptable, IBaseModel, IModel, IModelChangeProvider, ISharedExtensionsModel, ISharedPluginModel

All Known Subinterfaces:
  IFragmentModel, IPluginModel

    public interface IPluginModelBase
    extends ISharedExtensionsModel, IModelChangeProvider

This type of model is created by parsing the manifest file. It serves as a base interface for both plug-in and fragment models by holding data common to both. If the file is a workspace resource, it will be available as the underlying resource of the model. The model may be read-only or editable. It will also make a reference to the build.properties model when created. The reference will be of the same type as the model itself: if the model is editable, it will attempt to obtain an exclusive editable copy of build.properties model.

The plug-in model can be disabled. Disabling the model will not change its data. Users of the model will have to decide if the disabled state if of any importance to them or not.

The model is capable of notifying listeners about changes. An attempt to change a read-only model will result in a CoreException.

Restriction:
  This interface is not intended to be implemented by clients.
Restriction:
  This interface is not intended to be extended by clients.

### Method Summary

All Methods Instance Methods Abstract Methods Deprecated Methods
`IPluginBase` `createPluginBase()` Creates and return a top-level plugin model object
`IBuildModel` `getBuildModel()` Deprecated. This method has always returned `null`. Since 3.7, use `PluginRegistry.createBuildModel(IPluginModelBase)` instead.
`BundleDescription` `getBundleDescription()` Returns the bundle description of the plug-in in case the plug-in uses the new OSGi bundle layout.
`URL` `getNLLookupLocation()` Deprecated. The URL returned is not encoded. If the file path contains special characters such as `#` this URL cannot be used for opening streams. Instead use `ISharedPluginModel.getInstallLocation()` and create the URL using an encoding tool such as `URIUtil`. Deprecated in 4.3.
`IPluginBase` `getPluginBase()` Returns a top-level model object.
`IPluginBase` `getPluginBase(boolean createIfMissing)` Returns a top-level model object.
`IPluginModelFactory` `getPluginFactory()` Returns the factory that can be used to create new objects for this model
`boolean` `isEnabled()` Returns true if this model is currently enabled.
`boolean` `isFragmentModel()` Tests if this model is for the plug-in fragment.
`void` `setBundleDescription(BundleDescription description)` Associates the bundle description of the plug-in with this model in case the plug-in uses the new OSGi bundle layout.
`void` `setEnabled(boolean enabled)` Sets the enable state of the model.

### Methods inherited from interface org.eclipse.pde.core.plugin.ISharedExtensionsModel

`getExtensions, getExtensions`

### Methods inherited from interface org.eclipse.pde.core.plugin.ISharedPluginModel

`getFactory, getInstallLocation`

### Methods inherited from interface org.eclipse.pde.core.IModel

`getResourceString, getTimeStamp, getUnderlyingResource, isInSync, isLoaded, isReconcilingModel, load, load, reload`

### Methods inherited from interface org.eclipse.pde.core.IBaseModel

`dispose, isDisposed, isEditable, isValid`

### Methods inherited from interface org.eclipse.core.runtime.IAdaptable

`getAdapter`

### Methods inherited from interface org.eclipse.pde.core.IModelChangeProvider

`addModelChangedListener, fireModelChanged, fireModelObjectChanged, removeModelChangedListener`

### Method Detail

#### createPluginBase

    IPluginBase createPluginBase()

Creates and return a top-level plugin model object

Returns:
  a top-level model object representing a plug-in or a fragment.

#### getBuildModel

    @Deprecated
    IBuildModel getBuildModel()

Deprecated. This method has always returned `null`. Since 3.7, use `PluginRegistry.createBuildModel(IPluginModelBase)` instead.
Returns an associated build.properties model that works in conjunction with this model.

This method always returns `null`

Returns:
  `null`

#### getPluginBase

    IPluginBase getPluginBase()

Returns a top-level model object. Equivalent to calling

    getPluginBase(true)

.

Returns:
  a top-level model object representing a plug-in or a fragment.

#### getPluginBase

    IPluginBase getPluginBase(boolean createIfMissing)

Returns a top-level model object.

Parameters:
  `createIfMissing` - if true, root model object will be created if not defined.
Returns:
  a top-level model object

#### isEnabled

    boolean isEnabled()

Returns true if this model is currently enabled.

Returns:
  true if the model is enabled

#### isFragmentModel

    boolean isFragmentModel()

Tests if this model is for the plug-in fragment.

Returns:
  `true` if the model is for the fragment, `false` otherwise.

#### setEnabled

    void setEnabled(boolean enabled)

Sets the enable state of the model.

Parameters:
  `enabled` - the new enable state

#### getPluginFactory

    IPluginModelFactory getPluginFactory()

Returns the factory that can be used to create new objects for this model

Returns:
  the plug-in model factory

#### getNLLookupLocation

    @Deprecated
    URL getNLLookupLocation()

Deprecated. The URL returned is not encoded. If the file path contains special characters such as `#` this URL cannot be used for opening streams. Instead use `ISharedPluginModel.getInstallLocation()` and create the URL using an encoding tool such as `URIUtil`. Deprecated in 4.3.
Returns an unencoded URL for the plug-in install location. The location described where to look for the translation property files.

Returns:
  the URL location of the plug-in where translation property files can be found

#### getBundleDescription

    BundleDescription getBundleDescription()

Returns the bundle description of the plug-in in case the plug-in uses the new OSGi bundle layout.

Returns:
  bundle description if this is an OSGi plug-in, or `null` if the plug-in is in a classic format.
Since:
  3.0

#### setBundleDescription

    void setBundleDescription(BundleDescription description)

Associates the bundle description of the plug-in with this model in case the plug-in uses the new OSGi bundle layout.

Parameters:
  `description` - bundle description to associate with this model
Since:
  3.0