Package com._1c.g5.v8.dt.ql.refactoring
Class AbstractTextSearchRefactoringSupplierForQlSemanticLanguage
- java.lang.Object
-
- com._1c.g5.v8.dt.ql.refactoring.AbstractTextSearchRefactoringSupplierForQlSemanticLanguage
-
- All Implemented Interfaces:
ITextSearchSupplier
,ITextSearchRefactoringSupplier
- Direct Known Subclasses:
DcsQueryTextSearchRefactoringSupplier
,RightQlTextSearchRefactoringSupplier
,RightTemplateTextSearchRefactoringSupplier
public abstract class AbstractTextSearchRefactoringSupplierForQlSemanticLanguage extends Object implements ITextSearchRefactoringSupplier
Abstract implementation ofITextSearchRefactoringSupplier
contains special method for filtering full text search results for refactoring in Ql language family
-
-
Constructor Summary
Constructors Constructor Description AbstractTextSearchRefactoringSupplierForQlSemanticLanguage()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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)
protected Collection<TextSearchModelMatch>
filterSearchResultForNonTopObject(IBmObject context, Map<IBmObject,Collection<TextSearchModelMatch>> groupsByObject)
Filters results not match for renamed non top objectprotected Collection<TextSearchModelMatch>
filterSearchResultForTopObject(MdObject context, Map<IBmObject,Collection<TextSearchModelMatch>> groupsByObject, String oldName)
Filters results not match for renamed top objectCollection<Match>
getMatches(org.eclipse.ltk.core.refactoring.Change change, SimpleSearchResultCollector collector)
Gets all foundMatch
in full text search except matches intersect withchange
protected abstract String
getQueryContent(IBmObject object)
Gets Ql(QlDcs) query for filtering full text search resultsCollection<String>
getSearchStrings(org.eclipse.emf.ecore.EObject context, String oldName)
Generates strings for full text search by renaming element and its original nameprotected boolean
isSingleWord(Match match)
Checks thatresult
whole word-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.search.core.refactoring.ITextSearchRefactoringSupplier
createChanges, getGroupingObject
-
Methods inherited from interface com._1c.g5.v8.dt.search.core.ITextSearchSupplier
filterSearchResult
-
-
-
-
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 interfaceITextSearchSupplier
- Parameters:
context
- renaming element, cannot benull
oldName
- original name, cannot benull
- 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
- Specified by:
createChanges
in interfaceITextSearchRefactoringSupplier
- Parameters:
file
- concreteIFile
in project containing search results, cannot benull
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 benull
matches
- collection ofMatch
corresponding to the file, cannot benull
oldName
- original name, cannot benull
newName
- new name of the renaming element, cannot benull
- Returns:
- created
Change
s for concreteIFile
in project and collection ofMatch
corresponding to the file
-
getMatches
public Collection<Match> getMatches(org.eclipse.ltk.core.refactoring.Change change, SimpleSearchResultCollector collector)
Description copied from interface:ITextSearchRefactoringSupplier
Gets all foundMatch
in full text search except matches intersect withchange
- Specified by:
getMatches
in interfaceITextSearchRefactoringSupplier
- Parameters:
change
- refactoring change for filtering matches which intersect with them, cannot benull
collector
-SimpleSearchResultCollector
text search collector, cannot benull
- Returns:
- all found
Match
in full text search except matches intersect withchange
, nevernull
-
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 benull
groupsByObject
- full text search results grouping by the model objects, cannot benull
oldName
- old name of the renamed object, cannot benull
- 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 benull
groupsByObject
- full text search results grouping by the model objects, cannot benull
oldName
- old name of the renamed object, cannot benull
- 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 benull
- Returns:
- Ql(QlDcs) query for filtering full text search results, never
null
-
isSingleWord
protected boolean isSingleWord(Match match)
Checks thatresult
whole word- Parameters:
result
- checking full text search result, cannot benull
- Returns:
true
if result corresponding to the whole word,false
otherwise
-
-