Package org.eclipse.lemminx

## Class XMLTextDocumentService.SaveContext

- java.lang.Object
- - org.eclipse.lemminx.services.extensions.save.AbstractSaveContext
  - - org.eclipse.lemminx.XMLTextDocumentService.SaveContext

All Implemented Interfaces:
  `ISaveContext`, `IXMLDocumentProvider`

Enclosing class:
  XMLTextDocumentService

    public class XMLTextDocumentService.SaveContext
    extends AbstractSaveContext

Save context.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.eclipse.lemminx.services.extensions.save.ISaveContext

`ISaveContext.SaveContextType`

### Constructor Summary

Constructors
`SaveContext​(Object settings)`
`SaveContext​(String uri)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `collectDocumentToValidate​(Predicate<DOMDocument> validateDocumentPredicate)` This method is called to collect document to validate after the save.
`DOMDocument` `getDocument​(String uri)` Returns the `DOMDocument` instance from the given `uri` and null otherwise.
`boolean` `isRefreshCodeLenses()`
`void` `setRefreshCodeLenses​(boolean isRefreshCodeLenses)`
`void` `triggerValidationIfNeeded()`

### Methods inherited from class org.eclipse.lemminx.services.extensions.save.AbstractSaveContext

`getSettings, getType, getUri`

### 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.IXMLDocumentProvider

`getAllDocuments`

### Constructor Detail

#### SaveContext

    public SaveContext​(Object settings)

#### SaveContext

    public SaveContext​(String uri)

### Method Detail

#### isRefreshCodeLenses

    public boolean isRefreshCodeLenses()

#### setRefreshCodeLenses

    public void setRefreshCodeLenses​(boolean isRefreshCodeLenses)

#### collectDocumentToValidate

    public void collectDocumentToValidate​(Predicate<DOMDocument> validateDocumentPredicate)

Description copied from interface: `ISaveContext`
This method is called to collect document to validate after the save.

#### getDocument

    public DOMDocument getDocument​(String uri)

Description copied from interface: `IXMLDocumentProvider`
Returns the `DOMDocument` instance from the given `uri` and null otherwise.

Parameters:
  `uri` - the document URI.
Returns:
  the `DOMDocument` instance from the given `uri` and null otherwise.

#### triggerValidationIfNeeded

    public void triggerValidationIfNeeded()