本文整理汇总了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());
}
});
}
示例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;
}
}
}
}
示例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();
}
}
示例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);
}
示例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);
}