Class TextSearchRefactoringParticipant
- java.lang.Object
-
- com._1c.g5.v8.dt.search.core.refactoring.TextSearchRefactoringParticipant
-
public class TextSearchRefactoringParticipant extends Object
Special refactoring participant. It contains logic for creating refactoring changes by results of full text search for renaming element. Usually, users should not override this class - all special logic for refactoring should be implement inITextSearchRefactoringSupplier
- See Also:
TextSearchRefactoringParticipantFactory
-
-
Constructor Summary
Constructors Constructor Description TextSearchRefactoringParticipant()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Collection<org.eclipse.ltk.core.refactoring.Change>
createChangeBySearchResult(Collection<Match> correctResults, org.eclipse.ltk.core.refactoring.Change normalRefactoringChange, String newName)
Create concreteChange
s for correct full text search resultsCollection<org.eclipse.ltk.core.refactoring.Change>
createRefactoringChange(org.eclipse.ltk.core.refactoring.Change normalRefactoringChange, String newName, TextSearchScopeSettings searchScopeSettings, org.eclipse.core.runtime.IProgressMonitor pm)
Creates refactoring change by results of full text search for renaming elementSet<org.eclipse.core.resources.IProject>
getProjects(org.eclipse.core.resources.IProject initialProject)
Gets all linked projects from workspace for creating projects scope for text search find operationvoid
initialize(String oldName, org.eclipse.emf.ecore.EObject context, ITextSearchRefactoringSupplier refactoringSupplier)
Constructor
-
-
-
Method Detail
-
initialize
public void initialize(String oldName, org.eclipse.emf.ecore.EObject context, ITextSearchRefactoringSupplier refactoringSupplier)
Constructor- Parameters:
oldName
- old name of the renaming element, cannot benull
context
- actual renaming object, cannot benull
refactoringSupplier
- specialITextSearchRefactoringSupplier
for renaming object, cannot benull
-
createRefactoringChange
public Collection<org.eclipse.ltk.core.refactoring.Change> createRefactoringChange(org.eclipse.ltk.core.refactoring.Change normalRefactoringChange, String newName, TextSearchScopeSettings searchScopeSettings, org.eclipse.core.runtime.IProgressMonitor pm)
Creates refactoring change by results of full text search for renaming element- Parameters:
normalRefactoringChange
-Change
s from usual refactoring, cannot benull
newName
- new name of the renaming element, cannot benull
searchScopeSettings
- the search scope settings instance, cannot benull
pm
- the progress monitor, cannot benull
- Returns:
- created refactoring changes by results of full text search for renaming element,
never
null
if there is no changes
-
createChangeBySearchResult
protected Collection<org.eclipse.ltk.core.refactoring.Change> createChangeBySearchResult(Collection<Match> correctResults, org.eclipse.ltk.core.refactoring.Change normalRefactoringChange, String newName)
Create concreteChange
s for correct full text search results- Parameters:
correctResults
- correct full text 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
newName
- new name of the renaming element, cannot benull
- Returns:
- concrete
Change
s for correct full text search results, nevernull
-
getProjects
public Set<org.eclipse.core.resources.IProject> getProjects(org.eclipse.core.resources.IProject initialProject)
Gets all linked projects from workspace for creating projects scope for text search find operation- Parameters:
initialProject
- initial project for full text search, can't benull
projectManager
- actualIV8ProjectManager
, can't benull
- Returns:
- set of projects for text search find operation, never
null
-
-