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 Modifier and Type Field Description static IXMLSnippetContextDTD_CONTEXTstatic IXMLSnippetContextRNG_CONTEXTstatic IXMLSnippetContextXML_CONTEXTstatic IXMLSnippetContextXSD_CONTEXTstatic IXMLSnippetContextXSL_CONTEXT
-
Constructor Summary
Constructors Constructor Description NewFileSnippetContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanisMatch(ICompletionRequest request, Map<String,String> model)Return true if the given value match the snippet context and false otherwise.protected abstract booleanisMatchType(DOMDocument document)
-
-
-
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
-
-
Method Detail
-
isMatch
public boolean isMatch(ICompletionRequest request, Map<String,String> model)
Description copied from interface:ISnippetContextReturn true if the given value match the snippet context and false otherwise.- Specified by:
isMatchin interfaceISnippetContext<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)
-
-