Search in sources :

Example 1 with XDebuggerExpressionComboBox

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);
    }
}
Also used : ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) XDebuggerExpressionComboBox(com.intellij.xdebugger.impl.ui.XDebuggerExpressionComboBox) XLineBreakpoint(com.intellij.xdebugger.breakpoints.XLineBreakpoint)

Aggregations

XLineBreakpoint (com.intellij.xdebugger.breakpoints.XLineBreakpoint)1 XDebuggerExpressionComboBox (com.intellij.xdebugger.impl.ui.XDebuggerExpressionComboBox)1 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1