blob: 7fe04f42ecea0953465476ff34dfed9e531d5f62 [file] [log] [blame]
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.cdt.cmake.is.core" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="org.eclipse.cdt.cmake.is.core" id="detectionParticipant" name="Tool Detection Participants"/>
</appinfo>
<documentation>
Allows plug-ins to contribute to detection of compiler include paths and preprocessor defines from a command-line text.
&lt;p&gt;This extension point teaches the &lt;i&gt;CompileCommandsParser&lt;/i&gt; to analyze compiler-specific command-lines incl. options for a specific compiler. The detected include paths, preprocessor defines and preprocessor un-defines from the compiler command-line get passed to the CDT indexer.&lt;/p&gt;
&lt;p&gt;Third party compiler vendors may use this extension point to add their compiler (or other tool) for improved syntax highlighting in the CDT&apos;s C/C++ editors.
&lt;/p&gt;
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<sequence minOccurs="1" maxOccurs="unbounded">
<element ref="tool"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
a fully qualified identifier of the target extension point
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
ID of the extension point, not used
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
Name of the extension point, not used
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="tool">
<annotation>
<documentation>
Specifies the details for detection of a specific compiler by its executable name and how the include paths, preprocessor defines and preprocessor un-defines are processed.
</documentation>
</annotation>
<complexType>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
The fully qualified name of a class that implements &lt;code&gt;org.eclipse.cdt.cmake.is.participant.IToolDetectionParticipant&lt;/code&gt;, The implementation must provide a public no-argument constructor.&lt;br/&gt;
You may want to consider sub-classing &lt;code&gt;org.eclipse.cdt.cmake.is.participant.DefaultToolDetectionParticipant&lt;/code&gt; for convenience instead of directly implementing the interface.
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn=":org.eclipse.cdt.cmake.is.participant.IToolDetectionParticipant"/>
</appinfo>
</annotation>
</attribute>
<attribute name="displayName" type="string" use="required">
<annotation>
<documentation>
The name of the compiler for display in the UI.
</documentation>
</annotation>
</attribute>
<attribute name="order" type="string" use="default" value="100000">
<annotation>
<documentation>
The order in which the participant takes place in the tool detection chain, specified as an positive integer value. Values below 10000 are reserved for internal purposes and will not be honored.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
1.0.0
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
Following is an example of a tool detection participant.
&lt;p&gt;This participant detects the preprocessor macros and include directories for the C compiler made by
the Foobar company:
&lt;pre&gt;
&lt;extension point=&quot;org.eclipse.cdt.cmake.is.core.detectionParticipant&quot;&gt;
&lt;tool class=&quot;com.foobar.ToolDetectionParticipant&quot; displayName=&quot;Foobar C&quot; /&gt;
&lt;/extension&gt;
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
To provide online help that lists the supported compilers along with the recognized arguments,
the extension point &lt;code&gt;org.eclipse.help.contentExtension&lt;/code&gt; can be used.&lt;br/&gt;
Plugin &lt;i&gt;org.eclipse.cdt.cmake.is.core.doc&lt;/i&gt; provides predefined help-anchors that allow to integrate the online help:
&lt;ol&gt;
&lt;li&gt;&lt;i&gt;extra_detection_participant_list&lt;/i&gt; for the commandline parser,&lt;/li&gt;
&lt;li&gt;&lt;i&gt;extra_detection_participant_builtins_list&lt;/i&gt; and
&lt;i&gt;extra_detection_participant_builtins_enhanced_list&lt;/i&gt; for the compiler built-ins parser.&lt;/li&gt;
&lt;/ol&gt;
Example file &lt;code&gt;help_content_extension.xml&lt;/code&gt;:
&lt;pre&gt;
&lt;contentExtension&gt;
&lt;contribution content=&quot;doc/compiler.xhtml#lsp&quot;
path=&quot;/org.eclipse.cdt.cmake.is.core.doc/doc/html/languageSettingsProviders.xhtml#extra_detection_participant_list&quot;/&gt;
&lt;contribution content=&quot;doc/compiler.xhtml#builtins&quot;
path=&quot;/org.eclipse.cdt.cmake.is.core.doc/doc/html/builtins-detection.xhtml#extra_detection_participant_builtins_list&quot;/&gt;
&lt;/contentExtension&gt;
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
The easiest way to implement a tool detection participant would be to sub-class &lt;code&gt;org.eclipse.cdt.cmake.is.participant.DefaultToolDetectionParticipant&lt;/code&gt;.
To configure your class, pass an instance of &lt;code&gt;org.eclipse.cdt.cmake.is.participant.DefaultToolCommandlineParser&lt;/code&gt; in its super-constructor.&lt;br/&gt;
Some predifined parsers for tool arguments can be found in the classes &lt;code&gt;Arglets&lt;/code&gt; and &lt;code&gt;ResponseFileArglets&lt;/code&gt;.
&lt;/p&gt;
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="implementation"/>
</appinfo>
<documentation>
The plugin &lt;i&gt;org.eclipse.cdt.cmake.is.intel&lt;i&gt; provides implementations for various compiler made by Intel Corp.&lt;/br&gt;
See, for example &lt;code&gt;org.eclipse.cdt.cmake.is.intel.IcpcToolDetectionParticipant.java&lt;/code&gt;.
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="copyright"/>
</appinfo>
<documentation>
Copyright (c) 2019-20 Martin Weber&lt;br&gt;
All rights reserved. Content is provided to you under the terms and conditions of the Eclipse Public License Version 2.0 &quot;EPL&quot;.
A copy of the EPL is available at http://www.eclipse.org/legal/epl-2.0.
</documentation>
</annotation>
</schema>