Class BslTextSearchSupplier

    • Field Detail

      • resourceSetProvider

        protected org.eclipse.xtext.ui.refactoring.impl.RefactoringResourceSetProvider resourceSetProvider
        ResourceSet for loading Bsl modules
    • 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
      • filterMatcherForSemanticObject

        protected void filterMatcherForSemanticObject​(org.eclipse.emf.ecore.EObject context,
                                                      TextSearchFileMatch result,
                                                      org.eclipse.emf.ecore.EObject semanticObject,
                                                      boolean isMethod,
                                                      String oldName,
                                                      org.eclipse.xtext.scoping.IScope propertyScope,
                                                      org.eclipse.emf.common.util.URI topObjectUri,
                                                      Collection<Match> correctSearchResult)
        Filters all matches:
        Parameters:
        context - context object of refactoring or references finding, cannot be null
        result - matches from full text search, cannot be null
        semanticObject - computing semantic object corresponding to the found match, cannot be null
        isMethod - true if renaming element is Method, false otherwise
        oldName - old name of renaming object, cannot be null
        propertyScope - IScope of actual Propertys for filtering matches corresponding to the DynamicFeatureAccess in Bsl module, cannot be null
        topObjectUri - URI to the actual Module, cannot be null
        correctSearchResult - collector for correct results, cannot be null
      • filterMatchesForFormalParam

        protected void filterMatchesForFormalParam​(TextSearchFileMatch match,
                                                   org.eclipse.emf.ecore.EObject context,
                                                   boolean isComment,
                                                   org.eclipse.emf.common.util.URI semanticObjectUri,
                                                   org.eclipse.emf.common.util.URI moduleUri,
                                                   Module module,
                                                   Collection<Match> correctSearchResult)
        Filters all matches:
        • if matches not corresponding to the comment in Module
        • if matches not corresponding to the comment for Method for renaming FormalParam
        Parameters:
        match - matches from full text search, cannot be null
        context - actual renaming object, cannot be null
        isComment - true if matches was found in comment, false otherwise
        semanticObjectUri - URI to the actual semantic object corresponding to the processing match, cannot be null
        moduleUri - actual URI of the module for renaming element, cannot be null
        module - Module corresponding to the found match, cannot be null
        correctSearchResult - collector for correct results, cannot be null
      • filterMatcherForCommentAndStringLiteral

        protected void filterMatcherForCommentAndStringLiteral​(TextSearchFileMatch match,
                                                               org.eclipse.emf.common.util.URI semanticObjectUri,
                                                               org.eclipse.emf.common.util.URI topObjectUri,
                                                               Collection<Match> correctSearchResult)
        Filters all matches:
        • if found match is part of another word
        Parameters:
        result - matches from full text search, cannot be null
        semanticObjectUri - URI to the actual semantic object corresponding to the processing match, cannot be null
        topObjectUri - URI to the actual Module, cannot be null
        correctSearchResult - collector for correct results, cannot be null
      • filterMatchesFromDcs

        protected void filterMatchesFromDcs​(Method context,
                                            Collection<TextSearchModelMatch> matches,
                                            Collection<Match> correctSearchResult)
        Filters all matches for DCS file:
        • if name of the CommonModule is not equals for name if the common module of renaming Method
        Parameters:
        context - actual renaming object, cannot be null
        matches - found matches from full text search, cannot be null
        correctSearchResult - collector for correct results, cannot be null