boolean (@NotNull Project project, @NotNull ModDisplayMessage message) { Editor editor = FileEditorManager.getInstance(project).getSelectedTextEditor(); if (editor == null) return false; if (ApplicationManager.getApplication().isUnitTestMode()) { if (message.kind() == ModDisplayMessage.MessageKind.ERROR) { throw new ErrorInTestException(message.messageText()); } } switch (message.kind()) { case INFORMATION -> HintManager.getInstance().showInformationHint(editor, message.messageText()); case ERROR -> HintManager.getInstance().showErrorHint(editor, message.messageText()); } return true; }