public interface ILanguage
AbstractLanguage
.Modifier and Type | Method and Description |
---|---|
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,
int options,
org.eclipse.cdt.core.parser.IParserLogService log)
|
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)
|
IASTTranslationUnit |
getASTTranslationUnit(org.eclipse.cdt.core.parser.FileContent content,
org.eclipse.cdt.core.parser.IScannerInfo scanInfo,
org.eclipse.cdt.core.parser.IncludeFileContentProvider fileCreator,
org.eclipse.cdt.core.index.IIndex index,
int options,
org.eclipse.cdt.core.parser.IParserLogService log)
Constructs an AST for the source code provided by
reader . |
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)
|
IASTCompletionNode |
getCompletionNode(org.eclipse.cdt.core.parser.FileContent reader,
org.eclipse.cdt.core.parser.IScannerInfo scanInfo,
org.eclipse.cdt.core.parser.IncludeFileContentProvider fileCreator,
org.eclipse.cdt.core.index.IIndex index,
org.eclipse.cdt.core.parser.IParserLogService log,
int offset)
Returns the AST completion node for the given offset.
|
java.lang.String |
getId()
Return the language id for this language.
|
int |
getLinkageID()
Return the id of the linkage this language contributes to.
|
java.lang.String |
getName()
Returns the human readable name corresponding to this language, suitable for display.
|
IASTName[] |
getSelectedNames(IASTTranslationUnit ast,
int start,
int length)
Deprecated.
replaced by
IASTTranslationUnit.getNodeSelector(String) . |
static final int OPTION_SKIP_FUNCTION_BODIES
getASTTranslationUnit(FileContent, IScannerInfo, IncludeFileContentProvider, IIndex, int, IParserLogService)
Instructs the parser to skip function and method bodies.@Deprecated static final int OPTION_ADD_COMMENTS
static final int OPTION_NO_IMAGE_LOCATIONS
getASTTranslationUnit(FileContent, IScannerInfo, IncludeFileContentProvider, IIndex, int, IParserLogService)
Performance optimization, allows the parser not to create image-locations.
When using this option IASTName.getImageLocation()
will always return null
.@Deprecated static final int OPTION_IS_SOURCE_UNIT
static final int OPTION_SKIP_TRIVIAL_EXPRESSIONS_IN_AGGREGATE_INITIALIZERS
getASTTranslationUnit(FileContent, IScannerInfo, IncludeFileContentProvider, IIndex, int, IParserLogService)
Allows the parser not to create ast nodes for expressions within aggregate initializers
when they do not contain names.static final int OPTION_PARSE_INACTIVE_CODE
getASTTranslationUnit(FileContent, IScannerInfo, IncludeFileContentProvider, IIndex, int, IParserLogService)
Instructs the parser to create ast nodes for inactive code branches, if possible. The parser
makes its best effort to create ast for the inactive code branches but may decide to skip parts
of the inactive code (e.g. function bodies, entire code branches, etc.).
The inactive nodes can be accessed via IASTDeclarationListOwner.getDeclarations(boolean)
or
by using a visitor with ASTVisitor.includeInactiveNodes
set to true
.
java.lang.String getId()
int getLinkageID()
ILinkage
java.lang.String getName()
IASTTranslationUnit getASTTranslationUnit(org.eclipse.cdt.core.parser.FileContent content, org.eclipse.cdt.core.parser.IScannerInfo scanInfo, org.eclipse.cdt.core.parser.IncludeFileContentProvider fileCreator, org.eclipse.cdt.core.index.IIndex index, int options, org.eclipse.cdt.core.parser.IParserLogService log) throws CoreException
reader
.content
- source code to be parsed.scanInfo
- provides include paths and defined symbols.fileCreator
- factory that provides file content for files includedindex
- (optional) index to use to lookup symbols external to the translation unit.options
- A combination of OPTION_SKIP_FUNCTION_BODIES
,
OPTION_NO_IMAGE_LOCATIONS
, or 0
.log
- loggerCoreException
IASTCompletionNode getCompletionNode(org.eclipse.cdt.core.parser.FileContent reader, org.eclipse.cdt.core.parser.IScannerInfo scanInfo, org.eclipse.cdt.core.parser.IncludeFileContentProvider fileCreator, org.eclipse.cdt.core.index.IIndex index, org.eclipse.cdt.core.parser.IParserLogService log, int offset) throws CoreException
CoreException
IContributedModelBuilder createModelBuilder(ITranslationUnit tu)
tu
- the ITranslationUnit
to be parsed (non-null
)IModelBuilder
, which parses the given translation unit and
returns the ICElement
s of its model, or null
to parse using the default CDT model builder@Deprecated IASTName[] getSelectedNames(IASTTranslationUnit ast, int start, int length)
IASTTranslationUnit.getNodeSelector(String)
.@Deprecated 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
getASTTranslationUnit(FileContent, IScannerInfo,
IncludeFileContentProvider, IIndex, int, IParserLogService)
CoreException
@Deprecated 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, int options, org.eclipse.cdt.core.parser.IParserLogService log) throws CoreException
getASTTranslationUnit(FileContent, IScannerInfo,
IncludeFileContentProvider, IIndex, int, IParserLogService)
CoreException
@Deprecated 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
getCompletionNode(FileContent, IScannerInfo,
IncludeFileContentProvider, IIndex, IParserLogService, int)
.CoreException
Copyright (c) IBM Corp. and others 2004, 2014. All Rights Reserved.