org.eclipse.xtext.common.types.ui.refactoring.participant
Class JdtRenameParticipant

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant
          extended by org.eclipse.ltk.core.refactoring.participants.RenameParticipant
              extended by org.eclipse.xtext.ui.refactoring.impl.AbstractProcessorBasedRenameParticipant
                  extended by org.eclipse.xtext.common.types.ui.refactoring.participant.JdtRenameParticipant
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable

public class JdtRenameParticipant
extends AbstractProcessorBasedRenameParticipant

Participant for JDT refactorings. Is based on refactoring processors which are created using an IRenameRefactoringProvider. The participant is registered by the plug-in org.eclipse.xtext.common.types.shared, and delegates to the declaring language if the equivalent JVM target element is contained in the index. Languages that do not define own JVM elements but refer to existing Java artifacts only don't have to implement anything additional to get their references updated. Languages that define own JvmElements should implement and bind a JdtRenameParticipant.ContextFactory.

Author:
Jan Koehnlein - Initial contribution and API

Nested Class Summary
static class JdtRenameParticipant.ContextFactory
           
 
Constructor Summary
JdtRenameParticipant()
           
 
Method Summary
protected  java.util.List<? extends IRenameElementContext> createJdtRenameParticipantContext(JvmMember renamedJvmMember, org.eclipse.jdt.core.IJavaElement javaElement)
           
protected  java.util.List<? extends IRenameElementContext> createRenameElementContexts(java.lang.Object element)
           
protected  JdtRenameParticipant.ContextFactory getContextFactory(org.eclipse.emf.ecore.EObject jvmMember)
           
protected  org.eclipse.emf.ecore.EClass getExpectedJvmType(org.eclipse.jdt.core.IJavaElement javaElement)
           
 java.lang.String getName()
           
protected  java.util.List<org.eclipse.emf.ecore.EObject> getRenamedElementsOrProxies(org.eclipse.emf.ecore.EObject originalTarget)
           
protected  org.eclipse.ltk.core.refactoring.participants.RenameProcessor getRenameProcessor(IRenameElementContext participantContext)
           
 
Methods inherited from class org.eclipse.xtext.ui.refactoring.impl.AbstractProcessorBasedRenameParticipant
checkConditions, createChange, disableFor, getElements, getGlobalServiceProvider, getNewName, getRenameProcessors, getRenameRefactoringProvider, getStatus, initialize, setNewName
 
Methods inherited from class org.eclipse.ltk.core.refactoring.participants.RenameParticipant
getArguments, initialize
 
Methods inherited from class org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant
createPreChange, getProcessor, getTextChange, initialize
 
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

JdtRenameParticipant

public JdtRenameParticipant()
Method Detail

getName

public java.lang.String getName()
Overrides:
getName in class AbstractProcessorBasedRenameParticipant

createRenameElementContexts

protected java.util.List<? extends IRenameElementContext> createRenameElementContexts(java.lang.Object element)
Overrides:
createRenameElementContexts in class AbstractProcessorBasedRenameParticipant

getRenameProcessor

protected org.eclipse.ltk.core.refactoring.participants.RenameProcessor getRenameProcessor(IRenameElementContext participantContext)
Overrides:
getRenameProcessor in class AbstractProcessorBasedRenameParticipant

createJdtRenameParticipantContext

protected java.util.List<? extends IRenameElementContext> createJdtRenameParticipantContext(JvmMember renamedJvmMember,
                                                                                            org.eclipse.jdt.core.IJavaElement javaElement)

getRenamedElementsOrProxies

protected java.util.List<org.eclipse.emf.ecore.EObject> getRenamedElementsOrProxies(org.eclipse.emf.ecore.EObject originalTarget)
Specified by:
getRenamedElementsOrProxies in class AbstractProcessorBasedRenameParticipant

getExpectedJvmType

protected org.eclipse.emf.ecore.EClass getExpectedJvmType(org.eclipse.jdt.core.IJavaElement javaElement)

getContextFactory

protected JdtRenameParticipant.ContextFactory getContextFactory(org.eclipse.emf.ecore.EObject jvmMember)