boolean () { String className = getClassName(); if (className.isEmpty()) { Messages.showMessageDialog( project, JavaDebuggerBundle.message("error.field.breakpoint.class.name.not.specified"), JavaDebuggerBundle.message("add.field.breakpoint.dialog.title"), Messages.getErrorIcon() ); return false; } String fieldName = getFieldName(); if (fieldName.isEmpty()) { Messages.showMessageDialog( project, JavaDebuggerBundle.message("error.field.breakpoint.field.name.not.specified"), JavaDebuggerBundle.message("add.field.breakpoint.dialog.title"), Messages.getErrorIcon() ); return false; } PsiClass psiClass = JavaPsiFacade.getInstance(project).findClass(className, GlobalSearchScope.allScope(project)); if (psiClass == null) { Messages.showMessageDialog( project, JavaDebuggerBundle.message("error.field.breakpoint.class.sources.not.found", className, fieldName, className), CommonBundle.getErrorTitle(), Messages.getErrorIcon() ); return false; } PsiFile psiFile = psiClass.getContainingFile(); Document document = psiFile.getViewProvider().getDocument(); if (document == null) { return false; } PsiField field = psiClass.findFieldByName(fieldName, false); if (field == null) { Messages.showMessageDialog( project, JavaDebuggerBundle.message("error.field.breakpoint.field.not.found", className, fieldName, fieldName), CommonBundle.getErrorTitle(), Messages.getErrorIcon() ); return false; } XLineBreakpoint<JavaFieldBreakpointProperties> fieldBreakpoint = XDebuggerManager.getInstance(project).getBreakpointManager().addLineBreakpoint( JavaFieldBreakpointType.this, psiFile.getVirtualFile().getUrl(), document.getLineNumber(field.getTextOffset()), new JavaFieldBreakpointProperties(fieldName, className) ); result.set(fieldBreakpoint); return true; }