use of com.intellij.codeInspection.ex.QuickFixAction in project intellij-community by JetBrains.
the class QuickFixesViewActionGroup method getChildren.
@NotNull
@Override
public AnAction[] getChildren(@Nullable AnActionEvent e) {
final InspectionResultsView view = getView(e);
if (view == null || InvokeQuickFixAction.cantApplyFixes(view)) {
return AnAction.EMPTY_ARRAY;
}
InspectionToolWrapper toolWrapper = view.getTree().getSelectedToolWrapper(true);
if (toolWrapper == null)
return AnAction.EMPTY_ARRAY;
final QuickFixAction[] quickFixes = view.getProvider().getQuickFixes(toolWrapper, view.getTree());
if (quickFixes == null || quickFixes.length == 0) {
return AnAction.EMPTY_ARRAY;
}
return quickFixes;
}
Aggregations