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

Modifier and Type
Method
Description
`IASTTranslationUnit`
`getASTTranslationUnit(CodeReader reader, IScannerInfo scanInfo, ICodeReaderFactory fileCreator, IIndex index, int options, IParserLogService log)`
Deprecated.
replaced by `getASTTranslationUnit(FileContent, IScannerInfo, IncludeFileContentProvider, IIndex, int, IParserLogService)`
`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.

### Methods inherited from class org.eclipse.core.runtime.PlatformObject

`getAdapter`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.eclipse.core.runtime.IAdaptable

`getAdapter`

### Methods inherited from interface org.eclipse.cdt.core.model.ILanguage

`createModelBuilder, getASTTranslationUnit, getCompletionNode, getId, getLinkageID, getSelectedNames`

## Constructor Details

### AbstractLanguage

public AbstractLanguage()

## Method Details

### getName

public String getName()
Description copied from interface: `ILanguage`
Returns the human readable name corresponding to this language, suitable for display.

Specified by:
  `getName` in interface `ILanguage`

### getASTTranslationUnit

@Deprecated public IASTTranslationUnit getASTTranslationUnit(CodeReader reader, IScannerInfo scanInfo, ICodeReaderFactory fileCreator, IIndex index, int options, IParserLogService log) throws org.eclipse.core.runtime.CoreException
Deprecated.
replaced by `getASTTranslationUnit(FileContent, IScannerInfo, IncludeFileContentProvider, IIndex, int, IParserLogService)`

Specified by:
  `getASTTranslationUnit` in interface `ILanguage`
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 by `reader`.

Specified by:
  `getASTTranslationUnit` in interface `ILanguage`
Parameters:
  `content` - source code to be parsed.
  `scanInfo` - provides include paths and defined symbols.
  `fileCreator` - factory that provides file content for files included
  `index` - (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` - 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 interface `ILanguage`
Throws:
  `org.eclipse.core.runtime.CoreException`
Since:
  5.2