|
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
.
Field Summary | |
---|---|
static int |
OPTION_ADD_COMMENTS
Option for getASTTranslationUnit(CodeReader, IScannerInfo, ICodeReaderFactory, IIndex, int, IParserLogService)
Instructs the parser to add comment nodes to the ast. |
static int |
OPTION_IS_SOURCE_UNIT
Option for getASTTranslationUnit(CodeReader, IScannerInfo, ICodeReaderFactory, IIndex, int, IParserLogService)
Marks the ast as being based on a source-file rather than a header-file. |
static int |
OPTION_NO_IMAGE_LOCATIONS
Option for getASTTranslationUnit(CodeReader, IScannerInfo, ICodeReaderFactory, IIndex, int, IParserLogService)
Performance optimization, instructs the parser not to create image-locations. |
static int |
OPTION_SKIP_FUNCTION_BODIES
Option for getASTTranslationUnit(CodeReader, IScannerInfo, ICodeReaderFactory, IIndex, int, IParserLogService)
Instructs the parser to skip function and method bodies. |
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.
static final int OPTION_ADD_COMMENTS
getASTTranslationUnit(CodeReader, IScannerInfo, ICodeReaderFactory, IIndex, int, IParserLogService)
Instructs the parser to add comment nodes to the ast.
static final int OPTION_NO_IMAGE_LOCATIONS
getASTTranslationUnit(CodeReader, IScannerInfo, ICodeReaderFactory, IIndex, int, IParserLogService)
Performance optimization, instructs 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.
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_ADD_COMMENTS
,
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 |