org.eclipse.xtext.xbase.ui.jvmmodel.refactoring.jdt
Class CombinedJvmJdtRenameProcessor

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor
          extended by org.eclipse.ltk.core.refactoring.participants.RenameProcessor
              extended by org.eclipse.xtext.ui.refactoring.impl.AbstractRenameProcessor
                  extended by org.eclipse.xtext.ui.refactoring.impl.RenameElementProcessor
                      extended by org.eclipse.xtext.xbase.ui.jvmmodel.refactoring.jdt.CombinedJvmJdtRenameProcessor
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable

public class CombinedJvmJdtRenameProcessor
extends RenameElementProcessor

Bundles multiple JavaRenameProcessors and combines their results. Unfortunately org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor.setRefactoring(ProcessorBasedRefactoring) is package private. So we have to set the refactoring from the other side. Note that this requires a refactoring that is aware of that fact, e.g. ChangeCombiningRenameRefactoring.

Author:
Jan Koehnlein - Initial contribution and API

Field Summary
 
Fields inherited from class org.eclipse.xtext.ui.refactoring.impl.RenameElementProcessor
LOG
 
Constructor Summary
CombinedJvmJdtRenameProcessor()
           
 
Method Summary
 org.eclipse.ltk.core.refactoring.RefactoringStatus checkFinalConditions(org.eclipse.core.runtime.IProgressMonitor pm, org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext context)
           
 org.eclipse.ltk.core.refactoring.RefactoringStatus checkInitialConditions(org.eclipse.core.runtime.IProgressMonitor pm)
           
 org.eclipse.ltk.core.refactoring.Change createChange(org.eclipse.core.runtime.IProgressMonitor pm)
           
 java.lang.Object[] getElements()
           
 java.lang.String getProcessorName()
           
protected  java.lang.Iterable<org.eclipse.jdt.internal.corext.refactoring.rename.JavaRenameProcessor> getSubProcessors()
           
 boolean initialize(IRenameElementContext renameElementContext)
           
 boolean isApplicable()
           
 org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant[] loadParticipants(org.eclipse.ltk.core.refactoring.RefactoringStatus status, org.eclipse.ltk.core.refactoring.participants.SharableParticipants sharedParticipants)
           
 
Methods inherited from class org.eclipse.xtext.ui.refactoring.impl.RenameElementProcessor
createRenameElementStrategy, createResourceSet, getIdentifier, getLanguageName, getNewName, getOriginalName, getRenameArguments, getRenameElementContext, getRenameElementStrategy, getResourceSet, getResourceSetProvider, getStatusProvider, getTargetElement, handleException, isValidTargetFile, setNewName, validateNewName
 
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
 

Constructor Detail

CombinedJvmJdtRenameProcessor

public CombinedJvmJdtRenameProcessor()
Method Detail

initialize

public boolean initialize(IRenameElementContext renameElementContext)
Overrides:
initialize in class RenameElementProcessor

getElements

public java.lang.Object[] getElements()
Overrides:
getElements in class RenameElementProcessor

getProcessorName

public java.lang.String getProcessorName()
Overrides:
getProcessorName in class RenameElementProcessor

getSubProcessors

protected java.lang.Iterable<org.eclipse.jdt.internal.corext.refactoring.rename.JavaRenameProcessor> getSubProcessors()

isApplicable

public boolean isApplicable()
                     throws org.eclipse.core.runtime.CoreException
Overrides:
isApplicable in class RenameElementProcessor
Throws:
org.eclipse.core.runtime.CoreException

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
Overrides:
checkInitialConditions in class RenameElementProcessor
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 pm,
                                                                               org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext context)
                                                                        throws org.eclipse.core.runtime.CoreException,
                                                                               org.eclipse.core.runtime.OperationCanceledException
Overrides:
checkFinalConditions in class RenameElementProcessor
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 pm)
                                                     throws org.eclipse.core.runtime.CoreException,
                                                            org.eclipse.core.runtime.OperationCanceledException
Overrides:
createChange in class RenameElementProcessor
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
Overrides:
loadParticipants in class RenameElementProcessor
Throws:
org.eclipse.core.runtime.CoreException