Class BslFullTextSearchSupplier

    • 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: IFullTextSearchSupplier
        Generates strings for full text search by renaming element and its original name
        Specified by:
        getSearchStrings in interface IFullTextSearchSupplier
        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
      • isObjectTextAttribute

        public boolean isObjectTextAttribute​(IBmObject bmObject)
        Description copied from interface: IFullTextSearchSupplier
        Checks that refactoring for this object does not link with IFile corresponding to the bmObject
        Specified by:
        isObjectTextAttribute in interface IFullTextSearchSupplier
        Parameters:
        bmObject - object which has attribute changing in refactoring, cannot be null
        Returns:
        true if refactoring for this object does not link with IFile corresponding to the bmObject, false otherwise
      • getModule

        protected Module getModule​(DtMatch match,
                                   org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
        Gets Bsl module by full text search result
        Parameters:
        match - full text search result, can't be null
        resourceSet - ResourceSet for getting Bsl resource, can't be null
        Returns:
        Bsl module corresponding to full text search result, can be null if there is no Bsl modules for this result
      • getIFile

        protected org.eclipse.core.resources.IFile getIFile​(DtMatch match)
        Gets IFile by full text search result
        Parameters:
        match - full text search result, can't be null
        Returns:
        IFile by full text search result, can be null if there is no corresponding IFile
      • filterMatcherForSemanticObject

        protected void filterMatcherForSemanticObject​(org.eclipse.emf.ecore.EObject context,
                                                      DtMatch 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<IDtMatchProvider> correctSearchResult)
        Filters all matches:
        Parameters:
        context - context object of refactoring or references finding, can't be null
        result - matches from full text search, can't be null
        semanticObject - computing semantic object corresponding to the found match, can't be null
        isMethod - true if renaming element is Method, false otherwise
        oldName - old name of renaming object, can't 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, can't be null
      • filterMatchesForFormalParam

        protected void filterMatchesForFormalParam​(DtMatch result,
                                                   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<IDtMatchProvider> 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:
        result - matches from full text search, can't be null
        context - actual renaming object, can't 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, can't be null
        module - Module corresponding to the found match, can't be null
        correctSearchResult - collector for correct results, can't be null
      • filterMatcherForCommentAndStringLiteral

        protected void filterMatcherForCommentAndStringLiteral​(DtMatch result,
                                                               org.eclipse.emf.common.util.URI semanticObjectUri,
                                                               org.eclipse.emf.common.util.URI topObjectUri,
                                                               Collection<IDtMatchProvider> correctSearchResult)
        Filters all matches:
        • if found match is part of another word
        Parameters:
        result - matches from full text search, can't 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, can't be null
      • filterMatchesFromDcs

        protected void filterMatchesFromDcs​(Method context,
                                            Collection<IDtMatchProvider> matches,
                                            Collection<IDtMatchProvider> 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, can't be null
        matches - found matches from full text search, can't be null
        correctSearchResult - collector for correct results, can't be null