当前位置: 首页>>代码示例>>Java>>正文


Java IntentionFilterOwner类代码示例

本文整理汇总了Java中com.intellij.psi.IntentionFilterOwner的典型用法代码示例。如果您正苦于以下问题:Java IntentionFilterOwner类的具体用法?Java IntentionFilterOwner怎么用?Java IntentionFilterOwner使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IntentionFilterOwner类属于com.intellij.psi包,在下文中一共展示了IntentionFilterOwner类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getIntentionActionsToShow

import com.intellij.psi.IntentionFilterOwner; //导入依赖的package包/类
private void getIntentionActionsToShow() {
  getActionsToShow(myEditor, myFile, myIntentionsInfo, myPassIdToShowIntentionsFor);
  if (myFile instanceof IntentionFilterOwner) {
    final IntentionFilterOwner.IntentionActionsFilter actionsFilter = ((IntentionFilterOwner)myFile).getIntentionActionsFilter();
    if (actionsFilter == null) return;
    if (actionsFilter != IntentionFilterOwner.IntentionActionsFilter.EVERYTHING_AVAILABLE) {
      myIntentionsInfo.filterActions(actionsFilter);
    }
  }

  if (myIntentionsInfo.isEmpty()) {
    return;
  }
  myShowBulb = !myIntentionsInfo.guttersToShow.isEmpty() ||
    ContainerUtil.exists(ContainerUtil.concat(myIntentionsInfo.errorFixesToShow, myIntentionsInfo.inspectionFixesToShow,myIntentionsInfo.intentionsToShow), new Condition<HighlightInfo.IntentionActionDescriptor>() {
      @Override
      public boolean value(HighlightInfo.IntentionActionDescriptor descriptor) {
        return IntentionManagerSettings.getInstance().isShowLightBulb(descriptor.getAction());
      }
    });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:ShowIntentionsPass.java

示例2: getIntentionActionsToShow

import com.intellij.psi.IntentionFilterOwner; //导入依赖的package包/类
private void getIntentionActionsToShow() {
  if (LookupManager.getInstance(myProject).getActiveLookup() != null) return;

  getActionsToShow(myEditor, myFile, myIntentionsInfo, myPassIdToShowIntentionsFor);
  if (myFile instanceof IntentionFilterOwner) {
    final IntentionFilterOwner.IntentionActionsFilter actionsFilter = ((IntentionFilterOwner)myFile).getIntentionActionsFilter();
    if (actionsFilter == null) return;
    if (actionsFilter != IntentionFilterOwner.IntentionActionsFilter.EVERYTHING_AVAILABLE) {
      myIntentionsInfo.filterActions(actionsFilter);
    }
  }

  if (myIntentionsInfo.isEmpty()) {
    return;
  }
  myShowBulb = !myIntentionsInfo.guttersToShow.isEmpty();
  if (!myShowBulb) {
    for (HighlightInfo.IntentionActionDescriptor descriptor : ContainerUtil.concat(myIntentionsInfo.errorFixesToShow, myIntentionsInfo.inspectionFixesToShow,myIntentionsInfo.intentionsToShow)) {
      final IntentionAction action = descriptor.getAction();
      if (IntentionManagerSettings.getInstance().isShowLightBulb(action)) {
        myShowBulb = true;
        break;
      }
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:ShowIntentionsPass.java

示例3: filter

import com.intellij.psi.IntentionFilterOwner; //导入依赖的package包/类
private static void filter(@NotNull List<HighlightInfo.IntentionActionDescriptor> descriptors,
                           @NotNull IntentionFilterOwner.IntentionActionsFilter actionsFilter) {
  for (Iterator<HighlightInfo.IntentionActionDescriptor> it = descriptors.iterator(); it.hasNext();) {
      HighlightInfo.IntentionActionDescriptor actionDescriptor = it.next();
      if (!actionsFilter.isAvailable(actionDescriptor.getAction())) it.remove();
    }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ShowIntentionsPass.java

示例4: filterActions

import com.intellij.psi.IntentionFilterOwner; //导入依赖的package包/类
private void filterActions(@NotNull IntentionFilterOwner.IntentionActionsFilter actionsFilter) {
  filter(intentionsToShow, actionsFilter);
  filter(errorFixesToShow, actionsFilter);
  filter(inspectionFixesToShow, actionsFilter);
  filter(guttersToShow, actionsFilter);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:ShowIntentionsPass.java

示例5: filterActions

import com.intellij.psi.IntentionFilterOwner; //导入依赖的package包/类
public void filterActions(@NotNull IntentionFilterOwner.IntentionActionsFilter actionsFilter) {
  filter(intentionsToShow, actionsFilter);
  filter(errorFixesToShow, actionsFilter);
  filter(inspectionFixesToShow, actionsFilter);
  filter(guttersToShow, actionsFilter);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:7,代码来源:ShowIntentionsPass.java


注:本文中的com.intellij.psi.IntentionFilterOwner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。