boolean (final Project project, final XBreakpoint<?> breakpoint) { if ((!isEmptyExpression(breakpoint.getConditionExpression()) || !isEmptyExpression(breakpoint.getLogExpressionObject())) && !ApplicationManager.getApplication().isHeadlessEnvironment() && !ApplicationManager.getApplication().isUnitTestMode() && XDebuggerSettingManagerImpl.getInstanceImpl().getGeneralSettings().isConfirmBreakpointRemoval()) { StringBuilder message = new StringBuilder("<html>").append(XDebuggerBundle.message("message.confirm.breakpoint.removal.message")); if (!isEmptyExpression(breakpoint.getConditionExpression())) { message.append("<br>") .append(XDebuggerBundle.message("message.confirm.breakpoint.removal.message.condition")) .append("<br><pre>") .append(StringUtil.escapeXmlEntities(breakpoint.getConditionExpression().getExpression())) .append("</pre>"); } if (!isEmptyExpression(breakpoint.getLogExpressionObject())) { message.append("<br>") .append(XDebuggerBundle.message("message.confirm.breakpoint.removal.message.log")) .append("<br><pre>") .append(StringUtil.escapeXmlEntities(breakpoint.getLogExpressionObject().getExpression())) .append("</pre>"); } //noinspection HardCodedStringLiteral if (Messages.showOkCancelDialog(message.toString(), XDebuggerBundle.message("message.confirm.breakpoint.removal.title"), CommonBundle.message("button.remove"), Messages.getCancelButton(), Messages.getQuestionIcon(), new DialogWrapper.DoNotAskOption.Adapter() { @Override public void rememberChoice(boolean isSelected, int exitCode) { if (isSelected) { XDebuggerSettingManagerImpl.getInstanceImpl().getGeneralSettings() .setConfirmBreakpointRemoval(false); } } }) != Messages.OK) { return false; } } ((XBreakpointManagerImpl)XDebuggerManager.getInstance(project).getBreakpointManager()) .rememberRemovedBreakpoint((XBreakpointBase)breakpoint); getInstance().removeBreakpoint(project, breakpoint); return true; }