mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inspection tool window: use compact action group
This commit is contained in:
@@ -154,7 +154,7 @@ public class QuickFixPreviewDecorator extends JPanel implements InspectionTreeLo
|
||||
@NotNull
|
||||
@Override
|
||||
protected DefaultActionGroup createPopupActionGroup(JComponent button) {
|
||||
DefaultActionGroup group = new DefaultActionGroup();
|
||||
DefaultActionGroup group = new DefaultCompactActionGroup();
|
||||
group.addAll(suppressors);
|
||||
return group;
|
||||
}
|
||||
|
||||
+1
-10
@@ -41,22 +41,13 @@ public abstract class InspectionViewActionBase extends AnAction {
|
||||
final InspectionResultsView view = getView(e);
|
||||
final boolean enabled = view != null && isEnabled(view);
|
||||
final Presentation presentation = e.getPresentation();
|
||||
if (hideIfDisabled()) {
|
||||
presentation.setEnabledAndVisible(enabled);
|
||||
}
|
||||
else {
|
||||
presentation.setEnabled(enabled);
|
||||
}
|
||||
presentation.setEnabled(enabled);
|
||||
}
|
||||
|
||||
protected boolean isEnabled(@NotNull InspectionResultsView view) {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean hideIfDisabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static InspectionResultsView getView(@Nullable AnActionEvent event) {
|
||||
if (event == null) {
|
||||
return null;
|
||||
|
||||
+1
-6
@@ -56,7 +56,7 @@ import java.util.Set;
|
||||
|
||||
import static com.intellij.codeInspection.ui.actions.InspectionViewActionBase.getView;
|
||||
|
||||
public class SuppressActionWrapper extends ActionGroup {
|
||||
public class SuppressActionWrapper extends ActionGroup implements CompactActionGroup {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.codeInspection.actions.SuppressActionWrapper");
|
||||
|
||||
public SuppressActionWrapper() {
|
||||
@@ -209,11 +209,6 @@ public class SuppressActionWrapper extends ActionGroup {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean hideIfDisabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isSuppressAll() {
|
||||
return mySuppressAction.isSuppressAll();
|
||||
}
|
||||
|
||||
@@ -994,7 +994,7 @@
|
||||
<action id="TreeNodeExclusionExclude" class="com.intellij.ide.actions.TreeNodeExclusionAction$Exclude" use-shortcut-of="$Delete"/>
|
||||
</group>>
|
||||
|
||||
<group id="InspectionToolWindow.TreePopup">
|
||||
<group id="InspectionToolWindow.TreePopup" compact="true">
|
||||
<reference ref="EditSource"/>
|
||||
<reference ref="FindUsages"/>
|
||||
<reference ref="TreeNodeExclusion"/>
|
||||
|
||||
Reference in New Issue
Block a user