當前位置: 首頁>>代碼示例>>Java>>正文


Java XPathQuickFixFactory類代碼示例

本文整理匯總了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));
    }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:29,代碼來源:ImplicitTypeConversion.java

示例2: getQuickFixFactory

import org.intellij.lang.xpath.validation.inspections.quickfix.XPathQuickFixFactory; //導入依賴的package包/類
@NotNull
public XPathQuickFixFactory getQuickFixFactory() {
  return XsltQuickFixFactory.INSTANCE;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:XsltContextProviderBase.java

示例3: getQuickFixFactory

import org.intellij.lang.xpath.validation.inspections.quickfix.XPathQuickFixFactory; //導入依賴的package包/類
@NotNull
public XPathQuickFixFactory getQuickFixFactory() {
    return XPathQuickFixFactoryImpl.INSTANCE;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:ContextProvider.java

示例4: getQuickFixFactory

import org.intellij.lang.xpath.validation.inspections.quickfix.XPathQuickFixFactory; //導入依賴的package包/類
@Override
@NotNull
public XPathQuickFixFactory getQuickFixFactory() {
  return XPathQuickFixFactoryImpl.INSTANCE;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:BreakpointContext.java


注:本文中的org.intellij.lang.xpath.validation.inspections.quickfix.XPathQuickFixFactory類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。