Class BslTextSearchRefactoringSupplier
java.lang.Object
com._1c.g5.v8.dt.bsl.bm.ui.refactoring.BslTextSearchSupplier
com._1c.g5.v8.dt.bsl.bm.ui.refactoring.BslTextSearchRefactoringSupplier
- All Implemented Interfaces:
ITextSearchSupplier,ITextSearchRefactoringSupplier
public class BslTextSearchRefactoringSupplier
extends BslTextSearchSupplier
implements ITextSearchRefactoringSupplier
ITextSearchRefactoringSupplier for Bsl language.
Provides logic for full text search refactoring in Bsl module and DCS files-
Field Summary
Fields inherited from class com._1c.g5.v8.dt.bsl.bm.ui.refactoring.BslTextSearchSupplier
BSL_EXT, resourceSetProvider -
Constructor Summary
ConstructorsConstructorDescriptionBslTextSearchRefactoringSupplier(IProjectFileSystemSupportProvider fileSystemSupportProvider, org.eclipse.handly.ui.IInputElementProvider inputElementProvider, BslGrammarAccess bslGrammar, org.eclipse.xtext.ui.refactoring.impl.RefactoringResourceSetProvider resourceSetProvider, DynamicFeatureAccessComputer dynamicFeatureAccessComputer, IModelEditingSupport modelEditingSupport, IV8ProjectManager projectManager, org.eclipse.xtext.scoping.IGlobalScopeProvider scopeProvider) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcreateChangeName(org.eclipse.core.resources.IFile file) CreatesChangename byIFileCollection<org.eclipse.ltk.core.refactoring.Change>createChanges(IBmObject bmObject, org.eclipse.ltk.core.refactoring.Change normalRefactoringChange, Collection<TextSearchModelMatch> 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<TextSearchFileMatch> matches, String oldName, String newName) getMatches(org.eclipse.ltk.core.refactoring.Change change, SimpleSearchResultCollector collector) Gets all foundMatchin full text search except matches intersect withchangeMethods inherited from class com._1c.g5.v8.dt.bsl.bm.ui.refactoring.BslTextSearchSupplier
filterMatcherForCommentAndStringLiteral, filterMatcherForSemanticObject, filterMatchesForFormalParam, filterMatchesFromDcs, filterSearchResult, getSearchStringsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com._1c.g5.v8.dt.search.core.refactoring.ITextSearchRefactoringSupplier
getGroupingObjectMethods inherited from interface com._1c.g5.v8.dt.search.core.ITextSearchSupplier
filterSearchResult, getSearchStrings
-
Constructor Details
-
BslTextSearchRefactoringSupplier
@Inject public BslTextSearchRefactoringSupplier(IProjectFileSystemSupportProvider fileSystemSupportProvider, org.eclipse.handly.ui.IInputElementProvider inputElementProvider, BslGrammarAccess bslGrammar, org.eclipse.xtext.ui.refactoring.impl.RefactoringResourceSetProvider resourceSetProvider, DynamicFeatureAccessComputer dynamicFeatureAccessComputer, IModelEditingSupport modelEditingSupport, IV8ProjectManager projectManager, org.eclipse.xtext.scoping.IGlobalScopeProvider scopeProvider) Constructor- Parameters:
fileSystemSupportProvider- actualIProjectFileSystemSupportProvider, cannot benullinputElementProvider- specialIInputElementProvider, cannot benullbslGrammar- actualBslGrammarAccess, cannot benullresourceSetProvider- specialIResourceSetProviderfor getting actial content of the bsl module, cannot benulldynamicFeatureAccessComputer- actualDynamicFeatureAccessComputer, cannot benullmodelEditingSupport- actualIModelEditingSupport, cannot benullprojectManager- actualIV8ProjectManager, cannot benullscopeProvider- actualIGlobalScopeProviderfor getting actualPropertyscope for filtering matches corresponding to theDynamicFeatureAccessin Bsl module, cannot benull
-
-
Method Details
-
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:
createChangesin interfaceITextSearchRefactoringSupplier- Parameters:
file- concreteIFilein project containing search results, cannot benullnormalRefactoringChange- 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 benullmatches- collection ofMatchcorresponding to the file, cannot benulloldName- original name, cannot benullnewName- new name of the renaming element, cannot benull- Returns:
- created
Changes for concreteIFilein project and collection ofMatchcorresponding to the file
-
getMatches
public Collection<Match> getMatches(org.eclipse.ltk.core.refactoring.Change change, SimpleSearchResultCollector collector) Description copied from interface:ITextSearchRefactoringSupplierGets all foundMatchin full text search except matches intersect withchange- Specified by:
getMatchesin interfaceITextSearchRefactoringSupplier- Parameters:
change- refactoring change for filtering matches which intersect with them, cannot benullcollector-SimpleSearchResultCollectortext search collector, cannot benull- Returns:
- all found
Matchin full text search except matches intersect withchange, nevernull
-
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:ITextSearchRefactoringSupplierCreatesChanges for concreteIBmObjectif there is no IFile for it and collection ofMatchcorresponding to the this object- Specified by:
createChangesin interfaceITextSearchRefactoringSupplier- Parameters:
bmObject- concreteIBmObjectcontaining search results, cannot benullnormalRefactoringChange- 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 benullmatches- collection ofMatchcorresponding to the file, cannot benulloldName- original name, cannot benullnewName- new name of the renaming element, cannot benull- Returns:
- created
Changes for concreteIBmObjectin project and collection ofMatchcorresponding to the object
-
createChangeName
CreatesChangename byIFile- Parameters:
file- file with found changes, cannot benull- Returns:
Changename byIFile, nevernull
-