org.eclipse.xtext.ui.refactoring.ui
Class DefaultRenameElementHandler

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.core.commands.AbstractHandler
          extended by org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler
All Implemented Interfaces:
org.eclipse.core.commands.IHandler, org.eclipse.core.commands.IHandler2, IRenameElementHandler
Direct Known Subclasses:
JvmRenameElementHandler, XtextRenameElementHandler

public class DefaultRenameElementHandler
extends org.eclipse.core.commands.AbstractHandler
implements IRenameElementHandler

Author:
Jan Koehnlein - Initial contribution and API, Holger Schill

Field Summary
protected  IGlobalServiceProvider globalServiceProvider
           
protected static org.apache.log4j.Logger LOG
           
protected  RefactoringPreferences preferences
           
protected  RenameRefactoringController renameRefactoringController
           
 
Constructor Summary
DefaultRenameElementHandler()
           
 
Method Summary
 IRenameElementContext createRenameElementContext(org.eclipse.emf.ecore.EObject targetElement, XtextEditor editor, org.eclipse.jface.text.ITextSelection selection, XtextResource resource)
           
 java.lang.Object execute(org.eclipse.core.commands.ExecutionEvent event)
           
protected  boolean isRefactoringEnabled(IRenameElementContext renameElementContext, XtextResource resource)
           
protected  void startRenameElement(IRenameElementContext renameElementContext)
           
 
Methods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.commands.IHandler2
setEnabled
 
Methods inherited from interface org.eclipse.core.commands.IHandler
addHandlerListener, dispose, isEnabled, isHandled, removeHandlerListener
 

Field Detail

renameRefactoringController

@Inject
protected RenameRefactoringController renameRefactoringController

globalServiceProvider

@Inject
protected IGlobalServiceProvider globalServiceProvider

preferences

@Inject
protected RefactoringPreferences preferences

LOG

protected static final org.apache.log4j.Logger LOG
Constructor Detail

DefaultRenameElementHandler

public DefaultRenameElementHandler()
Method Detail

execute

public java.lang.Object execute(org.eclipse.core.commands.ExecutionEvent event)
                         throws org.eclipse.core.commands.ExecutionException
Specified by:
execute in interface org.eclipse.core.commands.IHandler
Throws:
org.eclipse.core.commands.ExecutionException

isRefactoringEnabled

protected boolean isRefactoringEnabled(IRenameElementContext renameElementContext,
                                       XtextResource resource)

createRenameElementContext

public IRenameElementContext createRenameElementContext(org.eclipse.emf.ecore.EObject targetElement,
                                                        XtextEditor editor,
                                                        org.eclipse.jface.text.ITextSelection selection,
                                                        XtextResource resource)
Specified by:
createRenameElementContext in interface IRenameElementHandler

startRenameElement

protected void startRenameElement(IRenameElementContext renameElementContext)
                           throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException