|
Eclipse CDT 7.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)
Deprecated. replaced by getASTTranslationUnit(FileContent, IScannerInfo,
IncludeFileContentProvider, IIndex, int, IParserLogService) |
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)
Deprecated. replaced by getASTTranslationUnit(FileContent, IScannerInfo,
IncludeFileContentProvider, IIndex, int, IParserLogService) |
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)
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)
Deprecated. replaced by getCompletionNode(FileContent, IScannerInfo,
IncludeFileContentProvider, IIndex, IParserLogService, int) . |
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)
Return 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()
|
IASTName[] |
getSelectedNames(IASTTranslationUnit ast,
int start,
int length)
Deprecated. replaced by IASTTranslationUnit.getNodeSelector(String) . |
Field Detail |
---|
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
.
static final int OPTION_IS_SOURCE_UNIT
getASTTranslationUnit(FileContent, IScannerInfo, IncludeFileContentProvider, 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(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
.
Method Detail |
---|
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
.
As an option you can supply
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 tu.options
- A combination of
OPTION_SKIP_FUNCTION_BODIES
,
OPTION_NO_IMAGE_LOCATIONS
, OPTION_IS_SOURCE_UNIT
,
or 0
.log
- logger
CoreException
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
|
Eclipse CDT 7.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |