From e9a005b233cadca12eaf57cee3a3e811978b3429 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Mon, 4 Dec 2017 22:05:26 +0300 Subject: [PATCH] remove help button from inspection TW --- .../ex/GlobalInspectionContextImpl.java | 6 ++++-- .../codeInspection/ui/InspectionResultsView.java | 15 +++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java index c7db9a463788..40ddc42ff1d0 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java @@ -1,4 +1,6 @@ -// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +/* + * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. + */ package com.intellij.codeInspection.ex; @@ -137,7 +139,7 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp myView.getTree().setTreeState(myTreeState); } myContent = ContentFactory.SERVICE.getInstance().createContent(view, title, false); - + myContent.setHelpId(InspectionResultsView.HELP_ID); myContent.setDisposer(myView); ContentManager contentManager = getContentManager(); diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java index 5d15bb25577f..2ec3c269f7c5 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java @@ -1,4 +1,6 @@ -// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +/* + * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. + */ package com.intellij.codeInspection.ui; @@ -16,7 +18,6 @@ import com.intellij.codeInspection.ui.actions.ExportHTMLAction; import com.intellij.codeInspection.ui.actions.InvokeQuickFixAction; import com.intellij.diff.util.DiffUtil; import com.intellij.ide.*; -import com.intellij.ide.actions.ContextHelpAction; import com.intellij.ide.actions.exclusion.ExclusionHandler; import com.intellij.injected.editor.VirtualFileWindow; import com.intellij.notification.NotificationType; @@ -69,7 +70,6 @@ import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.util.*; import java.util.List; -import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; public class InspectionResultsView extends JPanel implements Disposable, DataProvider, OccurenceNavigator { @@ -85,7 +85,7 @@ public class InspectionResultsView extends JPanel implements Disposable, DataPro @NotNull private final AnalysisScope myScope; @NonNls - private static final String HELP_ID = "reference.toolWindows.inspections"; + public static final String HELP_ID = "reference.toolWindows.inspections"; private final Splitter mySplitter; @NotNull @@ -325,9 +325,9 @@ public class InspectionResultsView extends JPanel implements Disposable, DataPro } private void createActionsToolbar() { - JPanel westPanel = new JPanel(new BorderLayout()); - westPanel.add(createLeftActionsToolbar(), BorderLayout.WEST); - westPanel.add(createRightActionsToolbar(), BorderLayout.EAST); + JPanel westPanel = JBUI.Panels.simplePanel() + .addToLeft(createLeftActionsToolbar()) + .addToRight(createRightActionsToolbar()); add(westPanel, BorderLayout.WEST); } @@ -354,7 +354,6 @@ public class InspectionResultsView extends JPanel implements Disposable, DataPro group.add(actionsManager.createCollapseAllAction(treeExpander, myTree)); group.add(actionsManager.createPrevOccurenceAction(getOccurenceNavigator())); group.add(actionsManager.createNextOccurenceAction(getOccurenceNavigator())); - group.add(new ContextHelpAction(HELP_ID)); return createToolbar(group); }