Search in sources :

Example 1 with InspectionRVContentProvider

use of com.intellij.codeInspection.ex.InspectionRVContentProvider in project intellij-community by JetBrains.

the class InvokeQuickFixAction method update.

@Override
public void update(AnActionEvent e) {
    final Presentation presentation = e.getPresentation();
    InspectionToolWrapper toolWrapper = myView.getTree().getSelectedToolWrapper(true);
    final InspectionRVContentProvider provider = myView.getProvider();
    if (toolWrapper == null || cantApplyFixes(myView)) {
        presentation.setEnabled(false);
        return;
    }
    presentation.setEnabled(provider.hasQuickFixes(myView.getTree()));
}
Also used : InspectionToolWrapper(com.intellij.codeInspection.ex.InspectionToolWrapper) InspectionRVContentProvider(com.intellij.codeInspection.ex.InspectionRVContentProvider)

Aggregations

InspectionRVContentProvider (com.intellij.codeInspection.ex.InspectionRVContentProvider)1 InspectionToolWrapper (com.intellij.codeInspection.ex.InspectionToolWrapper)1