Navigatable (@NotNull DefaultMutableTreeNode node) { if (!(node instanceof MessageNode messageNode)) { return null; } AntBuildMessageView.MessageType type = messageNode.getType(); if (type != AntBuildMessageView.MessageType.MESSAGE && type != AntBuildMessageView.MessageType.ERROR) { return null; } if (!isValid(messageNode.getFile())) { return null; } return PsiNavigationSupport.getInstance() .createNavigatable(myProject, messageNode.getFile(), messageNode.getOffset()); }