Search in sources :

Example 6 with XPathFile

use of org.intellij.lang.xpath.XPathFile in project intellij-community by JetBrains.

the class XPathChangeUtil method createXPathFile.

@NotNull
public static XPathFile createXPathFile(PsiElement context, String text) {
    final XPathFile file = createXPathFile(context.getProject(), text, context.getContainingFile().getFileType());
    ContextProvider.copy(context.getContainingFile(), file);
    return file;
}
Also used : XPathFile(org.intellij.lang.xpath.XPathFile) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

XPathFile (org.intellij.lang.xpath.XPathFile)6 NotNull (org.jetbrains.annotations.NotNull)3 TextRange (com.intellij.openapi.util.TextRange)2 PsiElement (com.intellij.psi.PsiElement)2 PsiFile (com.intellij.psi.PsiFile)2 XPathExpression (org.intellij.lang.xpath.psi.XPathExpression)2 SelectionModel (com.intellij.openapi.editor.SelectionModel)1 Pair (com.intellij.openapi.util.Pair)1 PsiLanguageInjectionHost (com.intellij.psi.PsiLanguageInjectionHost)1 XmlAttribute (com.intellij.psi.xml.XmlAttribute)1 XmlElement (com.intellij.psi.xml.XmlElement)1 SmartList (com.intellij.util.SmartList)1 List (java.util.List)1 QName (javax.xml.namespace.QName)1 ContextProvider (org.intellij.lang.xpath.context.ContextProvider)1 NamespaceContext (org.intellij.lang.xpath.context.NamespaceContext)1 Function (org.intellij.lang.xpath.context.functions.Function)1