Class BslConfigurationObjectRenameContributor
- java.lang.Object
-
- com._1c.g5.v8.dt.bsl.bm.ui.refactoring.BslConfigurationObjectRenameContributor
-
- All Implemented Interfaces:
IRenameRefactoringContributor
- Direct Known Subclasses:
GraphicalSchemeConfigurationObjectRenameContributor
public class BslConfigurationObjectRenameContributor extends Object implements IRenameRefactoringContributor
Implementation ofIRenameRefactoringContributor
for rename refactoring configuration object in Bsl module.
This class creates preChanges for rename refactoring configuration object in Bsl module
-
-
Field Summary
Fields Modifier and Type Field Description protected BslConfigurationObjectRenameRefactoringController
renameRefactoringController
-
Constructor Summary
Constructors Constructor Description BslConfigurationObjectRenameContributor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<org.eclipse.ltk.core.refactoring.Change>
createNativePostChanges(org.eclipse.emf.ecore.EObject object, String newName, RefactoringSettings refactoringSettings, RefactoringStatus status)
Creates LTK changes that is executed after the EDT refactoring operations are performed.Collection<org.eclipse.ltk.core.refactoring.Change>
createNativePreChanges(org.eclipse.emf.ecore.EObject object, String newName, RefactoringSettings refactoringSettings, RefactoringStatus status)
Creates LTK changes that is executed before the EDT refactoring operations are performed.RefactoringOperationDescriptor
createParticipatingOperation(org.eclipse.emf.ecore.EObject object, RefactoringSettings refactoringSettings, RefactoringStatus status)
The method that is invoked during preparation phase of refactoring.
ReturnsRefactoringOperationDescriptor
that performs custom logic for object being renamed.RefactoringOperationDescriptor
createPreReferenceUpdateParticipatingOperation(IBmObject object, RefactoringSettings settings, RefactoringStatus status)
The method that is invoked during preparation phase of refactoring.
ReturnsRefactoringOperationDescriptor
that performs custom logic for object being renamed before the BmObject references processing.protected org.eclipse.xtext.ui.refactoring.ui.IRenameElementContext
getRenameElementContext(IBmTransaction transaction, IBmObject object)
Gets actualIRenameElementContext
for renaming objectprotected boolean
isSupport(org.eclipse.emf.ecore.EObject object)
Returnstrue
if theobject
is supported by the contributor.protected List<org.eclipse.ltk.core.refactoring.Change>
startRenameElement(org.eclipse.xtext.ui.refactoring.ui.IRenameElementContext renameElementContext, String newName)
Starts rename rtefactoring
-
-
-
Field Detail
-
renameRefactoringController
@Inject protected BslConfigurationObjectRenameRefactoringController renameRefactoringController
-
-
Method Detail
-
createParticipatingOperation
public RefactoringOperationDescriptor createParticipatingOperation(org.eclipse.emf.ecore.EObject object, RefactoringSettings refactoringSettings, RefactoringStatus status)
Description copied from interface:IRenameRefactoringContributor
The method that is invoked during preparation phase of refactoring.
ReturnsRefactoringOperationDescriptor
that performs custom logic for object being renamed.If some conditions are not satisfied the refactoring
status
should be filled with the appropriate error or warning message.- Specified by:
createParticipatingOperation
in interfaceIRenameRefactoringContributor
- Parameters:
object
- the object being renamed, cannot benull
.refactoringSettings
- the refactoring settings, cannot benull
.status
- the refactoring status, cannot benull
.- Returns:
- refactoring operation descriptor or
null
.
-
createPreReferenceUpdateParticipatingOperation
public RefactoringOperationDescriptor createPreReferenceUpdateParticipatingOperation(IBmObject object, RefactoringSettings settings, RefactoringStatus status)
Description copied from interface:IRenameRefactoringContributor
The method that is invoked during preparation phase of refactoring.
ReturnsRefactoringOperationDescriptor
that performs custom logic for object being renamed before the BmObject references processing.If some conditions are not satisfied the refactoring
status
should be filled with the appropriate error or warning message.- Specified by:
createPreReferenceUpdateParticipatingOperation
in interfaceIRenameRefactoringContributor
- Parameters:
object
- the object being renamed, cannot benull
.settings
- the refactoring settings, cannot benull
.status
- the refactoring status, cannot benull
.- Returns:
- refactoring operation descriptor or
null
.
-
createNativePreChanges
public Collection<org.eclipse.ltk.core.refactoring.Change> createNativePreChanges(org.eclipse.emf.ecore.EObject object, String newName, RefactoringSettings refactoringSettings, RefactoringStatus status)
Description copied from interface:IRenameRefactoringContributor
Creates LTK changes that is executed before the EDT refactoring operations are performed.
If some conditions are not satisfied the refactoring
status
should be filled with the appropriate error or warning message.- Specified by:
createNativePreChanges
in interfaceIRenameRefactoringContributor
- Parameters:
object
- the object being renamed, cannot benull
.newName
- the new name of the object, cannot benull
.refactoringSettings
- the refactoring settings, cannot benull
.status
- the refactoring status, cannot benull
.- Returns:
- a collection of LTK changes or
null
.
-
createNativePostChanges
public Collection<org.eclipse.ltk.core.refactoring.Change> createNativePostChanges(org.eclipse.emf.ecore.EObject object, String newName, RefactoringSettings refactoringSettings, RefactoringStatus status)
Description copied from interface:IRenameRefactoringContributor
Creates LTK changes that is executed after the EDT refactoring operations are performed.
If some conditions are not satisfied the refactoring
status
should be filled with the appropriate error or warning message.- Specified by:
createNativePostChanges
in interfaceIRenameRefactoringContributor
- Parameters:
object
- the object being renamed, cannot benull
.newName
- the new name of the object, cannot benull
.refactoringSettings
- the refactoring settings, cannot benull
.status
- the refactoring status, cannot benull
.- Returns:
- a collection of LTK changes or
null
.
-
getRenameElementContext
protected org.eclipse.xtext.ui.refactoring.ui.IRenameElementContext getRenameElementContext(IBmTransaction transaction, IBmObject object)
Gets actualIRenameElementContext
for renaming object- Parameters:
transaction
- actualIBmTransaction
, can't benull
object
- renamingIBmObject
, can't benull
- Returns:
- actual
IRenameElementContext
for renaming object, nevernull
-
startRenameElement
protected List<org.eclipse.ltk.core.refactoring.Change> startRenameElement(org.eclipse.xtext.ui.refactoring.ui.IRenameElementContext renameElementContext, String newName) throws InterruptedException
Starts rename rtefactoring- Parameters:
renameElementContext
- actualIRenameElementContext
, can't benull
newName
- new name of the object, can't benull
- Throws:
InterruptedException
- thrown byBslConfigurationObjectRenameRefactoringController#startRefactoring(org.eclipse.xtext.ui.refactoring.ui.IRenameElementContext)
-
isSupport
protected boolean isSupport(org.eclipse.emf.ecore.EObject object)
Returnstrue
if theobject
is supported by the contributor.- Parameters:
object
- the object being renamed, cannot benull
.- Returns:
true
if theobject
is supported by the contributor,false
- otherwise.
-
-