Skip to content

Commit

Permalink
IJPL-171375, IJPL-171377 Suppress Problems View tabs in Editor
Browse files Browse the repository at this point in the history
GitOrigin-RevId: fe8af934b3b747280352014838faa4cdc7c316d9
  • Loading branch information
gregsh authored and intellij-monorepo-bot committed Nov 25, 2024
1 parent bd61579 commit 3bf0245
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions platform/ide-core/api-dump-unreviewed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2530,6 +2530,7 @@ com.intellij.openapi.wm.ToolWindowId
- sf:MESSAGES_WINDOW:java.lang.String
- sf:MODULES_DEPENDENCIES:java.lang.String
- sf:PREVIEW:java.lang.String
- sf:PROBLEMS_VIEW:java.lang.String
- sf:PROJECT_VIEW:java.lang.String
- sf:RUN:java.lang.String
- sf:SERVICES:java.lang.String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public interface ToolWindowId {
String MESSAGES_WINDOW = "Messages";
String PROJECT_VIEW = "Project";
String STRUCTURE_VIEW = "Structure";
String PROBLEMS_VIEW = "Problems View";
String FAVORITES_VIEW = "Favorites";
String BOOKMARKS = "Bookmarks";
String ANT_BUILD = "Ant";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowFactory;
import com.intellij.openapi.wm.ToolWindowId;
import com.intellij.openapi.wm.ToolWindowManager;
import com.intellij.openapi.wm.ex.ToolWindowManagerListener;
import com.intellij.openapi.wm.impl.ToolWindowManagerImpl;
Expand All @@ -31,7 +32,7 @@
import java.util.concurrent.atomic.AtomicBoolean;

public final class ProblemsView implements DumbAware, ToolWindowFactory {
public static final String ID = "Problems View";
public static final String ID = ToolWindowId.PROBLEMS_VIEW;

public static @Nullable ToolWindow getToolWindow(@NotNull Project project) {
return project.isDisposed() ? null : ToolWindowManager.getInstance(project).getToolWindow(ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ internal class MoveToolWindowTabToEditorAction : DumbAwareAction() {
val fileEditor = e.getData(PlatformDataKeys.FILE_EDITOR)
val toolWindow = e.getData(PlatformDataKeys.TOOL_WINDOW)
val content = toolWindow?.let { ToolWindowContextMenuActionBase.getContextContent(e, it) }
val enabled = content != null && toolWindow.id != ToolWindowId.STRUCTURE_VIEW ||
val enabled = content != null &&
toolWindow.id != ToolWindowId.STRUCTURE_VIEW &&
toolWindow.id != ToolWindowId.PROBLEMS_VIEW ||
fileEditor?.file is ToolWindowTabFileImpl

e.presentation.isEnabledAndVisible = enabled
Expand Down

0 comments on commit 3bf0245

Please sign in to comment.