Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Refactoring Participants for Java Refactoring and Model Refactoring
Refactoring Participants for Java Refactoring and Model Refactoring [message #1023570] Sun, 24 March 2013 15:53 Go to next message
John Locke is currently offline John LockeFriend
Messages: 23
Registered: July 2010
Junior Member
Hello,

i'am trying to combine Java Refactorings with Model Refactorings. First i tried to use refactoring participant. But it seems like the framework needs a instance of a TextChange to perform combined refactorings. Is this right or do i misunderstood the code?
For the case i'am right: Is there a possibility to use a RefactoringChange which extends the class org.eclipse.ltk.core.refactoring.Change?
Re: Refactoring Participants for Java Refactoring and Model Refactoring [message #1023679 is a reply to message #1023570] Sun, 24 March 2013 22:56 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
What's the intention in this combination?
Do you really want both refactorings to manipulate the same source file?
I wouldn't be surprised if that's unsupported.
If the files manipulated by the different refactorings are disjoint there should be no need to merge effects into a single TextChange.

my 2c
Re: Refactoring Participants for Java Refactoring and Model Refactoring [message #1023873 is a reply to message #1023679] Mon, 25 March 2013 10:46 Go to previous messageGo to next message
John Locke is currently offline John LockeFriend
Messages: 23
Registered: July 2010
Junior Member
Hello Stephan,

thanks for your answer.

The idee is to combine java refactorings with model refactorings and vice versa.
That means if a operation is renamed in a uml diagram the corresponding method in java is also renamed. I use two different files *.java for the java refactoring and *.uml for the uml class diagram.

Regards,
John
Re: Refactoring Participants for Java Refactoring and Model Refactoring [message #1027166 is a reply to message #1023873] Tue, 26 March 2013 16:31 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
At least for the direction of propagating changes from Java to models, RefactoringParticipant looks like a perfect match to me.
Perhaps you should give a few more details of what you tried and how exactly a participant implementation fails?
Re: Refactoring Participants for Java Refactoring and Model Refactoring [message #1042539 is a reply to message #1027166] Tue, 16 April 2013 14:50 Go to previous message
John Locke is currently offline John LockeFriend
Messages: 23
Registered: July 2010
Junior Member
Hi Stephan,
it works for Rename and Move Refactorings. But i'm also looking for a approach for the java refactorings which doesn't support participants. Any suggestions? I'm likewise looking for a elegant approach to call java refactorings... have you any idea how to do this? I don't want to use the internal RefactoringProcessors. Is there a alternative way?

Best wishes
John
Previous Topic:Formatting Source Code programmatically with JDT
Next Topic:Showing exception details while debugging
Goto Forum:
  


Current Time: Sat Apr 27 03:44:04 GMT 2024

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

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

Back to the top