# com.bea.ide.sourceeditor.driver
DefaultLanguageDriver Class

public class DefaultLanguageDriver
extends `DefaultDocumentDriver`
implements `ILanguageDriver`

Default implementation of an ILanguageDriver.

Related Topics

``ILanguageDriver``

Hierarchy
  `Object`
  `DefaultDocumentDriver`
  `DefaultLanguageDriver`

All Implemented Interfaces
  `ILanguageDriver`

## Nested Class Summary

`public static class` | `DefaultLanguageDriver.BlockDelim` Default implementation of the `ILanguageDriver.IBlockDelim``` interface with useful default initializations.
`public static class` | `DefaultLanguageDriver.BlockInfo` Default implementation of the `ILanguageDriver.IBlockInfo``` interface with useful default initializations.

## Constructor Summary

DefaultLanguageDriver()

## Method Summary

`public boolean` | `canAutoCorrect`(`String` diagnosticCode) Default implementation of canAutoCorrect.
`public `ILanguageDriver.IBlockInfo`` | `findMatchingCloseBlock`(int pos, char ch) Default implementation of findMatchingCloseBlock.
`public `ILanguageDriver.IBlockInfo`` | `findMatchingOpenBlock`(int pos, char ch) Default implementation of findMatchingOpenBlock.
`public `ILanguageDriver.IAutoCorrection`` | `getAutoCorrection`(`String` diagnosticCode, int offset, int length, `ILanguageDriver.IAutoCorrection` innerCorrection) Default implementation of getAutoCorrection.
`public `ILanguageDriver.IAutoFill`` | `getAutoFill`(`Range` selection, char typed) Default implementation of getAutoFill.
`public `URI`[]` | `getHelpContextList`(`Range` range) Default implementation of getHelpContextList.
`public int` | `getOpenBlockCount`(`ISourceModel.Line` line, `ILanguageDriver.IBlockDelim` delim, int length) Default implementation of getOpenBlockCount.
`public `ILanguageDriver.IParameterHelp`[]` | `getParameterHelp`(int offset, char typed) Default implementation of getParameterHelp.
`public int` | `getWordWrapPosition`(`Range` range) Default implementation of getWordWrapPosition.
`public boolean` | `isCloseChar`(char ch) Default implementation of isCloseChar.
`public boolean` | `isOpenChar`(char ch) Default implementation of isOpenChar.
`public boolean` | `parameterHelpAvailable`(int offset, char typed) Default implementation of parameterHelpAvailable.
`public boolean` | `suppportsCtrlHover`(`String` tokenTypeName) Default implementation of suppportsCtrlHover.

Methods from `com.bea.ide.sourceeditor.driver.`DefaultDocumentDriver``
``getDocument`, `setDocument``

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods from interface `com.bea.ide.sourceeditor.driver.`ILanguageDriver``
``canAutoCorrect`, `findMatchingCloseBlock`, `findMatchingOpenBlock`, `getAutoCorrection`, `getAutoFill`, `getHelpContextList`, `getOpenBlockCount`, `getParameterHelp`, `getWordWrapPosition`, `isCloseChar`, `isOpenChar`, `parameterHelpAvailable`, `setDocument`, `suppportsCtrlHover``

## Constructor Detail

### DefaultLanguageDriver

    public DefaultLanguageDriver()

## Method Detail

### canAutoCorrect(String) Method

    public boolean canAutoCorrect(String diagnosticCode)

Default implementation of canAutoCorrect.

#### Parameters

diagnosticCode
  The type of error found.

#### Returns

false

Related Topics

``ILanguageDriver.canAutoCorrect(String)``

### findMatchingCloseBlock(int, char) Method

    public ILanguageDriver.IBlockInfo findMatchingCloseBlock(int pos,
                                                             char ch)

Default implementation of findMatchingCloseBlock.

#### Parameters

pos
  Offset of character `ch` in document.

ch
  Close character.

#### Returns

null

Related Topics

``ILanguageDriver.findMatchingCloseBlock(int, char)``

### findMatchingOpenBlock(int, char) Method

    public ILanguageDriver.IBlockInfo findMatchingOpenBlock(int pos,
                                                            char ch)

Default implementation of findMatchingOpenBlock.

#### Parameters

pos
  Offset of character `ch` in document.

ch
  Close character.

#### Returns

null

Related Topics

``ILanguageDriver.findMatchingOpenBlock(int, char)``

### getAutoCorrection(String, int, int, ILanguageDriver.IAutoCorrection) Method

    public ILanguageDriver.IAutoCorrection getAutoCorrection(String diagnosticCode,
                                                             int offset,
                                                             int length,
                                                             ILanguageDriver.IAutoCorrection innerCorrection)

Default implementation of getAutoCorrection.

#### Parameters

diagnosticCode
  The type of error found.

offset
  The location of the error within this driver's document.

length
  The length of text to which the error applies.

innerCorrection
  The auto-correction provided by inner language nodes, if any. This parameter is frequently null.

#### Returns

The IAutoCorrection provided by the inner language.

Related Topics

``ILanguageDriver.getAutoCorrection(String, int, int, ILanguageDriver.IAutoCorrection)``

### getAutoFill(Range, char) Method

    public ILanguageDriver.IAutoFill getAutoFill(Range selection,
                                                 char typed)

Default implementation of getAutoFill.

#### Parameters

selection
  The (normalized) range of the selection within this driver's document.

typed
  The character typed.

#### Returns

null

Related Topics

``ILanguageDriver.getAutoFill(Range, char)``

### getHelpContextList(Range) Method

    public URI[] getHelpContextList(Range range)

Default implementation of getHelpContextList.

#### Returns

an empty URI array

Related Topics

``ILanguageDriver.getHelpContextList(Range)``

### getOpenBlockCount(ISourceModel.Line, ILanguageDriver.IBlockDelim, int) Method

    public int getOpenBlockCount(ISourceModel.Line line,
                                 ILanguageDriver.IBlockDelim delim,
                                 int length)

Default implementation of getOpenBlockCount.

#### Parameters

line
  Line to examine for open blocks.

delim
  Type of block to scan for.

length
  Length of `line` to examine from start.

#### Returns

0

Related Topics

``ILanguageDriver.getOpenBlockCount(ISourceModel.Line, ILanguageDriver.IBlockDelim, int)``

### getParameterHelp(int, char) Method

    public ILanguageDriver.IParameterHelp[] getParameterHelp(int offset,
                                                           char typed)

Default implementation of getParameterHelp.

#### Parameters

offset
  the offset of the caret

typed
  the potential parameter help initiation character

#### Returns

null

Related Topics

``ILanguageDriver.getParameterHelp(int, char)``

### getWordWrapPosition(Range) Method

    public int getWordWrapPosition(Range range)

Default implementation of getWordWrapPosition. Without knowledge of word wrap boundaries, the default is for every character to be a wrappable position.

#### Parameters

range
  represents a character range in the source document which exactly fits on one line (after indenting).

#### Returns

the end of the provided range.

Related Topics

``ILanguageDriver.getWordWrapPosition(Range)``

### isCloseChar(char) Method

    public boolean isCloseChar(char ch)

Default implementation of isCloseChar.

#### Returns

false

Related Topics

``ILanguageDriver.isCloseChar(char)``

### isOpenChar(char) Method

    public boolean isOpenChar(char ch)

Default implementation of isOpenChar.

#### Returns

false

Related Topics

``ILanguageDriver.isOpenChar(char)``

### parameterHelpAvailable(int, char) Method

    public boolean parameterHelpAvailable(int offset,
                                          char typed)

Default implementation of parameterHelpAvailable.

#### Parameters

offset
  the offset of the caret

typed
  the potential parameter help initiation character

#### Returns

false

Related Topics

``ILanguageDriver.parameterHelpAvailable(int, char)``

### suppportsCtrlHover(String) Method

    public boolean suppportsCtrlHover(String tokenTypeName)

Default implementation of suppportsCtrlHover.

#### Parameters

tokenTypeName
  the language specific name for a particular token type, such as "java.identifier".

#### Returns

true, preventing any short-circuit. This will allow the compiler to make the determination in all cases.

Related Topics

``ILanguageDriver.suppportsCtrlHover(String)``