Class BasicHtmlFullTextSearchRefactoringSupplier
- java.lang.Object
-
- com._1c.g5.v8.dt.html.refactoring.BasicHtmlFullTextSearchRefactoringSupplier
-
- All Implemented Interfaces:
IFullTextSearchSupplier
,FullTextSearchRefactoringParticipant.IFullTextSearchRefactoringSupplier
- Direct Known Subclasses:
HtmlDocumentMdReferenceFullTextSearchRefactoringSupplier
public class BasicHtmlFullTextSearchRefactoringSupplier extends Object implements FullTextSearchRefactoringParticipant.IFullTextSearchRefactoringSupplier
BasicFullTextSearchRefactoringParticipant.IFullTextSearchRefactoringSupplier
for HTML filesClients may extend this class, when defining their own search result filter (
filterExtension(IDtMatchProvider)
).
-
-
Constructor Summary
Constructors Constructor Description BasicHtmlFullTextSearchRefactoringSupplier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<org.eclipse.ltk.core.refactoring.Change>
createChanges(IBmObject bmObject, org.eclipse.ltk.core.refactoring.Change normalRefactoringChange, Collection<IDtMatchProvider> matches, String oldName, String newName)
Collection<org.eclipse.ltk.core.refactoring.Change>
createChanges(org.eclipse.core.resources.IFile file, org.eclipse.ltk.core.refactoring.Change normalRefactoringChange, Collection<IDtMatchProvider> matches, String oldName, String newName)
protected boolean
filterExtension(IDtMatchProvider matchProvider)
Extend filter for everyIDtMatchProvider
from search result collectionCollection<IDtMatchProvider>
filterSearchResult(org.eclipse.emf.ecore.EObject context, String oldName, Collection<IDtMatchProvider> results)
Filters search resultsCollection<IDtMatchProvider>
getMatches(org.eclipse.ltk.core.refactoring.Change change, RefactoringFullTextSearchResultCollector collector)
Gets all foundDtMatch
in full text search except matches intersect withchange
Collection<String>
getSearchStrings(org.eclipse.emf.ecore.EObject context, String oldName)
Generates strings for full text search by renaming element and its original nameSearchType
getSearchType()
The target search type for the FTS searchboolean
isObjectTextAttribute(IBmObject bmObject)
Checks that refactoring for this object does not link withIFile
corresponding to thebmObject
-
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.FullTextSearchRefactoringParticipant.IFullTextSearchRefactoringSupplier
getGroupingBmObject
-
-
-
-
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 interfaceIFullTextSearchSupplier
- 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
-
filterSearchResult
public Collection<IDtMatchProvider> filterSearchResult(org.eclipse.emf.ecore.EObject context, String oldName, Collection<IDtMatchProvider> results)
Description copied from interface:IFullTextSearchSupplier
Filters search results- Specified by:
filterSearchResult
in interfaceIFullTextSearchSupplier
- Parameters:
context
- renaming element, cannot benull
oldName
- original name, cannot benull
results
- full text search results for filtering, cannot benull
- Returns:
- filtered search result, never
null
-
isObjectTextAttribute
public boolean isObjectTextAttribute(IBmObject bmObject)
Description copied from interface:IFullTextSearchSupplier
Checks that refactoring for this object does not link withIFile
corresponding to thebmObject
- Specified by:
isObjectTextAttribute
in interfaceIFullTextSearchSupplier
- Parameters:
bmObject
- object which has attribute changing in refactoring, cannot benull
- Returns:
true
if refactoring for this object does not link withIFile
corresponding to thebmObject
,false
otherwise
-
createChanges
public Collection<org.eclipse.ltk.core.refactoring.Change> createChanges(org.eclipse.core.resources.IFile file, org.eclipse.ltk.core.refactoring.Change normalRefactoringChange, Collection<IDtMatchProvider> matches, String oldName, String newName)
Description copied from interface:FullTextSearchRefactoringParticipant.IFullTextSearchRefactoringSupplier
- Specified by:
createChanges
in interfaceFullTextSearchRefactoringParticipant.IFullTextSearchRefactoringSupplier
- 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 ofDtMatch
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 ofDtMatch
corresponding to the file
-
createChanges
public Collection<org.eclipse.ltk.core.refactoring.Change> createChanges(IBmObject bmObject, org.eclipse.ltk.core.refactoring.Change normalRefactoringChange, Collection<IDtMatchProvider> matches, String oldName, String newName)
Description copied from interface:FullTextSearchRefactoringParticipant.IFullTextSearchRefactoringSupplier
CreatesChange
s for concreteIBmObject
if there is no IFile for it and collection ofDtMatch
corresponding to the this object- Specified by:
createChanges
in interfaceFullTextSearchRefactoringParticipant.IFullTextSearchRefactoringSupplier
- Parameters:
bmObject
- concreteIBmObject
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 ofDtMatch
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 concreteIBmObject
in project and collection ofDtMatch
corresponding to the object
-
getMatches
public Collection<IDtMatchProvider> getMatches(org.eclipse.ltk.core.refactoring.Change change, RefactoringFullTextSearchResultCollector collector)
Description copied from interface:FullTextSearchRefactoringParticipant.IFullTextSearchRefactoringSupplier
Gets all foundDtMatch
in full text search except matches intersect withchange
- Specified by:
getMatches
in interfaceFullTextSearchRefactoringParticipant.IFullTextSearchRefactoringSupplier
- Parameters:
change
- refactoring change for filtering matches which intersect with them, cannot benull
collector
-RefactoringFullTextSearchResultCollector
full text search collector, cannot benull
- Returns:
- all found
DtMatch
in full text search except matches intersect withchange
, nevernull
-
getSearchType
public SearchType getSearchType()
Description copied from interface:FullTextSearchRefactoringParticipant.IFullTextSearchRefactoringSupplier
The target search type for the FTS search- Specified by:
getSearchType
in interfaceFullTextSearchRefactoringParticipant.IFullTextSearchRefactoringSupplier
- Returns:
- The index type. May not be
null
a
-
filterExtension
protected boolean filterExtension(IDtMatchProvider matchProvider)
Extend filter for everyIDtMatchProvider
from search result collectionDescendant classes may override this method to provide their own search result filter extension
- Parameters:
matchProvider
- the search result for filtering, cannot benull
- Returns:
true
if specified result passes filter conditions,false
in otherwise
-
-