Model Providers

Identifier:
org.eclipse.core.resources.modelProviders

Since:
3.2

Description:
A model provider serves two purposes. Firstly, it is a means of grouping the resource mappings of a single model together for the purposes of performing operations, display, etc. Also, it provides a means of mapping a set of file system resources to the resource mappings that describe how a model maps to resources.

Configuration Markup:

<!ELEMENT extension (modelProvider , extends-model* , enablement?)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>


<!ELEMENT modelProvider EMPTY>

<!ATTLIST modelProvider

class CDATA #REQUIRED

>


<!ELEMENT extends-model EMPTY>

<!ATTLIST extends-model

id IDREF #REQUIRED

>


Examples:
The following is an example of using the modelProvider extension point. (in file plugin.xml)

   <extension
         id="modelProvider"
         name="Library Model Provider"
         point="org.eclipse.core.resources.modelProviders">
      <modelProvider
            class="org.eclipse.examples.library.LibraryModelProvider"
            name="Library Model Provider"/>
      <extends-model id="org.eclipse.core.resources.modelProvider"/>
      <enablement>
           <with variable="affectedNatures">
             <iterate operator="or">
               <equals value="org.eclipse.team.examples.library.nature"/>
             </iterate>
           </with>
           <with variable="element">
             <instanceof value="org.eclipse.core.resources.IFile"/>
           </with>
       </enablement>
   </extension>

API Information:
The value of the class attribute must represent an implementation of org.eclipse.core.resources.mapping.ModelProvider.

Supplied Implementation:
The platform itself does not have any predefined model providers. Particular product installs may include model providers as required.


Copyright (c) 2005, 2010 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html