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


Java IntentionAction.EMPTY_ARRAY屬性代碼示例

本文整理匯總了Java中com.intellij.codeInsight.intention.IntentionAction.EMPTY_ARRAY屬性的典型用法代碼示例。如果您正苦於以下問題:Java IntentionAction.EMPTY_ARRAY屬性的具體用法?Java IntentionAction.EMPTY_ARRAY怎麽用?Java IntentionAction.EMPTY_ARRAY使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在com.intellij.codeInsight.intention.IntentionAction的用法示例。


在下文中一共展示了IntentionAction.EMPTY_ARRAY屬性的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getQuickFixes

@NotNull
@Override
public IntentionAction[] getQuickFixes(@NotNull PsiElement element) {
  if (!(element instanceof PsiIdentifier)) return IntentionAction.EMPTY_ARRAY;
  PsiElement parent = element.getParent();
  if (!(parent instanceof PsiClass)) return IntentionAction.EMPTY_ARRAY;

  PsiClass psiClass = (PsiClass)parent;
  if (InheritanceUtil.isInheritor(psiClass, LocalInspectionTool.class.getName())) {
    return new IntentionAction[]{new RegisterInspectionFix(psiClass, LocalInspectionEP.LOCAL_INSPECTION)};
  }
  if (InheritanceUtil.isInheritor(psiClass, GlobalInspectionTool.class.getName())) {
    return new IntentionAction[]{new RegisterInspectionFix(psiClass, InspectionEP.GLOBAL_INSPECTION)};
  }

  ExtensionPointLocator extensionPointLocator = new ExtensionPointLocator(psiClass);
  List<ExtensionPointCandidate> candidateList = extensionPointLocator.findSuperCandidates();
  if (!candidateList.isEmpty()) {
    return new IntentionAction[]{new RegisterExtensionFix(psiClass, candidateList)};
  }
  return IntentionAction.EMPTY_ARRAY;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:22,代碼來源:RegisterExtensionFixProvider.java

示例2: getVariableContext

@Override
@NotNull
public VariableContext getVariableContext() {
  return new XsltVariableContext() {
    @Override
    @Nullable
    protected XmlTag getContextTagImpl(XPathElement element) {
      return PsiTreeUtil.getParentOfType(getContextElement(), XmlTag.class, false);
    }

    @Override
    @NotNull
    public IntentionAction[] getUnresolvedVariableFixes(XPathVariableReference reference) {
      return IntentionAction.EMPTY_ARRAY;
    }
  };
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:17,代碼來源:BreakpointContext.java

示例3: getQuickFixes

@NotNull
protected IntentionAction[] getQuickFixes() {
  return IntentionAction.EMPTY_ARRAY;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:WebReferencesAnnotatorBase.java

示例4: getIntentions

@NotNull
public IntentionAction[] getIntentions(@NotNull PsiElement startElement, @NotNull PsiElement endElement) {
  return IntentionAction.EMPTY_ARRAY;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:AndroidLintInspectionBase.java

示例5: getUnresolvedVariableFixes

@NotNull
public IntentionAction[] getUnresolvedVariableFixes(XPathVariableReference reference) {
    return IntentionAction.EMPTY_ARRAY;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:SimpleVariableContext.java

示例6: getUnresolvedNamespaceFixes

@Override
public IntentionAction[] getUnresolvedNamespaceFixes(PsiReference reference, String localName) {
  return IntentionAction.EMPTY_ARRAY;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:TestNamespaceContext.java

示例7: getUnresolvedNamespaceFixes

public IntentionAction[] getUnresolvedNamespaceFixes(PsiReference reference, String localName) {
  return IntentionAction.EMPTY_ARRAY;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:3,代碼來源:EditContextDialog.java


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