mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-207103 Remove icons from debugger tabs
GitOrigin-RevId: 7c1ebfdf93c5135f5d36c2f7da449df670db7198
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b7e6877592
commit
ae472ead02
@@ -324,7 +324,7 @@ public class JavaDebugProcess extends XDebugProcess {
|
||||
final ThreadsPanel panel = new ThreadsPanel(myJavaSession.getProject(), getDebuggerStateManager());
|
||||
final Content threadsContent = ui.createContent(
|
||||
DebuggerContentInfo.THREADS_CONTENT, panel, XDebuggerBundle.message("debugger.session.tab.threads.title"),
|
||||
AllIcons.Debugger.Threads, null);
|
||||
null, null);
|
||||
threadsContent.setCloseable(false);
|
||||
ui.addContent(threadsContent, 0, PlaceInGrid.left, true);
|
||||
ui.addListener(new ContentManagerAdapter() {
|
||||
@@ -356,7 +356,7 @@ public class JavaDebugProcess extends XDebugProcess {
|
||||
|
||||
final Content memoryViewContent =
|
||||
ui.createContent(MemoryViewManager.MEMORY_VIEW_CONTENT, classesFilteredView, "Memory",
|
||||
AllIcons.Debugger.MemoryView.Active, null);
|
||||
null, null);
|
||||
|
||||
memoryViewContent.setCloseable(false);
|
||||
memoryViewContent.setShouldDisposeContent(true);
|
||||
@@ -388,7 +388,7 @@ public class JavaDebugProcess extends XDebugProcess {
|
||||
|
||||
DebugProcessImpl process = myJavaSession.getProcess();
|
||||
OverheadView monitor = new OverheadView(process);
|
||||
Content overheadContent = ui.createContent("OverheadMonitor", monitor, "Overhead", AllIcons.Debugger.Overhead, null);
|
||||
Content overheadContent = ui.createContent("OverheadMonitor", monitor, "Overhead", null, null);
|
||||
|
||||
monitor.setBouncer(() -> ui.setBouncing(overheadContent, true));
|
||||
|
||||
|
||||
+20
-29
@@ -16,50 +16,41 @@
|
||||
|
||||
package com.intellij.execution.ui.layout.actions;
|
||||
|
||||
import com.intellij.execution.ui.layout.CellTransform;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.idea.ActionsBundle;
|
||||
import com.intellij.execution.ui.layout.impl.RunnerContentUi;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.Presentation;
|
||||
import com.intellij.openapi.project.DumbAwareAction;
|
||||
import com.intellij.ui.LayeredIcon;
|
||||
import com.intellij.openapi.project.DumbAwareToggleAction;
|
||||
import com.intellij.ui.content.Content;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class RestoreViewAction extends DumbAwareAction {
|
||||
public class RestoreViewAction extends DumbAwareToggleAction {
|
||||
|
||||
private final RunnerContentUi myUi;
|
||||
private final Content myContent;
|
||||
private final CellTransform.Restore myRestoreAction;
|
||||
|
||||
private boolean myAlert;
|
||||
|
||||
public RestoreViewAction(final Content content, CellTransform.Restore restore) {
|
||||
myContent = content;
|
||||
myRestoreAction = restore;
|
||||
myContent.addPropertyChangeListener(l -> {
|
||||
if (Content.PROP_ALERT.equals(l.getPropertyName())) {
|
||||
myAlert = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSelected(@NotNull AnActionEvent e) {
|
||||
return myContent.isValid() && myContent.getManager().getIndexOfContent(myContent) != -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelected(@NotNull AnActionEvent e, boolean state) {
|
||||
if (state) {
|
||||
myUi.restore(myContent);
|
||||
} else {
|
||||
myUi.minimize(myContent, null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(@NotNull final AnActionEvent e) {
|
||||
Presentation p = e.getPresentation();
|
||||
p.setText(ActionsBundle.message("action.Runner.RestoreView.text", myContent.getDisplayName()));
|
||||
p.setDescription(ActionsBundle.message("action.Runner.RestoreView.description"));
|
||||
Icon icon = myContent.getIcon();
|
||||
if (myAlert) {
|
||||
icon = new LayeredIcon(icon, AllIcons.Nodes.TabAlert);
|
||||
}
|
||||
p.setIcon(icon == null ? AllIcons.Debugger.RestoreLayout : icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(@NotNull final AnActionEvent e) {
|
||||
myRestoreAction.restoreInGrid();
|
||||
super.update(e);
|
||||
e.getPresentation().setText(myContent.getDisplayName());
|
||||
}
|
||||
|
||||
public Content getContent() {
|
||||
|
||||
@@ -944,8 +944,6 @@
|
||||
|
||||
<group id="RunnerLayoutActions">
|
||||
<group id="Runner.Layout">
|
||||
<action id="Runner.RestoreLayout" class="com.intellij.execution.ui.layout.actions.RestoreLayoutAction"
|
||||
icon="AllIcons.Debugger.RestoreLayout"/>
|
||||
</group>
|
||||
<group id="Runner.View.Close.Group" popup="false">
|
||||
<action id="Runner.CloseView" class="com.intellij.execution.ui.layout.actions.CloseViewAction" icon="AllIcons.Actions.Close"/>
|
||||
|
||||
@@ -190,7 +190,7 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
|
||||
registerView(DebuggerContentInfo.VARIABLES_CONTENT, variablesView);
|
||||
Content result = myUi.createContent(DebuggerContentInfo.VARIABLES_CONTENT, variablesView.getPanel(),
|
||||
XDebuggerBundle.message("debugger.session.tab.variables.title"),
|
||||
AllIcons.Debugger.VariablesTab, variablesView.getDefaultFocusedComponent());
|
||||
null, variablesView.getDefaultFocusedComponent());
|
||||
result.setCloseable(false);
|
||||
|
||||
ActionGroup group = getCustomizedActionGroup(XDebuggerActions.VARIABLES_TREE_TOOLBAR_GROUP);
|
||||
@@ -202,7 +202,7 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
|
||||
myWatchesView = new XWatchesViewImpl(session, myWatchesInVariables);
|
||||
registerView(DebuggerContentInfo.WATCHES_CONTENT, myWatchesView);
|
||||
Content watchesContent = myUi.createContent(DebuggerContentInfo.WATCHES_CONTENT, myWatchesView.getPanel(),
|
||||
XDebuggerBundle.message("debugger.session.tab.watches.title"), AllIcons.Debugger.Watch, myWatchesView.getDefaultFocusedComponent());
|
||||
XDebuggerBundle.message("debugger.session.tab.watches.title"), null, myWatchesView.getDefaultFocusedComponent());
|
||||
watchesContent.setCloseable(false);
|
||||
return watchesContent;
|
||||
}
|
||||
@@ -212,7 +212,7 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
|
||||
XFramesView framesView = new XFramesView(myProject);
|
||||
registerView(DebuggerContentInfo.FRAME_CONTENT, framesView);
|
||||
Content framesContent = myUi.createContent(DebuggerContentInfo.FRAME_CONTENT, framesView.getMainPanel(),
|
||||
XDebuggerBundle.message("debugger.session.tab.frames.title"), AllIcons.Debugger.Frame, framesView.getDefaultFocusedComponent());
|
||||
XDebuggerBundle.message("debugger.session.tab.frames.title"), /*AllIcons.Debugger.Frame*/null, framesView.getDefaultFocusedComponent());
|
||||
framesContent.setCloseable(false);
|
||||
return framesContent;
|
||||
}
|
||||
@@ -222,7 +222,7 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
|
||||
XThreadsView stacksView = new XThreadsView(myProject, mySession);
|
||||
registerView(DebuggerContentInfo.THREADS_CONTENT, stacksView);
|
||||
Content framesContent = myUi.createContent(DebuggerContentInfo.THREADS_CONTENT, stacksView.getPanel(),
|
||||
XDebuggerBundle.message("debugger.session.tab.threads.title"), AllIcons.Debugger.Threads,
|
||||
XDebuggerBundle.message("debugger.session.tab.threads.title"), null,
|
||||
stacksView.getDefaultFocusedComponent());
|
||||
framesContent.setCloseable(false);
|
||||
return framesContent;
|
||||
|
||||
Reference in New Issue
Block a user