I’m creating an Eclipse plugin that need to invoke the Eclipse Refactor - Move dialog box and pass the source file and destination location values dynamically. Since I already have the source file and destination location, I can skip the “Choose destination” page and directly go to the “Preview” page where the user will review the rafactored code caused by the move.
My questions is, how can I call the existing Eclipse dialog from my plugin? What are the extension points should I use?
Hit Shift–Alt–F2 to activate the plugin menu spy in Eclipse. Then open the context menu on one of your classes and select the refactoring menu you are interested in (like Refactor->Move).
Plugin menu spy will show you the related action like
org.eclipse.jdt.ui.actions.MoveActionwhich you can click to open and inspect how it invokes the refactoring.