|
Eclipse CDT Pre-release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILanguage
Models differences between languages. The interface is not supposed to be implemented directly.
Rather than that clients may subclass AbstractLanguage
.
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,
int options,
org.eclipse.cdt.core.parser.IParserLogService log)
Construct an AST for the source code provided by reader . |
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 . |
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. |
int |
getLinkageID()
Return the id of the linkage this language contributes to. |
String |
getName()
|
IASTName[] |
getSelectedNames(IASTTranslationUnit ast,
int start,
int length)
Deprecated. use IASTTranslationUnit.getNodeSelector(String) , instead. |
Field Detail |
---|
static final int OPTION_SKIP_FUNCTION_BODIES
getASTTranslationUnit(CodeReader, IScannerInfo, ICodeReaderFactory, 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(CodeReader, IScannerInfo, ICodeReaderFactory, IIndex, int, IParserLogService)
Performance optimization, allows the parser not to create image-locations.
When using this option IASTName.getImageLocation()
will always return null
.
static final int OPTION_IS_SOURCE_UNIT
getASTTranslationUnit(CodeReader, IScannerInfo, ICodeReaderFactory, IIndex, int, IParserLogService)
Marks the ast as being based on a source-file rather than a header-file. This makes a difference
when bindings from the AST are used for searching the index, e.g. for static variables.
static final int OPTION_SKIP_TRIVIAL_EXPRESSIONS_IN_AGGREGATE_INITIALIZERS
getASTTranslationUnit(CodeReader, IScannerInfo, ICodeReaderFactory, 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(CodeReader, IScannerInfo, ICodeReaderFactory, 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
.
Method Detail |
---|
String getId()
int getLinkageID()
ILinkage
String getName()
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
CoreException
@Deprecated IASTName[] getSelectedNames(IASTTranslationUnit ast, int start, int length)
IASTTranslationUnit.getNodeSelector(String)
, instead.
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 builderIASTTranslationUnit 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
reader
.
Fully equivalent to
getASTTranslationUnit(reader, scanInfo, fileCreator, index, 0, log)
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
CoreException
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
reader
.
As an option you can supply
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.options
- A combination of
OPTION_SKIP_FUNCTION_BODIES
,
OPTION_NO_IMAGE_LOCATIONS
, OPTION_IS_SOURCE_UNIT
,
or 0
.log
- logger
CoreException
|
Eclipse CDT Pre-release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |