本文整理匯總了Java中org.intellij.lang.xpath.validation.inspections.quickfix.XPathQuickFixFactory類的典型用法代碼示例。如果您正苦於以下問題:Java XPathQuickFixFactory類的具體用法?Java XPathQuickFixFactory怎麽用?Java XPathQuickFixFactory使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
XPathQuickFixFactory類屬於org.intellij.lang.xpath.validation.inspections.quickfix包,在下文中一共展示了XPathQuickFixFactory類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: checkExpressionOfType
import org.intellij.lang.xpath.validation.inspections.quickfix.XPathQuickFixFactory; //導入依賴的package包/類
private void checkExpressionOfType(@NotNull XPathExpression expression, XPathType type, boolean explicit) {
final XPathType exprType = expression.getType();
if (exprType.isAbstract() || type.isAbstract()) return;
if (exprType != type && (explicit || isCheckedConversion(exprType, type))) {
if (explicit && exprType == XPathType.STRING && type == XPathType.BOOLEAN) {
final XPathExpression expr = ExpectedTypeUtil.unparenthesize(expression);
if (expr instanceof XPathFunctionCall && IGNORE_NODESET_TO_BOOLEAN_VIA_STRING &&
((XPathFunctionCall)expr).getArgumentList()[0].getType() == XPathType.NODESET)
{
return;
}
}
final LocalQuickFix[] fixes;
if (type != XPathType.NODESET) {
final XPathQuickFixFactory fixFactory = ContextProvider.getContextProvider(expression).getQuickFixFactory();
explicit = explicit && !(exprType == XPathType.STRING && type == XPathType.BOOLEAN);
fixes = fixFactory.createImplicitTypeConversionFixes(expression, type, explicit);
} else {
fixes = null;
}
addProblem(myManager.createProblemDescriptor(expression,
"Expression should be of type '" + type.getName() + "'", myOnTheFly, fixes,
ProblemHighlightType.GENERIC_ERROR_OR_WARNING));
}
}
示例2: getQuickFixFactory
import org.intellij.lang.xpath.validation.inspections.quickfix.XPathQuickFixFactory; //導入依賴的package包/類
@NotNull
public XPathQuickFixFactory getQuickFixFactory() {
return XsltQuickFixFactory.INSTANCE;
}
示例3: getQuickFixFactory
import org.intellij.lang.xpath.validation.inspections.quickfix.XPathQuickFixFactory; //導入依賴的package包/類
@NotNull
public XPathQuickFixFactory getQuickFixFactory() {
return XPathQuickFixFactoryImpl.INSTANCE;
}
示例4: getQuickFixFactory
import org.intellij.lang.xpath.validation.inspections.quickfix.XPathQuickFixFactory; //導入依賴的package包/類
@Override
@NotNull
public XPathQuickFixFactory getQuickFixFactory() {
return XPathQuickFixFactoryImpl.INSTANCE;
}