本文整理汇总了Java中org.intellij.lang.xpath.context.functions.FunctionContext类的典型用法代码示例。如果您正苦于以下问题:Java FunctionContext类的具体用法?Java FunctionContext怎么用?Java FunctionContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FunctionContext类属于org.intellij.lang.xpath.context.functions包,在下文中一共展示了FunctionContext类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: compute
import org.intellij.lang.xpath.context.functions.FunctionContext; //导入依赖的package包/类
@Override
protected FunctionContext compute(final XmlFile xmlFile, Void p) {
final FunctionContext base = Xslt2FunctionContext.getInstance();
return new FunctionContext() {
@Override
public Map<Pair<QName, Integer>, Function> getFunctions() {
return ContainerUtil.union(base.getFunctions(), getCustomFunctions(xmlFile));
}
@Override
public boolean allowsExtensions() {
return base.allowsExtensions();
}
@Override
public Function resolve(QName name, int argCount) {
final Function f = base.resolve(name, argCount);
if (f == null) {
return resolveCustomFunction(xmlFile, name, argCount);
}
return f;
}
};
}
示例2: createFunctionContext
import org.intellij.lang.xpath.context.functions.FunctionContext; //导入依赖的package包/类
@Override
@NotNull
public FunctionContext createFunctionContext() {
final XmlElement contextElement = getContextElement();
return contextElement != null && contextElement.isValid() ?
functionContextCache.get((XmlFile)contextElement.getContainingFile(), null) :
Xslt2FunctionContext.getInstance();
}
示例3: getFunctionContext
import org.intellij.lang.xpath.context.functions.FunctionContext; //导入依赖的package包/类
@NotNull
public FunctionContext getFunctionContext() {
FunctionContext context = myFunctionContext;
if (context == null) {
context = createFunctionContext();
}
return (myFunctionContext = context);
}
示例4: createFunctionContext
import org.intellij.lang.xpath.context.functions.FunctionContext; //导入依赖的package包/类
@Override
@NotNull
public FunctionContext createFunctionContext() {
return XsltFunctionContext.getInstance();
}
示例5: createFunctionContext
import org.intellij.lang.xpath.context.functions.FunctionContext; //导入依赖的package包/类
protected FunctionContext createFunctionContext() {
return DefaultFunctionContext.getInstance(getContextType());
}
示例6: create
import org.intellij.lang.xpath.context.functions.FunctionContext; //导入依赖的package包/类
@Override
public FunctionContext create() {
return new Xslt2FunctionContext();
}
示例7: getInstance
import org.intellij.lang.xpath.context.functions.FunctionContext; //导入依赖的package包/类
public static FunctionContext getInstance() {
return getInstance(Xslt2ContextProvider.TYPE, FACTORY);
}