Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core/schema/CIndex.exsd')
-rw-r--r--core/org.eclipse.cdt.core/schema/CIndex.exsd119
1 files changed, 91 insertions, 28 deletions
diff --git a/core/org.eclipse.cdt.core/schema/CIndex.exsd b/core/org.eclipse.cdt.core/schema/CIndex.exsd
index e51d98216fc..3525095e945 100644
--- a/core/org.eclipse.cdt.core/schema/CIndex.exsd
+++ b/core/org.eclipse.cdt.core/schema/CIndex.exsd
@@ -14,6 +14,7 @@
<complexType>
<choice minOccurs="1" maxOccurs="unbounded">
<element ref="ExportProjectProvider"/>
+ <element ref="ReadOnlyPDOMProvider"/>
</choice>
<attribute name="point" type="string" use="required">
<annotation>
@@ -45,7 +46,9 @@
<element name="ExportProjectProvider">
<annotation>
<documentation>
- This element allows contribution of alternate IExportProjectProvider implementations. These can then be referenced by fully qualified class name in the command line tool (see option -pprovider).
+ &lt;h2&gt;ExportProjectProvider&lt;/h2&gt;
+&lt;p&gt;
+This subelement of CIndex allows contribution of alternate IExportProjectProvider implementations. These can then be referenced by fully qualified class name in the command line tool (see option -pprovider).
&lt;p&gt;
&lt;b&gt;Invoking the application as a headless application&lt;/b&gt;
@@ -53,30 +56,30 @@ This example ant file shows how to invoke the tool headlessly, the same approach
&lt;pre&gt;
&lt;project name=&quot;Generate PDOM&quot; default=&quot;generate&quot;&gt;
- &lt;target name=&quot;generate&quot;&gt;
- &lt;!-- This script shows how to invoke the default project provider (ExternalExportProjectProvider) --&gt;
- &lt;property name=&quot;pprovider&quot; value=&quot;org.eclipse.cdt.core.index.export.ExternalExportProjectProvider&quot;/&gt;
- &lt;property name=&quot;target&quot; value=&quot;C:\ExportedPDOMs\acmeSDK_2_5.pdom&quot;/&gt; &lt;!-- Where the output pdom is to go --&gt;
- &lt;property name=&quot;source&quot; value=&quot;E:\AcmeSDK\v2.5\inc&quot;/&gt; &lt;!-- e.g. the directory to source content from --&gt;
- &lt;property name=&quot;id&quot; value=&quot;com.acme.mysdk.v2.5&quot;/&gt; &lt;!-- the id to store in the generate pdom --&gt;
-
- &lt;property name=&quot;eclipse.home&quot; value=&quot;C:\eclipse&quot;/&gt; &lt;!-- e.g. The eclipse installation to use. This installation must contain CDT 4.0+ plugins --&gt;
-
- &lt;java classname=&quot;org.eclipse.equinox.launcher.Main&quot;&gt;
- &lt;classpath&gt;
- &lt;fileset dir=&quot;${eclipse.home}/plugins&quot;&gt;
- &lt;include name=&quot;*equinox.launcher*.jar&quot;/&gt;
- &lt;/fileset&gt;
- &lt;/classpath&gt;
- &lt;arg value=&quot;-nosplash&quot;/&gt;
- &lt;arg value=&quot;-exitdata&quot;/&gt;
- &lt;arg value=&quot;-application&quot;/&gt;&lt;arg value=&quot;org.eclipse.cdt.core.GeneratePDOM&quot;/&gt;
- &lt;arg value=&quot;-pprovider&quot;/&gt;&lt;arg value=&quot;${pprovider}&quot;/&gt;
- &lt;arg value=&quot;-source&quot;/&gt;&lt;arg value=&quot;${source}&quot;/&gt;
- &lt;arg value=&quot;-target&quot;/&gt;&lt;arg value=&quot;${target}&quot;/&gt;
- &lt;arg value=&quot;-id&quot;/&gt;&lt;arg value=&quot;${id}&quot;/&gt;
- &lt;/java&gt;
- &lt;/target&gt;
+ &lt;target name=&quot;generate&quot;&gt;
+ &lt;!-- This script shows how to invoke the default project provider (ExternalExportProjectProvider) --&gt;
+ &lt;property name=&quot;pprovider&quot; value=&quot;org.eclipse.cdt.core.index.export.ExternalExportProjectProvider&quot;/&gt;
+ &lt;property name=&quot;target&quot; value=&quot;C:\ExportedPDOMs\acmeSDK_2_5.pdom&quot;/&gt; &lt;!-- Where the output pdom is to go --&gt;
+ &lt;property name=&quot;source&quot; value=&quot;E:\AcmeSDK\v2.5\inc&quot;/&gt; &lt;!-- e.g. the directory to source content from --&gt;
+ &lt;property name=&quot;id&quot; value=&quot;com.acme.mysdk.v2.5&quot;/&gt; &lt;!-- the id to store in the generate pdom --&gt;
+
+ &lt;property name=&quot;eclipse.home&quot; value=&quot;C:\eclipse&quot;/&gt; &lt;!-- e.g. The eclipse installation to use. This installation must contain CDT 4.0+ plugins --&gt;
+
+ &lt;java classname=&quot;org.eclipse.equinox.launcher.Main&quot;&gt;
+ &lt;classpath&gt;
+ &lt;fileset dir=&quot;${eclipse.home}/plugins&quot;&gt;
+ &lt;include name=&quot;*equinox.launcher*.jar&quot;/&gt;
+ &lt;/fileset&gt;
+ &lt;/classpath&gt;
+ &lt;arg value=&quot;-nosplash&quot;/&gt;
+ &lt;arg value=&quot;-exitdata&quot;/&gt;
+ &lt;arg value=&quot;-application&quot;/&gt;&lt;arg value=&quot;org.eclipse.cdt.core.GeneratePDOM&quot;/&gt;
+ &lt;arg value=&quot;-pprovider&quot;/&gt;&lt;arg value=&quot;${pprovider}&quot;/&gt;
+ &lt;arg value=&quot;-source&quot;/&gt;&lt;arg value=&quot;${source}&quot;/&gt;
+ &lt;arg value=&quot;-target&quot;/&gt;&lt;arg value=&quot;${target}&quot;/&gt;
+ &lt;arg value=&quot;-id&quot;/&gt;&lt;arg value=&quot;${id}&quot;/&gt;
+ &lt;/java&gt;
+ &lt;/target&gt;
&lt;/project&gt;
&lt;/pre&gt;
&lt;p&gt;
@@ -85,15 +88,15 @@ This example ant file shows how to invoke the tool headlessly, the same approach
Specify &quot;org.eclipse.cdt.core.GeneratePDOM&quot; as the application to launch
&lt;p&gt;
In the Argument tabs provide (for example)
- -target C:\ExportedPDOMs\acmeSDK_2_5.pdom -source E:\AcmeSDK\v2.5\inc -include E:\this.h -id com.acme.mysdk.v2.5
+ -target C:\ExportedPDOMs\acmeSDK_2_5.pdom -source E:\AcmeSDK\v2.5\inc -include E:\this.h -id com.acme.mysdk.v2.5
&lt;p&gt;
</documentation>
</annotation>
<complexType>
- <attribute name="class" type="string">
+ <attribute name="class" type="string" use="required">
<annotation>
<documentation>
-
+ the fully qualified name of the IExportProjectProvider implementation to register
</documentation>
<appInfo>
<meta.attribute kind="java"/>
@@ -103,6 +106,66 @@ In the Argument tabs provide (for example)
</complexType>
</element>
+ <element name="ReadOnlyPDOMProvider">
+ <annotation>
+ <documentation>
+ &lt;h2&gt;ReadOnlyPDOMProvider&lt;/h2&gt;
+&lt;p&gt;
+This subelement of CIndex allows ISVs to contribute read-only prebuilt PDOM files to the CDT Index. The only information needed is the fully qualified class name of an implementatin of org.eclipse.cdt.core.index.IOfflinePDOMProvider. This implementation will be consulted during the eclipse session for the appropriate read-only content to make add to the logical index. The logical index is accessible via the org.eclipse.core.index.IIndex API.
+
+ An example of contributing a prebuilt read-only pdom:
+&lt;pre&gt;
+&lt;CIndex&gt;
+ &lt;ReadOnlyPDOMProvider class=&quot;com.acme.ide.index.AcmeSDKProvider&quot;/&gt;
+&lt;/CIndex&gt;
+&lt;/pre&gt;
+
+and the corresponding implementation
+
+&lt;pre&gt;
+package com.acme.ide.index.sdk;
+
+import org.eclipse.core.index.provider.IReadOnlyPDOMProvider;
+import org.eclipse.core.index.provider.IPDOMDescriptor;
+import org.eclipse.core.index.IIndexLocationConverter;
+import org.eclipse.core.index.URIRelativeLocationConverter;
+
+public class AcmeSDKProvider implements IReadOnlyPDOMProvider {
+ public boolean providesFor(ICProject project) {
+ // e.g. decide by looking for acme project nature
+ return AcmeNature.isAcmeProject(project);
+ }
+
+ public IPDOMDescriptor[] getDescriptors(ICProject cproject, ICConfigurationDescription config) {
+ final IPath sdkBase = AcmeSDKAPI.getSDKBase(cproject, config);
+ return new IPDOMDescriptor[] { new IPDOMDescriptor() {
+ public IIndexLocationConverter getIndexLocationConverter() {
+ return new URIRelativeLocationConverter(URIUtil.toURI(sdkBase));
+ }
+ public IPath getLocation() {
+ IPath path = sdkBase.append(AcmeSDKAPI.getPrebuiltPDOMFilename(config));
+ return path;
+ }
+ }};
+ }
+}
+&lt;/pre&gt;
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ the fully qualified name of the IReadOnlyPDOMProvider implementation to register
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.cdt.core.index.provider.IReadOnlyPDOMProvider"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
<annotation>
<appInfo>
<meta.section type="since"/>

Back to the top