Search in sources :

Example 1 with FunctionImpl

use of org.intellij.lang.xpath.context.functions.FunctionImpl in project intellij-community by JetBrains.

the class XsltFunctionImpl method getFunction.

private Function getFunction() {
    final XPathType returnType = XsltCodeInsightUtil.getDeclaredType(getTag());
    final XmlTag[] params = getTag().findSubTags("param", XsltSupport.XSLT_NS);
    final Parameter[] parameters = ContainerUtil.map2Array(params, Parameter.class, PARAM_MAPPER);
    return new FunctionImpl(null, returnType != null ? returnType : XPathType.UNKNOWN, parameters) {

        @Override
        public String getName() {
            return getQName().getLocalPart();
        }
    };
}
Also used : XPathType(org.intellij.lang.xpath.psi.XPathType) FunctionImpl(org.intellij.lang.xpath.context.functions.FunctionImpl) Parameter(org.intellij.lang.xpath.context.functions.Parameter) XmlTag(com.intellij.psi.xml.XmlTag)

Aggregations

XmlTag (com.intellij.psi.xml.XmlTag)1 FunctionImpl (org.intellij.lang.xpath.context.functions.FunctionImpl)1 Parameter (org.intellij.lang.xpath.context.functions.Parameter)1 XPathType (org.intellij.lang.xpath.psi.XPathType)1