Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse PDE Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.pde.core
Interface IModelProvider

public interface IModelProvider

Classes that implement this interface are responsible for holding a table of models associated with the underlying objects. They have several responsibilities:

- To hold model objects in one place
- To allow requesters to connect to the models or to disconnect from them.
- To maintain reference count of model users.
- To ensure "one writer/many readers" access to the model so that only one requester can get an editable copy of the model at any time.
- To notify interested parties when models are added and removed.

Model providers are responsible for listening to the workspace, updating models whose underlying resources have been updated, and removing them from the table when those resources have been deleted.

Since:
  2.0

Method Summary
`void` | `addModelProviderListener(IModelProviderListener listener)` Registers a listener that will be notified about changes in the managed models.
`IModel` | `getModel(IFile file)` Returns the model for the provided file resource.
`void` | `removeModelProviderListener(IModelProviderListener listener)` Deregisters a listener from notification.

Method Detail

### addModelProviderListener

    public void addModelProviderListener(IModelProviderListener listener)

  Registers a listener that will be notified about changes in the managed models.

  Parameters:
    `listener` - the listener that will be registered

### getModel

    public IModel getModel(IFile file)

  Returns the model for the provided file resource.

  Parameters:
    `file` - the file resource we need the model for
  Returns:
    the object that represents a structured representation of the file content

### removeModelProviderListener

    public void removeModelProviderListener(IModelProviderListener listener)

  Deregisters a listener from notification.

  Parameters:
    `listener` - the listener to be deregistered

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse PDE Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) IBM Corp. and others 2000, 2004. All Rights Reserved.