| [SOLVED] How to synchronize a copy project in the background using JavaElementDeltas? [message #647700]
||Fri, 07 January 2011 20:31
| Kivanc Muslu
Registered: November 2010
People who are interested in the solution, please visit: http:// www.eclipse.org/forums/index.php?t=msg&th=203265&S=b 5d5c7bdcea0b480fec5983a64c3aa1c|
Let's say that I have created a copy of a project (IProject) using IProject.copy(). I want this copy to be in sync with the original project as the user changes the original project.
Looking at the Eclipse API I have seen
This is pretty interesting and works fine for getting all the changes done to the project as ElementChangedEvents. I can event get JavaElementDeltas (and I presume that Deltas represent the exact change between two versions of the project), however my problem is that I cannot find a way to apply these deltas to the project.
So my question(s):
1-) Is there a way to apply a JavaElementDelta to a project (IProject)? (I assume that if I apply all the deltas I got from the original project to the copy project, they will always be in sync)
2-) If yes to 1, is it possible to apply a JavaElementDelta generated by an IProject (let's say project1) to another IProject (project2, in my case the copy project)?
3-) Is there another way to do what I want to do (i.e., keep 2 projects in sync textually)? (as long as it is doable and uses Eclipse API, it doesn't matter if it is hard, easy, hacky or etc.)?
Thanks a lot in advance, regards,
[Updated on: Thu, 10 February 2011 11:41]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01661 seconds