mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
variables context menu toggle to show/hide types
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.debugger.actions;
|
||||
|
||||
import com.intellij.debugger.engine.JavaDebugProcess;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.RegistryToggleAction;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.xdebugger.XDebugSession;
|
||||
import com.intellij.xdebugger.XDebuggerManager;
|
||||
import com.intellij.xdebugger.impl.XDebuggerUtilImpl;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author egor
|
||||
*/
|
||||
public class ShowTypesAction extends RegistryToggleAction {
|
||||
public ShowTypesAction() {
|
||||
super("debugger.showTypes");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doWhenDone(AnActionEvent e) {
|
||||
XDebuggerUtilImpl.rebuildAllSessionsViews(e.getProject());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(@NotNull AnActionEvent e) {
|
||||
Project project = e.getProject();
|
||||
if (project != null) {
|
||||
XDebugSession session = XDebuggerManager.getInstance(project).getCurrentSession();
|
||||
if (session != null && session.getDebugProcess() instanceof JavaDebugProcess) {
|
||||
e.getPresentation().setEnabledAndVisible(true);
|
||||
super.update(e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
e.getPresentation().setEnabledAndVisible(false);
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,7 @@ import com.intellij.debugger.ui.tree.render.*;
|
||||
import com.intellij.debugger.ui.tree.render.Renderer;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiExpression;
|
||||
@@ -138,7 +139,7 @@ public abstract class ValueDescriptorImpl extends NodeDescriptorImpl implements
|
||||
}
|
||||
|
||||
public boolean isShowIdLabel() {
|
||||
return myShowIdLabel;
|
||||
return myShowIdLabel && Registry.is("debugger.showTypes");
|
||||
}
|
||||
|
||||
public void setShowIdLabel(boolean showIdLabel) {
|
||||
|
||||
@@ -180,6 +180,8 @@ ide.mac.retina.disableDrawingFix=false
|
||||
ide.mac.fix.font.fallback=false
|
||||
ide.mac.fix.font.fallback.description=Fix font fallback mechanism by using a more elaborate procedure to check whether specific font can display a particular character (when Apple JDK is used)
|
||||
|
||||
debugger.showTypes=true
|
||||
debugger.showTypes.description=Show types in variables tree
|
||||
debugger.valueTooltipAutoShow=true
|
||||
debugger.valueTooltipAutoShow.description=Auto show tooltip on mouse over.
|
||||
debugger.valueTooltipAutoShowOnSelection=false
|
||||
|
||||
@@ -181,6 +181,9 @@
|
||||
<action id="Debugger.AdjustArrayRange" class="com.intellij.debugger.actions.AdjustArrayRangeAction">
|
||||
<add-to-group group-id="XDebugger.ValueGroup" anchor="last"/>
|
||||
</action>
|
||||
<action id="Debugger.ShowTypes" class="com.intellij.debugger.actions.ShowTypesAction" text="Show types">
|
||||
<add-to-group group-id="XDebugger.ValueGroup" anchor="last"/>
|
||||
</action>
|
||||
<!--<action id="Debugger.SetValue" class="com.intellij.debugger.actions.SetValueAction"/>-->
|
||||
<!--<action id="Debugger.ShowAsHex" class="com.intellij.debugger.actions.ShowAsHexAction" text="Show as Hex"/>-->
|
||||
<action id="Debugger.ResumeThread" class="com.intellij.debugger.actions.ResumeThreadAction"/>
|
||||
|
||||
Reference in New Issue
Block a user