use of com.intellij.xdebugger.breakpoints.ui.XBreakpointCustomPropertiesPanel in project intellij-community by JetBrains.
the class XLightBreakpointPropertiesPanel method loadProperties.
public void loadProperties() {
mySubPanels.forEach(XBreakpointPropertiesSubPanel::loadProperties);
if (myConditionComboBox != null) {
XExpression condition = myBreakpoint.getConditionExpressionInt();
myConditionComboBox.setExpression(condition);
boolean hideCheckbox = !myShowAllOptions && condition == null;
myConditionEnabledCheckbox.setSelected(hideCheckbox || (myBreakpoint.isConditionEnabled() && condition != null));
myConditionEnabledPanel.removeAll();
if (hideCheckbox) {
JBLabel label = new JBLabel(XDebuggerBundle.message("xbreakpoints.condition.checkbox"));
label.setBorder(JBUI.Borders.empty(0, 4));
label.setLabelFor(myConditionComboBox.getComboBox());
myConditionEnabledPanel.add(label);
} else {
myConditionEnabledPanel.add(myConditionEnabledCheckbox);
}
onCheckboxChanged();
}
for (XBreakpointCustomPropertiesPanel customPanel : myCustomPanels) {
customPanel.loadFrom(myBreakpoint);
}
myEnabledCheckbox.setSelected(myBreakpoint.isEnabled());
myBreakpointNameLabel.setText(XBreakpointUtil.getShortText(myBreakpoint));
}
use of com.intellij.xdebugger.breakpoints.ui.XBreakpointCustomPropertiesPanel in project intellij-community by JetBrains.
the class XLightBreakpointPropertiesPanel method saveProperties.
public void saveProperties() {
mySubPanels.forEach(XBreakpointPropertiesSubPanel::saveProperties);
if (myConditionComboBox != null) {
XExpression expression = myConditionComboBox.getExpression();
XExpression condition = !XDebuggerUtilImpl.isEmptyExpression(expression) ? expression : null;
myBreakpoint.setConditionEnabled(condition == null || myConditionEnabledCheckbox.isSelected());
myBreakpoint.setConditionExpression(condition);
myConditionComboBox.saveTextInHistory();
}
for (XBreakpointCustomPropertiesPanel customPanel : myCustomPanels) {
customPanel.saveTo(myBreakpoint);
}
myBreakpoint.setEnabled(myEnabledCheckbox.isSelected());
}
Aggregations