IDEA-136612 Allow to hide package name in frames view

This commit is contained in:
Egor.Ushakov
2015-02-16 20:25:46 +03:00
parent edac05d5a4
commit cc0f243231
5 changed files with 30 additions and 25 deletions
@@ -1,27 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.debugger.settings.ThreadsViewConfigurable">
<grid id="a2574" binding="myPanel" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="a2574" binding="myPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="126" y="76" width="271" height="203"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="4cb6d" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="0">
<grid id="4cb6d" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="0">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="0" y="0" width="271" height="79"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="1" fill="1"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="1" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="etched"/>
<children>
<component id="b8249" class="javax.swing.JCheckBox" binding="myShowGroupsCheckBox">
<constraints>
<xy x="2" y="2" width="140" height="27"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<margin top="5" left="2" bottom="2" right="2"/>
@@ -30,8 +27,7 @@
</component>
<component id="5bfe" class="javax.swing.JCheckBox" binding="myShowSyntheticsCheckBox">
<constraints>
<xy x="2" y="29" width="267" height="24"/>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0"/>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/DebuggerBundle" key="label.threads.view.configurable.show.stack.frames.for.synthetic.methods"/>
@@ -39,8 +35,7 @@
</component>
<component id="a7f8b" class="javax.swing.JCheckBox" binding="myShowCurrentThreadChechBox">
<constraints>
<xy x="2" y="53" width="206" height="24"/>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0"/>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/DebuggerBundle" key="label.threads.view.configurable.current.thread.on.top"/>
@@ -48,19 +43,17 @@
</component>
</children>
</grid>
<grid id="f4cba" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="0">
<grid id="f4cba" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="0">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="0" y="84" width="271" height="79"/>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="1" fill="1"/>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="1" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="etched"/>
<children>
<component id="4f5e9" class="javax.swing.JCheckBox" binding="myLineNumberCheckBox">
<constraints>
<xy x="2" y="2" width="128" height="27"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<margin top="5" left="2" bottom="2" right="2"/>
@@ -69,8 +62,7 @@
</component>
<component id="2fbc6" class="javax.swing.JCheckBox" binding="myClassNameCheckBox">
<constraints>
<xy x="2" y="29" width="123" height="24"/>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0"/>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/DebuggerBundle" key="label.threads.view.configurable.show.class.name"/>
@@ -78,13 +70,20 @@
</component>
<component id="b56d7" class="javax.swing.JCheckBox" binding="mySourceCheckBox">
<constraints>
<xy x="2" y="53" width="156" height="24"/>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0"/>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/DebuggerBundle" key="label.threads.view.configurable.show.source.file.name"/>
</properties>
</component>
<component id="99bb5" class="javax.swing.JCheckBox" binding="myPackageCheckBox">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/DebuggerBundle" key="label.threads.view.configurable.show.package"/>
</properties>
</component>
</children>
</grid>
</children>
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* 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.
@@ -38,12 +38,14 @@ public class ThreadsViewConfigurable extends BaseConfigurable {
private JCheckBox mySourceCheckBox;
private JCheckBox myShowSyntheticsCheckBox;
private JCheckBox myShowCurrentThreadChechBox;
private JCheckBox myPackageCheckBox;
private final CompositeDataBinding myDataBinding = new CompositeDataBinding();
public ThreadsViewConfigurable(ThreadsViewSettings settings) {
mySettings = settings;
myDataBinding.addBinding(new ToggleButtonBinding("SHOW_CLASS_NAME", myClassNameCheckBox));
myDataBinding.addBinding(new ToggleButtonBinding("SHOW_PACKAGE_NAME", myPackageCheckBox));
myDataBinding.addBinding(new ToggleButtonBinding("SHOW_LINE_NUMBER", myLineNumberCheckBox));
myDataBinding.addBinding(new ToggleButtonBinding("SHOW_SOURCE_NAME", mySourceCheckBox));
myDataBinding.addBinding(new ToggleButtonBinding("SHOW_THREAD_GROUPS", myShowGroupsCheckBox));
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* 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.
@@ -29,6 +29,7 @@ public class ThreadsViewSettings implements PersistentStateComponent<ThreadsView
public boolean SHOW_THREAD_GROUPS = false;
public boolean SHOW_LINE_NUMBER = true;
public boolean SHOW_CLASS_NAME = true;
public boolean SHOW_PACKAGE_NAME = true;
public boolean SHOW_SOURCE_NAME = false;
public boolean SHOW_SYNTHETIC_FRAMES = true;
public boolean SHOW_CURRENT_THREAD = true;
@@ -229,9 +229,11 @@ public class StackFrameDescriptorImpl extends NodeDescriptorImpl implements Stac
}
else {
label.append(name.substring(dotIndex + 1));
label.append(" {");
label.append(name.substring(0, dotIndex));
label.append("}");
if (settings.SHOW_PACKAGE_NAME) {
label.append(" {");
label.append(name.substring(0, dotIndex));
label.append("}");
}
}
}
}