use of com.intellij.xdebugger.impl.ui.XDebuggerExpressionComboBox in project intellij-community by JetBrains.
the class XBreakpointActionsPanel method init.
public void init(Project project, XBreakpointManager breakpointManager, @NotNull XBreakpointBase breakpoint, @Nullable XDebuggerEditorsProvider debuggerEditorsProvider) {
init(project, breakpointManager, breakpoint);
if (debuggerEditorsProvider != null) {
ActionListener listener = new ActionListener() {
public void actionPerformed(final ActionEvent e) {
onCheckboxChanged();
}
};
myLogExpressionComboBox = new XDebuggerExpressionComboBox(project, debuggerEditorsProvider, LOG_EXPRESSION_HISTORY_ID, myBreakpoint.getSourcePosition(), true);
JComponent logExpressionComponent = myLogExpressionComboBox.getComponent();
myLogExpressionPanel.add(logExpressionComponent, BorderLayout.CENTER);
myLogExpressionComboBox.setEnabled(false);
boolean isLineBreakpoint = breakpoint instanceof XLineBreakpoint;
myTemporaryCheckBox.setVisible(isLineBreakpoint);
if (isLineBreakpoint) {
myTemporaryCheckBox.addActionListener(e -> ((XLineBreakpoint) myBreakpoint).setTemporary(myTemporaryCheckBox.isSelected()));
}
myLogExpressionCheckBox.addActionListener(listener);
DebuggerUIUtil.focusEditorOnCheck(myLogExpressionCheckBox, myLogExpressionComboBox.getEditorComponent());
} else {
myExpressionPanel.getParent().remove(myExpressionPanel);
}
}
Aggregations