Package org.eclipse.lemminx.services.snippets

## Class NewFileSnippetContext

- java.lang.Object
- - org.eclipse.lemminx.services.snippets.NewFileSnippetContext

All Implemented Interfaces:
  `ISnippetContext<ICompletionRequest>`, `IXMLSnippetContext`

    public abstract class NewFileSnippetContext
    extends Object
    implements IXMLSnippetContext

Snippet context used to filter snippets if XML file is empty or not.

### Field Summary

Fields
`static IXMLSnippetContext` `DTD_CONTEXT`
`static IXMLSnippetContext` `RNG_CONTEXT`
`static IXMLSnippetContext` `XML_CONTEXT`
`static IXMLSnippetContext` `XSD_CONTEXT`
`static IXMLSnippetContext` `XSL_CONTEXT`

### Constructor Summary

Constructors
`NewFileSnippetContext()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`boolean` `isMatch​(ICompletionRequest request, Map<String,​String> model)` Return true if the given value match the snippet context and false otherwise.
`protected abstract boolean` `isMatchType​(DOMDocument document)`

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

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

### Field Detail

#### XML_CONTEXT

    public static final IXMLSnippetContext XML_CONTEXT

#### XSD_CONTEXT

    public static final IXMLSnippetContext XSD_CONTEXT

#### DTD_CONTEXT

    public static final IXMLSnippetContext DTD_CONTEXT

#### RNG_CONTEXT

    public static final IXMLSnippetContext RNG_CONTEXT

#### XSL_CONTEXT

    public static final IXMLSnippetContext XSL_CONTEXT

### Constructor Detail

#### NewFileSnippetContext

    public NewFileSnippetContext()

### Method Detail

#### isMatch

    public boolean isMatch​(ICompletionRequest request,
                           Map<String,​String> model)

Description copied from interface: `ISnippetContext`
Return true if the given value match the snippet context and false otherwise.

Specified by:
  `isMatch` in interface `ISnippetContext<ICompletionRequest>`
Parameters:
  `request` - the value to check.
Returns:
  true if the given value match the snippet context and false otherwise.

#### isMatchType

    protected abstract boolean isMatchType​(DOMDocument document)