public abstract class AbstractLanguage extends org.eclipse.core.runtime.PlatformObject implements ILanguage
OPTION_ADD_COMMENTS, OPTION_IS_SOURCE_UNIT, OPTION_NO_IMAGE_LOCATIONS, OPTION_PARSE_INACTIVE_CODE, OPTION_SKIP_FUNCTION_BODIES, OPTION_SKIP_TRIVIAL_EXPRESSIONS_IN_AGGREGATE_INITIALIZERS
Constructor and Description |
---|
AbstractLanguage() |
Modifier and Type | Method and Description |
---|---|
IASTTranslationUnit |
getASTTranslationUnit(CodeReader reader,
IScannerInfo scanInfo,
ICodeReaderFactory fileCreator,
IIndex index,
int options,
IParserLogService log)
|
IASTTranslationUnit |
getASTTranslationUnit(FileContent content,
IScannerInfo scanInfo,
IncludeFileContentProvider fileCreator,
IIndex index,
int options,
IParserLogService log)
Constructs an AST for the source code provided by
reader . |
IASTCompletionNode |
getCompletionNode(FileContent reader,
IScannerInfo scanInfo,
IncludeFileContentProvider fileCreator,
IIndex index,
IParserLogService log,
int offset)
Returns the AST completion node for the given offset.
|
String |
getName()
Returns the human readable name corresponding to this language, suitable for display.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createModelBuilder, getASTTranslationUnit, getCompletionNode, getId, getLinkageID, getSelectedNames
public String getName()
ILanguage
@Deprecated public IASTTranslationUnit getASTTranslationUnit(CodeReader reader, IScannerInfo scanInfo, ICodeReaderFactory fileCreator, IIndex index, int options, IParserLogService log) throws org.eclipse.core.runtime.CoreException
getASTTranslationUnit(FileContent, IScannerInfo,
IncludeFileContentProvider, IIndex, int, IParserLogService)
getASTTranslationUnit
in interface ILanguage
org.eclipse.core.runtime.CoreException
public IASTTranslationUnit getASTTranslationUnit(FileContent content, IScannerInfo scanInfo, IncludeFileContentProvider fileCreator, IIndex index, int options, IParserLogService log) throws org.eclipse.core.runtime.CoreException
ILanguage
reader
.getASTTranslationUnit
in interface ILanguage
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 ILanguage.OPTION_SKIP_FUNCTION_BODIES
,
ILanguage.OPTION_NO_IMAGE_LOCATIONS
, or 0
.log
- loggerorg.eclipse.core.runtime.CoreException
public IASTCompletionNode getCompletionNode(FileContent reader, IScannerInfo scanInfo, IncludeFileContentProvider fileCreator, IIndex index, IParserLogService log, int offset) throws org.eclipse.core.runtime.CoreException
ILanguage
getCompletionNode
in interface ILanguage
org.eclipse.core.runtime.CoreException
Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.