OccurenceInfo () { DefaultMutableTreeNode node = findNode(myTree, true); if (node == null) return null; TreePath treePath = new TreePath(node.getPath()); TreeUtil.selectPath(myTree, treePath); Navigatable editSourceDescriptor = createDescriptorForNode(node); if (editSourceDescriptor == null) return null; Counters counters = calculatePosition(node); return new OccurenceInfo(editSourceDescriptor, counters.myFoundOccurenceNumber, counters.myOccurencesCount); }