MessageEvent (@NotNull Message message) { MessageEvent.Kind kind = MessageEvent.Kind.valueOf(message.getKind().name()); Message.FilePosition messageFilePosition = message.getFilePosition(); FilePosition filePosition = messageFilePosition == null ? null : new FilePosition( new File(messageFilePosition.getFilePath()), messageFilePosition.getLine(), messageFilePosition.getColumn() ); return new MessageEventImpl( myTaskId, kind, message.getGroup(), message.getTitle(), message.getText() ) { @Override public @Nullable Navigatable getNavigatable(@NotNull Project project) { if (filePosition == null) return null; return new FileNavigatable(project, filePosition); } }; }