CDT Language

Identifier:
org.eclipse.cdt.core.language

Since:
CDT 3.1

Description:
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.

Configuration Markup:

<!ELEMENT extension ((language | pdomLinkageFactory))+>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>


<!ELEMENT language (contentType)*>

<!ATTLIST language

id    CDATA #REQUIRED

name  CDATA #REQUIRED

class CDATA #REQUIRED

>


<!ELEMENT contentType EMPTY>

<!ATTLIST contentType

id CDATA #IMPLIED

>


<!ELEMENT pdomLinkageFactory EMPTY>

<!ATTLIST pdomLinkageFactory

id    CDATA #REQUIRED

class CDATA #REQUIRED

>


Examples:

<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>

API Information:
Clients need to extend the abstract class org.eclipse.core.model.AbstractLanguage.

Supplied Implementation:
CDT comes with following built-in languages: org.eclipse.cdt.core.language.gcc (GNU C) and org.eclipse.cdt.core.language.g++ (GNU C++).

The respective language implementations are org.eclipse.cdt.core.dom.ast.gnu.c.GCCLanguage and org.eclipse.cdt.core.dom.ast.gnu.cpp.GPPLanguage


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