Class AbstractTextSearchRefactoringSupplierForQlSemanticLanguage

    • Constructor Detail

      • AbstractTextSearchRefactoringSupplierForQlSemanticLanguage

        public AbstractTextSearchRefactoringSupplierForQlSemanticLanguage()
    • Method Detail

      • getSearchStrings

        public Collection<String> getSearchStrings​(org.eclipse.emf.ecore.EObject context,
                                                   String oldName)
        Description copied from interface: ITextSearchSupplier
        Generates strings for full text search by renaming element and its original name
        Specified by:
        getSearchStrings in interface ITextSearchSupplier
        Parameters:
        context - renaming element, cannot be null
        oldName - original name, cannot be null
        Returns:
        strings for full text search by renaming element and its original name, never null
      • createChanges

        public Collection<org.eclipse.ltk.core.refactoring.Change> createChanges​(org.eclipse.core.resources.IFile file,
                                                                                 org.eclipse.ltk.core.refactoring.Change normalRefactoringChange,
                                                                                 Collection<TextSearchFileMatch> matches,
                                                                                 String oldName,
                                                                                 String newName)
        Description copied from interface: ITextSearchRefactoringSupplier
        Creates Changes for concrete IFile in project and collection of Match corresponding to the file
        Specified by:
        createChanges in interface ITextSearchRefactoringSupplier
        Parameters:
        file - concrete IFile in project containing search results, cannot be null
        normalRefactoringChange - refactoring change, if we found correct full text search match in file with normal refactoring changes, we should add full text search changes to exiting change, cannot be null
        matches - collection of Match corresponding to the file, cannot be null
        oldName - original name, cannot be null
        newName - new name of the renaming element, cannot be null
        Returns:
        created Changes for concrete IFile in project and collection of Match corresponding to the file
      • filterSearchResultForTopObject

        protected Collection<TextSearchModelMatch> filterSearchResultForTopObject​(MdObject context,
                                                                                  Map<IBmObject,​Collection<TextSearchModelMatch>> groupsByObject,
                                                                                  String oldName)
        Filters results not match for renamed top object
        Parameters:
        context - actual renamed top object, cannot be null
        groupsByObject - full text search results grouping by the model objects, cannot be null
        oldName - old name of the renamed object, cannot be null
        Returns:
        right results for refactoring from full text search, never null
      • filterSearchResultForNonTopObject

        protected Collection<TextSearchModelMatch> filterSearchResultForNonTopObject​(IBmObject context,
                                                                                     Map<IBmObject,​Collection<TextSearchModelMatch>> groupsByObject)
        Filters results not match for renamed non top object
        Parameters:
        context - actual renamed non top object, cannot be null
        groupsByObject - full text search results grouping by the model objects, cannot be null
        oldName - old name of the renamed object, cannot be null
        Returns:
        right results for refactoring from full text search, never null
      • getQueryContent

        protected abstract String getQueryContent​(IBmObject object)
        Gets Ql(QlDcs) query for filtering full text search results
        Parameters:
        object - content object for getting query, cannot be null
        Returns:
        Ql(QlDcs) query for filtering full text search results, never null
      • isSingleWord

        protected boolean isSingleWord​(Match match)
        Checks that result whole word
        Parameters:
        result - checking full text search result, cannot be null
        Returns:
        true if result corresponding to the whole word, false otherwise