Class BasicHtmlTextSearchRefactoringSupplier

    • Constructor Detail

      • BasicHtmlTextSearchRefactoringSupplier

        public BasicHtmlTextSearchRefactoringSupplier()
    • 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
      • filterSearchResult

        public Collection<Match> filterSearchResult​(org.eclipse.emf.ecore.EObject context,
                                                    String oldName,
                                                    Collection<Match> results)
        Description copied from interface: ITextSearchSupplier
        Filters search results
        Specified by:
        filterSearchResult in interface ITextSearchSupplier
        Parameters:
        context - renaming element, cannot be null
        oldName - original name, cannot be null
        results - full text search results for filtering, cannot be null
        Returns:
        filtered search result, 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
      • createChanges

        public Collection<org.eclipse.ltk.core.refactoring.Change> createChanges​(IBmObject bmObject,
                                                                                 org.eclipse.ltk.core.refactoring.Change normalRefactoringChange,
                                                                                 Collection<TextSearchModelMatch> matches,
                                                                                 String oldName,
                                                                                 String newName)
        Description copied from interface: ITextSearchRefactoringSupplier
        Creates Changes for concrete IBmObject if there is no IFile for it and collection of Match corresponding to the this object
        Specified by:
        createChanges in interface ITextSearchRefactoringSupplier
        Parameters:
        bmObject - concrete IBmObject 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 IBmObject in project and collection of Match corresponding to the object
      • filterExtension

        protected boolean filterExtension​(Match match)
        Extend filter for every Match from search result collection

        Descendant classes may override this method to provide their own search result filter extension

        Parameters:
        match - the search result for filtering, cannot be null
        Returns:
        true if specified result passes filter conditions, false in otherwise