boolean (DefaultMutableTreeNode child, boolean isShowDialog, int rowsCount) { Object namedElement = child.getUserObject(); if (!(namedElement instanceof DNamedElement)) return false; if (isShowDialog) { int result; if (rowsCount > 1) { result = Messages.showOkCancelDialog(myBigPanel, GroovyBundle.message("are.you.sure.to.delete.elements", String.valueOf(rowsCount)), GroovyBundle.message("dynamic.element.deletion"), Messages.getQuestionIcon()); } else { result = Messages.showOkCancelDialog(myBigPanel, GroovyBundle.message("are.you.sure.to.delete.dynamic.property", ((DNamedElement)namedElement).getName()), GroovyBundle.message("dynamic.property.deletion"), Messages.getQuestionIcon()); } if (result != Messages.OK) return false; } removeNamedElement(((DNamedElement)namedElement)); return true; }