OptPane (@NotNull PsiMethod method) { return pane( string("contract", JavaBundle.message("label.contract"), StringValidator.of("java.method.contract", string -> getContractErrorMessage(string, method))) .description(HtmlChunk.raw(JavaBundle.message("edit.contract.dialog.hint"))), checkbox("impure", JavaBundle.message("edit.contract.dialog.checkbox.impure.method"), string("mutates", JavaBundle.message("label.mutates"), StringValidator.of("java.method.mutates", string -> getMutatesErrorMessage(string, method))) .description(HtmlChunk.raw(JavaBundle.message("edit.contract.dialog.mutates.hint"))) )); }