diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XLightBreakpointPropertiesPanel.form b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XLightBreakpointPropertiesPanel.form
index 4ce06a6b52da..a29f56403255 100644
--- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XLightBreakpointPropertiesPanel.form
+++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XLightBreakpointPropertiesPanel.form
@@ -1,38 +1,35 @@
diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XLightBreakpointPropertiesPanel.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XLightBreakpointPropertiesPanel.java
index 810b5558a6cb..4ba93194aa17 100644
--- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XLightBreakpointPropertiesPanel.java
+++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XLightBreakpointPropertiesPanel.java
@@ -20,7 +20,7 @@ import com.intellij.openapi.wm.IdeFocusManager;
import com.intellij.ui.components.JBCheckBox;
import com.intellij.ui.components.JBLabel;
import com.intellij.ui.popup.util.DetailView;
-import com.intellij.util.ui.UIUtil;
+import com.intellij.util.ui.JBUI;
import com.intellij.xdebugger.XDebuggerBundle;
import com.intellij.xdebugger.XExpression;
import com.intellij.xdebugger.breakpoints.XBreakpointManager;
@@ -89,6 +89,7 @@ public class XLightBreakpointPropertiesPanel> i
private JBCheckBox myConditionEnabledCheckbox;
private JPanel myCustomTopPropertiesPanelWrapper;
private JPanel myConditionEnabledPanel;
+ private JBLabel myBreakpointNameLabel;
private final List> myCustomPanels;
private final List> mySubPanels = new ArrayList>();
@@ -98,8 +99,6 @@ public class XLightBreakpointPropertiesPanel> i
private final B myBreakpoint;
private final boolean myShowAllOptions;
- private static final String CONDITION_ENABLED_LABEL = "label";
- private static final String CONDITION_ENABLED_CHECKBOX = "checkbox";
public void setDetailView(DetailView detailView) {
myMasterBreakpointPanel.setDetailView(detailView);
@@ -140,12 +139,9 @@ public class XLightBreakpointPropertiesPanel> i
myCustomPanels = new ArrayList>();
if (debuggerEditorsProvider != null) {
myConditionEnabledCheckbox = new JBCheckBox(XDebuggerBundle.message("xbreakpoints.condition.checkbox"));
- JBLabel conditionEnabledLabel = new JBLabel(XDebuggerBundle.message("xbreakpoints.condition.checkbox"));
- conditionEnabledLabel.setBorder(UIUtil.getTextAlignBorder(myConditionEnabledCheckbox));
- myConditionEnabledPanel.add(myConditionEnabledCheckbox, CONDITION_ENABLED_CHECKBOX);
- myConditionEnabledPanel.add(conditionEnabledLabel, CONDITION_ENABLED_LABEL);
myConditionComboBox = new XDebuggerExpressionComboBox(project, debuggerEditorsProvider, CONDITION_HISTORY_ID, myBreakpoint.getSourcePosition());
JComponent conditionComponent = myConditionComboBox.getComponent();
+ conditionComponent.setBorder(JBUI.Borders.emptyRight(3));
myConditionExpressionPanel.add(conditionComponent, BorderLayout.CENTER);
myConditionEnabledCheckbox.addActionListener(new ActionListener() {
@Override
@@ -192,6 +188,9 @@ public class XLightBreakpointPropertiesPanel> i
myCustomTopPropertiesPanelWrapper.add(customTopPropertiesPanel.getComponent(), BorderLayout.CENTER);
myCustomPanels.add(customTopPropertiesPanel);
}
+ else {
+ myCustomTopPropertiesPanelWrapper.getParent().remove(myCustomTopPropertiesPanelWrapper);
+ }
myMainPanel.addFocusListener(new FocusAdapter() {
@Override
@@ -252,7 +251,15 @@ public class XLightBreakpointPropertiesPanel> i
myConditionComboBox.setExpression(condition);
boolean hideCheckbox = !myShowAllOptions && condition == null;
myConditionEnabledCheckbox.setSelected(hideCheckbox || (myBreakpoint.isConditionEnabled() && condition != null));
- ((CardLayout)myConditionEnabledPanel.getLayout()).show(myConditionEnabledPanel, hideCheckbox ? CONDITION_ENABLED_LABEL : CONDITION_ENABLED_CHECKBOX);
+ myConditionEnabledPanel.removeAll();
+ if (hideCheckbox) {
+ JBLabel label = new JBLabel(XDebuggerBundle.message("xbreakpoints.condition.checkbox"));
+ label.setBorder(JBUI.Borders.empty(0, 4));
+ myConditionEnabledPanel.add(label);
+ }
+ else {
+ myConditionEnabledPanel.add(myConditionEnabledCheckbox);
+ }
onCheckboxChanged();
}
@@ -261,7 +268,7 @@ public class XLightBreakpointPropertiesPanel> i
customPanel.loadFrom(myBreakpoint);
}
myEnabledCheckbox.setSelected(myBreakpoint.isEnabled());
- myEnabledCheckbox.setText(XBreakpointUtil.getShortText(myBreakpoint) + " enabled");
+ myBreakpointNameLabel.setText(XBreakpointUtil.getShortText(myBreakpoint));
}
public JPanel getMainPanel() {
diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XSuspendPolicyPanel.form b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XSuspendPolicyPanel.form
index 9f1a743cf0ea..7bafcedf0304 100644
--- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XSuspendPolicyPanel.form
+++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XSuspendPolicyPanel.form
@@ -3,7 +3,7 @@
-
+
@@ -39,14 +39,32 @@
-
+
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XSuspendPolicyPanel.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XSuspendPolicyPanel.java
index b83cfa4d3193..726b823bef7f 100644
--- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XSuspendPolicyPanel.java
+++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/XSuspendPolicyPanel.java
@@ -36,6 +36,7 @@ public class XSuspendPolicyPanel> extends XBreakpointPr
private JPanel myContentPane;
private JButton myMakeDefaultButton;
+ private JPanel myMakeDefaultPanel;
private ButtonGroup mySuspendPolicyGroup;
@@ -99,7 +100,11 @@ public class XSuspendPolicyPanel> extends XBreakpointPr
}
private void updateMakeDefaultEnableState() {
- myMakeDefaultButton.setEnabled(!getSelectedSuspendPolicy().equals(((XBreakpointManagerImpl)myBreakpointManager).getBreakpointDefaults(myBreakpointType).getSuspendPolicy()));
+ boolean enabled = !getSelectedSuspendPolicy().equals(
+ ((XBreakpointManagerImpl)myBreakpointManager).getBreakpointDefaults(myBreakpointType).getSuspendPolicy());
+ ((CardLayout)myMakeDefaultPanel.getLayout()).show(myMakeDefaultPanel, enabled ? "Show" : "Hide");
+ myMakeDefaultButton.setVisible(enabled);
+ myMakeDefaultButton.setEnabled(enabled);
}
private void updateSuspendPolicyFont() {
@@ -125,7 +130,7 @@ public class XSuspendPolicyPanel> extends XBreakpointPr
private void changeVisibleState(boolean suspendThreadSupported) {
mySuspendAll.setVisible(suspendThreadSupported);
mySuspendThread.setVisible(suspendThreadSupported);
- myMakeDefaultButton.setVisible(suspendThreadSupported);
+ myMakeDefaultPanel.setVisible(suspendThreadSupported);
}
@Override