org.eclipse.xtext.ui.refactoring.impl
Class RenameElementProcessor
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor
org.eclipse.ltk.core.refactoring.participants.RenameProcessor
org.eclipse.xtext.ui.refactoring.impl.AbstractRenameProcessor
org.eclipse.xtext.ui.refactoring.impl.RenameElementProcessor
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable
- Direct Known Subclasses:
- CombinedJvmJdtRenameProcessor, JdtRenameRefactoringParticipantProcessor, JvmMemberRenameProcessor, XtendRenameElementProcessor
public class RenameElementProcessor
- extends AbstractRenameProcessor
LTK RefactoringProcessor
for an Xtext element rename
refactoring.
- Author:
- Jan Koehnlein - Initial contribution and API, Holger Schill
Field Summary |
protected static org.apache.log4j.Logger |
LOG
|
Methods inherited from class org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor |
getRefactoring, postCreateChange |
Methods inherited from class org.eclipse.core.runtime.PlatformObject |
getAdapter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static final org.apache.log4j.Logger LOG
RenameElementProcessor
public RenameElementProcessor()
initialize
public boolean initialize(IRenameElementContext renameElementContext)
- Specified by:
initialize
in class AbstractRenameProcessor
getResourceSet
protected org.eclipse.emf.ecore.resource.ResourceSet getResourceSet(IRenameElementContext renameElementContext)
createResourceSet
protected org.eclipse.emf.ecore.resource.ResourceSet createResourceSet(IRenameElementContext renameElementContext)
isValidTargetFile
protected boolean isValidTargetFile(org.eclipse.emf.ecore.resource.Resource resource,
StatusWrapper status)
createRenameElementStrategy
protected IRenameStrategy createRenameElementStrategy(org.eclipse.emf.ecore.EObject targetElement,
IRenameElementContext renameElementContext)
getRenameElementStrategy
public IRenameStrategy getRenameElementStrategy()
getElements
public java.lang.Object[] getElements()
- Specified by:
getElements
in class org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor
getOriginalName
public java.lang.String getOriginalName()
- Specified by:
getOriginalName
in class AbstractRenameProcessor
validateNewName
public org.eclipse.ltk.core.refactoring.RefactoringStatus validateNewName(java.lang.String newName)
- Specified by:
validateNewName
in class AbstractRenameProcessor
getLanguageName
protected java.lang.String getLanguageName()
getIdentifier
public java.lang.String getIdentifier()
- Specified by:
getIdentifier
in class org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor
getProcessorName
public java.lang.String getProcessorName()
- Specified by:
getProcessorName
in class org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor
isApplicable
public boolean isApplicable()
throws org.eclipse.core.runtime.CoreException
- Specified by:
isApplicable
in class org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor
- Throws:
org.eclipse.core.runtime.CoreException
setNewName
public void setNewName(java.lang.String newName)
- Specified by:
setNewName
in class AbstractRenameProcessor
getNewName
public java.lang.String getNewName()
- Specified by:
getNewName
in class AbstractRenameProcessor
checkInitialConditions
public org.eclipse.ltk.core.refactoring.RefactoringStatus checkInitialConditions(org.eclipse.core.runtime.IProgressMonitor pm)
throws org.eclipse.core.runtime.CoreException,
org.eclipse.core.runtime.OperationCanceledException
- Specified by:
checkInitialConditions
in class org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor
- Throws:
org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.OperationCanceledException
checkFinalConditions
public org.eclipse.ltk.core.refactoring.RefactoringStatus checkFinalConditions(org.eclipse.core.runtime.IProgressMonitor monitor,
org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext context)
throws org.eclipse.core.runtime.CoreException,
org.eclipse.core.runtime.OperationCanceledException
- Specified by:
checkFinalConditions
in class org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor
- Throws:
org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.OperationCanceledException
createChange
public org.eclipse.ltk.core.refactoring.Change createChange(org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException,
org.eclipse.core.runtime.OperationCanceledException
- Specified by:
createChange
in class org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor
- Throws:
org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.OperationCanceledException
loadParticipants
public org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant[] loadParticipants(org.eclipse.ltk.core.refactoring.RefactoringStatus status,
org.eclipse.ltk.core.refactoring.participants.SharableParticipants sharedParticipants)
throws org.eclipse.core.runtime.CoreException
- Specified by:
loadParticipants
in class org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor
- Throws:
org.eclipse.core.runtime.CoreException
handleException
protected void handleException(java.lang.Exception exc,
StatusWrapper status)
getRenameElementContext
public IRenameElementContext getRenameElementContext()
getResourceSetProvider
protected RefactoringResourceSetProvider getResourceSetProvider()
getRenameArguments
protected ElementRenameArguments getRenameArguments()
getTargetElement
protected org.eclipse.emf.ecore.EObject getTargetElement()
getStatusProvider
public com.google.inject.Provider<StatusWrapper> getStatusProvider()