Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » [SOLVED] How to apply a org.eclipse.ltk.core.refactoring.Change object to another project
icon14.gif  [SOLVED] How to apply a org.eclipse.ltk.core.refactoring.Change object to another project [message #640301] Sat, 20 November 2010 08:27
Kivanc Muslu is currently offline Kivanc MusluFriend
Messages: 153
Registered: November 2010
Senior Member
Edit: I have solved this problem in high level. I couldn't find to apply a Change object created by Project1, to Project2, but here is a solution that makes the same thing:
- Go through Project2 (the project you want to apply the changes), and retrieve IMarkers.
- Convert these markers to IProblemLocations.
- Give these problem locations (with context as their compilation unit) to the QuickFixProcessor to get the Changes specific to Project2.
- Since these changes are generated for Project2, they will be applicable to Project2.

Hi all,

I am new to the forums, excuse me if this is the wrong forum to ask this question.

I have a Change object that I got from QuickFixProcessor. As far as I understood the Change objects are associated with the project and files that create them (which is very logical normally). However, I have the following issue:
I copy the original project with a new name (in the same workspace) to a new project. The content is exactly the same, so in theory the Change object I get from the original project should be applicable to the copy project. However, I couldn't find an easy way to implement this in my plug-in. For now I am trying to reconstruct the Change (by going to its concrete instance) and trying to point to the copy project during this reconstruction. However, there are a lot of different changes, so the code is ugly and I am not sure if I cover the all cases.

In short, if there an easy way to apply a Change created by project 'x' to a project 'y' (which has exactly same content as x)?

Thanks in advance, please do ask if you need more information,

Best regards,

[Updated on: Wed, 16 February 2011 22:42]

Report message to a moderator

Previous Topic:Need help with setting up android sdk with eclipse.
Next Topic:Conditional breakpoints in remotely debugged process
Goto Forum:
  


Current Time: Fri Apr 19 04:24:45 GMT 2024

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

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

Back to the top