Eclipse CDT
Pre-release 3.0

org.eclipse.cdt.core.model
Interface ILanguage

All Known Implementing Classes:
AbstractLanguage

public interface ILanguage

Models differences between languages. The interace is not supposed to be implemented directly. Rather than that clients may subclass AbstractLanguage.


Field Summary
static int AST_SKIP_ALL_HEADERS
          Deprecated. use ITranslationUnit.AST_SKIP_ALL_HEADERS
static int AST_SKIP_IF_NO_BUILD_INFO
          Deprecated. use ITranslationUnit.AST_SKIP_IF_NO_BUILD_INFO
static int AST_SKIP_INDEXED_HEADERS
          Deprecated. use ITranslationUnit.AST_SKIP_INDEXED_HEADERS
static int AST_USE_INDEX
          Deprecated. has no effect.
static String KEY
           
 
Method Summary
 IContributedModelBuilder createModelBuilder(ITranslationUnit tu)
          Used to override the default model building behavior for a translation unit.
 IASTTranslationUnit getASTTranslationUnit(org.eclipse.cdt.core.parser.CodeReader reader, org.eclipse.cdt.core.parser.IScannerInfo scanInfo, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator, org.eclipse.cdt.core.index.IIndex index, org.eclipse.cdt.core.parser.IParserLogService log)
          Construct an AST for the source code provided by reader.
 IASTTranslationUnit getASTTranslationUnit(ITranslationUnit file, org.eclipse.cdt.core.dom.ICodeReaderFactory codeReaderFactory, int style)
          Deprecated. use ITranslationUnit.getAST(...).
 IASTTranslationUnit getASTTranslationUnit(ITranslationUnit file, int style)
          Deprecated. use ITranslationUnit.getAST().
 IASTCompletionNode getCompletionNode(org.eclipse.cdt.core.parser.CodeReader reader, org.eclipse.cdt.core.parser.IScannerInfo scanInfo, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator, org.eclipse.cdt.core.index.IIndex index, org.eclipse.cdt.core.parser.IParserLogService log, int offset)
          Return the AST completion node for the given offset.
 String getId()
          Return the language id for this language.
 String getName()
           
 IASTName[] getSelectedNames(IASTTranslationUnit ast, int start, int length)
          Gather the list of IASTNames that appear the selection with the given start offset and length in the given ITranslationUnit.
 

Field Detail

KEY

public static final String KEY
See Also:
Constant Field Values

AST_USE_INDEX

public static final int AST_USE_INDEX
Deprecated. has no effect.

See Also:
Constant Field Values

AST_SKIP_ALL_HEADERS

public static final int AST_SKIP_ALL_HEADERS
Deprecated. use ITranslationUnit.AST_SKIP_ALL_HEADERS

See Also:
Constant Field Values

AST_SKIP_INDEXED_HEADERS

public static final int AST_SKIP_INDEXED_HEADERS
Deprecated. use ITranslationUnit.AST_SKIP_INDEXED_HEADERS

See Also:
Constant Field Values

AST_SKIP_IF_NO_BUILD_INFO

public static final int AST_SKIP_IF_NO_BUILD_INFO
Deprecated. use ITranslationUnit.AST_SKIP_IF_NO_BUILD_INFO

See Also:
Constant Field Values
Method Detail

getId

public String getId()
Return the language id for this language. This is to differentiate languages from eachother.

Returns:
language id

getName

public String getName()
Returns:
the human readable name corresponding to this language, suitable for display.
Since:
4.0

getASTTranslationUnit

public IASTTranslationUnit getASTTranslationUnit(ITranslationUnit file,
                                                 int style)
                                          throws CoreException
Deprecated. use ITranslationUnit.getAST().

Throws:
CoreException

getASTTranslationUnit

public IASTTranslationUnit getASTTranslationUnit(ITranslationUnit file,
                                                 org.eclipse.cdt.core.dom.ICodeReaderFactory codeReaderFactory,
                                                 int style)
                                          throws CoreException
Deprecated. use ITranslationUnit.getAST(...).

Throws:
CoreException

getCompletionNode

public IASTCompletionNode getCompletionNode(org.eclipse.cdt.core.parser.CodeReader reader,
                                            org.eclipse.cdt.core.parser.IScannerInfo scanInfo,
                                            org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator,
                                            org.eclipse.cdt.core.index.IIndex index,
                                            org.eclipse.cdt.core.parser.IParserLogService log,
                                            int offset)
                                     throws CoreException
Return the AST completion node for the given offset.

Parameters:
reader -
scanInfo -
fileCreator -
index -
log -
offset -
Returns:
Throws:
CoreException

getSelectedNames

public IASTName[] getSelectedNames(IASTTranslationUnit ast,
                                   int start,
                                   int length)
Gather the list of IASTNames that appear the selection with the given start offset and length in the given ITranslationUnit.

Parameters:
start -
length -
Returns:

createModelBuilder

public IContributedModelBuilder createModelBuilder(ITranslationUnit tu)
Used to override the default model building behavior for a translation unit.

Parameters:
tu - the ITranslationUnit to be parsed (non-null)
Returns:
an IModelBuilder, which parses the given translation unit and returns the ICElements of its model, or null to parse using the default CDT model builder

getASTTranslationUnit

public IASTTranslationUnit getASTTranslationUnit(org.eclipse.cdt.core.parser.CodeReader reader,
                                                 org.eclipse.cdt.core.parser.IScannerInfo scanInfo,
                                                 org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator,
                                                 org.eclipse.cdt.core.index.IIndex index,
                                                 org.eclipse.cdt.core.parser.IParserLogService log)
                                          throws CoreException
Construct an AST for the source code provided by reader.

Parameters:
reader - source code to be parsed.
scanInfo - provides include paths and defined symbols.
fileCreator - factory that provides CodeReaders for files included by the source code being parsed.
index - (optional) index to use to provide support for ambiguity resolution.
log - logger
Returns:
an AST for the source code provided by reader.
Throws:
CoreException

Eclipse CDT
Pre-release 3.0

Copyright (c) IBM Corp. and others 2004. All Rights Reserved.