Class NodeOccurencesFinder

  • public class NodeOccurencesFinder
    extends Object
    Special occurrences finder for tree of INode
    Use it in extract refactoring
    • Constructor Detail

      • NodeOccurencesFinder

        public NodeOccurencesFinder​(org.eclipse.emf.ecore.EObject context,
                                    List<org.eclipse.xtext.nodemodel.INode> nodes,
                                    List<org.eclipse.xtext.util.Pair<Integer,​Integer>> regionsForSearching)
        context - current context element for searching occurences, can't be null
        nodes - all of tree nodes, can't be null or empty
        regionsForSearching - regions for searching occurrences, can't be null
    • Method Detail

      • findAllOccurences

        public org.eclipse.xtext.util.TextRegion[] findAllOccurences()
        Finds all occurrences by tree nodes
        array of TextRegion corresponding to initial tree nodes or empty array if occurrences weren't found, can't be null