Package org.eclipse.cdt.core.model
Class AbstractLanguage
- java.lang.Object
-
- org.eclipse.core.runtime.PlatformObject
-
- org.eclipse.cdt.core.model.AbstractLanguage
-
- All Implemented Interfaces:
ILanguage
,org.eclipse.core.runtime.IAdaptable
- Direct Known Subclasses:
AbstractCLikeLanguage
,AssemblyLanguage
public abstract class AbstractLanguage extends org.eclipse.core.runtime.PlatformObject implements ILanguage
Models the differences between various languages.- Since:
- 4.0
-
-
Field Summary
-
Fields inherited from interface org.eclipse.cdt.core.model.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 Summary
Constructors Constructor Description AbstractLanguage()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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 byreader
.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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.cdt.core.model.ILanguage
createModelBuilder, getASTTranslationUnit, getCompletionNode, getId, getLinkageID, getSelectedNames
-
-
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:ILanguage
Returns the human readable name corresponding to this language, suitable for display.
-
getASTTranslationUnit
@Deprecated public IASTTranslationUnit getASTTranslationUnit(CodeReader reader, IScannerInfo scanInfo, ICodeReaderFactory fileCreator, IIndex index, int options, IParserLogService log) throws org.eclipse.core.runtime.CoreException
Deprecated.- Specified by:
getASTTranslationUnit
in interfaceILanguage
- Throws:
org.eclipse.core.runtime.CoreException
-
getASTTranslationUnit
public IASTTranslationUnit getASTTranslationUnit(FileContent content, IScannerInfo scanInfo, IncludeFileContentProvider fileCreator, IIndex index, int options, IParserLogService log) throws org.eclipse.core.runtime.CoreException
Description copied from interface:ILanguage
Constructs an AST for the source code provided byreader
.- Specified by:
getASTTranslationUnit
in interfaceILanguage
- Parameters:
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 ofILanguage.OPTION_SKIP_FUNCTION_BODIES
,ILanguage.OPTION_NO_IMAGE_LOCATIONS
, or0
.log
- logger- Returns:
- an AST for the source code provided by reader.
- Throws:
org.eclipse.core.runtime.CoreException
- Since:
- 5.2
-
getCompletionNode
public IASTCompletionNode getCompletionNode(FileContent reader, IScannerInfo scanInfo, IncludeFileContentProvider fileCreator, IIndex index, IParserLogService log, int offset) throws org.eclipse.core.runtime.CoreException
Description copied from interface:ILanguage
Returns the AST completion node for the given offset.- Specified by:
getCompletionNode
in interfaceILanguage
- Throws:
org.eclipse.core.runtime.CoreException
- Since:
- 5.2
-
-