Package org.eclipse.lemminx.services

## Class CodeActionRequest

- java.lang.Object
- - org.eclipse.lemminx.services.CodeActionRequest

All Implemented Interfaces:
  `IBaseCodeActionRequest`, `ICodeActionRequest`, `IComponentProvider`

    public class CodeActionRequest
    extends Object
    implements ICodeActionRequest

Code action request implementation.

Author:
  Angelo ZERR

### Constructor Summary

Constructors
`CodeActionRequest​(org.eclipse.lsp4j.Diagnostic diagnostic, org.eclipse.lsp4j.Range range, DOMDocument document, IComponentProvider componentProvider, SharedSettings sharedSettings)`

### Method Summary

All Methods Instance Methods Concrete Methods
`<T> T` `getComponent​(Class clazz)` Returns the component class instance from the given class and null otherwise.
`org.eclipse.lsp4j.Diagnostic` `getDiagnostic()` Returns the diagnostic.
`DOMDocument` `getDocument()` Returns the DOM document.
`LineIndentInfo` `getLineIndentInfo()`
`org.eclipse.lsp4j.Range` `getRange()` Returns the code action range.
`SharedSettings` `getSharedSettings()` Returns the shared settings.
`XMLGenerator` `getXMLGenerator()`

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

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

### Methods inherited from interface org.eclipse.lemminx.services.extensions.codeaction.IBaseCodeActionRequest

`getDocument, getSharedSettings`

### Methods inherited from interface org.eclipse.lemminx.services.extensions.codeaction.ICodeActionRequest

`canSupportResolve`

### Methods inherited from interface org.eclipse.lemminx.services.extensions.IComponentProvider

`getComponent`

### Constructor Detail

#### CodeActionRequest

    public CodeActionRequest​(org.eclipse.lsp4j.Diagnostic diagnostic,
                             org.eclipse.lsp4j.Range range,
                             DOMDocument document,
                             IComponentProvider componentProvider,
                             SharedSettings sharedSettings)

### Method Detail

#### getDiagnostic

    public org.eclipse.lsp4j.Diagnostic getDiagnostic()

Description copied from interface: `ICodeActionRequest`
Returns the diagnostic.

Specified by:
  `getDiagnostic` in interface `ICodeActionRequest`
Returns:
  the diagnostic.

#### getRange

    public org.eclipse.lsp4j.Range getRange()

Description copied from interface: `ICodeActionRequest`
Returns the code action range.

Specified by:
  `getRange` in interface `ICodeActionRequest`
Returns:
  the code action range.

#### getXMLGenerator

    public XMLGenerator getXMLGenerator()
                                 throws BadLocationException

Specified by:
  `getXMLGenerator` in interface `ICodeActionRequest`
Throws:
  `BadLocationException`

#### getLineIndentInfo

    public LineIndentInfo getLineIndentInfo()
                                     throws BadLocationException

Throws:
  `BadLocationException`

#### getComponent

    public <T> T getComponent​(Class clazz)

Description copied from interface: `IComponentProvider`
Returns the component class instance from the given class and null otherwise.

Specified by:
  `getComponent` in interface `IComponentProvider`
Parameters:
  `clazz` - class of the component.
Returns:
  the component class instance from the given class and null otherwise.

#### getDocument

    public DOMDocument getDocument()

Description copied from interface: `IBaseCodeActionRequest`
Returns the DOM document.

Specified by:
  `getDocument` in interface `IBaseCodeActionRequest`
Returns:
  the DOM document

#### getSharedSettings

    public SharedSettings getSharedSettings()

Description copied from interface: `IBaseCodeActionRequest`
Returns the shared settings.

Specified by:
  `getSharedSettings` in interface `IBaseCodeActionRequest`
Returns:
  the shared settings.