本文整理匯總了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);
}