Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Launch eclipse refactoring wizard programatically(Launch eclipse refactoring wizard programatically)
Launch eclipse refactoring wizard programatically [message #923311] Tue, 25 September 2012 20:22 Go to next message
Obaid Abdul Maroof is currently offline Obaid Abdul MaroofFriend
Messages: 5
Registered: August 2012
Junior Member
Hi,

I want to launch one of the provided refactoring wizarard programatically (for instance rename refactoring). I want a real refactoring wizard getting launched by my function rather than an automated execution of refactoring. I found the example test case in the RenameResourceAction class of the "org.eclipse.jdt.internal.ui.refactoring.actions" package. Is it the right example to look into??? However, I am unable to find the way to initialise the IResource object which is necessary to start the refactoring.

May be someone from you can quickly guide me in the right direction.

Thanks in advance,
Obaid
Re: Launch eclipse refactoring wizard programatically [message #923461 is a reply to message #923311] Tue, 25 September 2012 23:38 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Obaid Abdul Maroof wrote on Tue, 25 September 2012 22:22
... However, I am unable to find the way to initialise the IResource object ...


What input do you have at the point where you want to open the wizard? Do you have an IJavaElement, an ISelection, a file name? Do you know the IProject / IJavaProject?


Re: Launch eclipse refactoring wizard programatically [message #923814 is a reply to message #923461] Wed, 26 September 2012 08:11 Go to previous message
Obaid Abdul Maroof is currently offline Obaid Abdul MaroofFriend
Messages: 5
Registered: August 2012
Junior Member
Hi,

Thanks for the reply. I want to open the rename refactoring wizard and for that I probably would need an ISelection or IJavaElement object, right? Lets say, I have a project and want to rename a variable 'temp' with 'temporary' in this project. and here I have to initialize the rename refactoring wizard with the above parameter(s).

Obaid
Previous Topic:how can I make this editor using RCP?
Next Topic:No jsp editor in last Juno eclipse for JEE developement
Goto Forum:
  


Current Time: Sat Nov 09 01:07:57 GMT 2024

Powered by FUDForum. Page generated in 0.02804 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top