From fb48e813d12e5c8587a208c9edadb7b829c77c6d Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Tue, 24 Apr 2007 11:36:40 +0000 Subject: [PATCH] Document language extension point schema --- core/org.eclipse.cdt.core/plugin.properties | 1 + .../schema/CLanguage.exsd | 241 +++++++++--------- .../org.eclipse.cdt.core/schema/language.exsd | 45 +++- 3 files changed, 157 insertions(+), 130 deletions(-) diff --git a/core/org.eclipse.cdt.core/plugin.properties b/core/org.eclipse.cdt.core/plugin.properties index 6f3f84c3c35..ed82fc752c0 100644 --- a/core/org.eclipse.cdt.core/plugin.properties +++ b/core/org.eclipse.cdt.core/plugin.properties @@ -29,6 +29,7 @@ CLanguage.name= CDT Language CFileType.name= CDT File Type CFileTypeAssociation.name= CDT File Type Association CIndexer.name= C/C++ Indexer +language.name= CDT Language CodeFormatter.name=C/C++ Code Formatter diff --git a/core/org.eclipse.cdt.core/schema/CLanguage.exsd b/core/org.eclipse.cdt.core/schema/CLanguage.exsd index 2650ec66809..c638aa35ed2 100644 --- a/core/org.eclipse.cdt.core/schema/CLanguage.exsd +++ b/core/org.eclipse.cdt.core/schema/CLanguage.exsd @@ -1,118 +1,123 @@ - - - - - - - - - Extension point representing a CDT language. At the moment, languages consist of a unique identifier (id), and a human-readable name. - -By themselves, languages don't serve much purpose. However, they are used to build file types (see the CFileType extension point), which are used by CDT to classify files and determine how they should be processed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CDT 2.0 - - - - - - - - - To declare a new language: - - <extension - point="org.eclipse.cdt.core.CLanguage"> - <language - name="My Language" - id="com.example.product.language.my_language"> - </language> - </extension> - -This indicates to CDT that there is a new language, identified using the language id "com.example.product.language.my_language". - - - - - - - - - This extension point is purely declarative. - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + Extension point representing a CDT language. At the moment, languages consist of a unique identifier (id), and a human-readable name. + +By themselves, languages don't serve much purpose. However, they are used to build file types (see the CFileType extension point), which are used by CDT to classify files and determine how they should be processed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CDT 2.0 + + + + + + + + + To declare a new language: + + <extension + point="org.eclipse.cdt.core.CLanguage"> + <language + name="My Language" + id="com.example.product.language.my_language"> + </language> + </extension> + +This indicates to CDT that there is a new language, identified using the language id "com.example.product.language.my_language". + + + + + + + + + This extension point is purely declarative. + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/org.eclipse.cdt.core/schema/language.exsd b/core/org.eclipse.cdt.core/schema/language.exsd index 971e4fae955..596579dde75 100644 --- a/core/org.eclipse.cdt.core/schema/language.exsd +++ b/core/org.eclipse.cdt.core/schema/language.exsd @@ -6,7 +6,7 @@ - [Enter description of this extension point.] + This extension point is used to declare a language or language variant. Languages define how the C model of a file is created (e.g. to populate the outline view). It also provides hooks to override the low level parsing of translation units into an abstract syntax tree. Practically this is limited to C/C++ language variants only. Completely different languages cannot be modelled reasonably using this extension point. @@ -50,24 +50,27 @@ - + - + A unique identifier of the language. Note that the identifier is prefixed with the ID of the contributing plug-in. - + - + A human readable and translatable name of the language. + + + - + - + A class extending <code>org.eclipse.core.model.AbstractLanguage</code>. @@ -116,7 +119,7 @@ - [Enter the first release in which this extension point appears.] + CDT 3.1 @@ -125,7 +128,15 @@ - [Enter extension point usage example here.] + <pre> +<language + class="org.eclipse.cdt.core.dom.ast.gnu.c.GCCLanguage" + id="gcc" + name="GNU C"> + <contentType id="org.eclipse.cdt.core.cSource"/> + <contentType id="org.eclipse.cdt.core.cHeader"/> +</language> +</pre> @@ -134,7 +145,7 @@ - [Enter API information here.] + Clients need to extend the abstract class <code>org.eclipse.core.model.AbstractLanguage</code>. @@ -143,7 +154,13 @@ - [Enter information about supplied implementation of this extension point.] + CDT comes with following built-in languages: +<code>org.eclipse.cdt.core.language.gcc</code> (GNU C) and +<code>org.eclipse.cdt.core.language.g++</code> (GNU C++). +<p>The respective language implementations are +<code>org.eclipse.cdt.core.dom.ast.gnu.c.GCCLanguage</code> and +<code>org.eclipse.cdt.core.dom.ast.gnu.cpp.GPPLanguage</code> +</p> @@ -152,7 +169,11 @@ - + Copyright (c) 2005, 2007 QNX Software Systems 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