Index Configuration

Identifier:
com.ibm.xtools.emf.index.configurationEntries

Since:
7.0

Description:

Extension point for the definition of an index contribution. This extension is used by clients to configure entries for the indexing platform. The elements are:

  1. structuralFeature: Attribute features (EAttribute) that need to be indexed for the specified EPackage. The nsURI attribute specifies the name space definition for the package. The features attribute is a comma separated list of feature names. In the current version clients have to specify only the attribute features that need to be indexed. The indexing platform by default will index all the reference features. The feature name is specified as the {EClass name}.{EAttribute name}. Please refer to the example shown below.
  2. contentType: Content types whose associated file extensions and file names that need to be indexed. The typeIds attribute is a comma separated list of the content type ids whose supported file extensions and file names need to be indexed. The class attribute specifies the com.ibm.xtools.emf.index.provider.IIndexProviderFactory used to create the com.ibm.xtools.emf.index.provider.IIndexProvider objects. The index providers are used for creating index entries for files associated with these content type ids.
  3. uriParser: The parser class associated with a specific URI scheme. The scheme attribute defines the URI scheme. The class attribute provides the com.ibm.xtools.emf.index.parser.IURIParser object to handle URIs with the specified scheme.
  4. resources: Specifies statically deployed resources to be indexed. The resourceProvider element has a class attribute that provides the fully-qualified name of a class implementing the com.ibm.xtools.emf.index.provider.IResourceProvider interface.

Configuration Markup:

<!ELEMENT extension (structuralFeature* , contentType* , uriParser* , resources*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT structuralFeature EMPTY>

<!ATTLIST structuralFeature

nsURI    CDATA #REQUIRED

features CDATA #REQUIRED>

Specifies all the attribute features to be registered with the indexing platform



<!ELEMENT contentType EMPTY>

<!ATTLIST contentType

typeIds           CDATA #REQUIRED

class             CDATA #REQUIRED

interpretContents (true | false) >

Specifies all the content types to be registered with the indexing platform



<!ELEMENT uriParser EMPTY>

<!ATTLIST uriParser

scheme CDATA #REQUIRED

class  CDATA #REQUIRED>

Specifies an index URI parser to be registered with the indexing platform



<!ELEMENT resources (resource* , bundleResource* , resourceProvider*)>

Specifies statically deployed resources to be indexed.



<!ELEMENT resource EMPTY>

<!ATTLIST resource

uri CDATA #REQUIRED>

Specifies a literal resource URI.



<!ELEMENT bundleResource EMPTY>

<!ATTLIST bundleResource

bundle CDATA #IMPLIED

path   CDATA #REQUIRED>


<!ELEMENT resourceProvider EMPTY>

<!ATTLIST resourceProvider

class CDATA #REQUIRED>


Examples:
Following is an example of an index configuration extension:


     <extension
           point="com.ibm.xtools.emf.index.configurationEntries">
        <contentType
              class="com.ibm.xtools.emf.index.providers.XMIIndexProviderFactory"
              typeIds="org.eclipse.emf.examples.library.extendedLibrary"/>
        <structuralFeature
              features="Book.title,Writer.firstName,Writer.lastName,BookOnTape.title,Library.name"
              nsURI="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0"/>
        <uriParser
              class="com.ibm.xtools.emf.index.examples.parser.PathMapParser"
              scheme="pathmap"/>
        <resources>
           <resource uri="pathmap://EXAMPLE_MODELS/Example1.extlibrary"/>
           <bundleResource
                 bundle="com.ibm.xtools.emf.index.examples"
                 path="/models/LibraryOfCongress.extlibrary"/>
        </resources>
     </extension>

API Information:

  1. contentType: The class attribute for this element must extend com.ibm.xtools.emf.index.provider.AbstractIndexProviderFactory class.
  2. uriParser: The class attribute for this element must extend the com.ibm.xtools.emf.index.parser.AbstractURIParser class.
  3. resources: The resourceProvider element has a class attribute that must implement the com.ibm.xtools.emf.index.provider.IResourceProvider interface.

Supplied Implementation:
Refer to EMF Index Examples plugin (com.ibm.xtools.emf.index.examples)


Copyright (c) 2004, 2018 Model RealTime, HCL and others. All Rights Reserved.