change recorder [message #418288] |
Thu, 10 April 2008 05:55  |
Eclipse User |
|
|
|
Originally posted by: prateek.babel.in.bosch.com
Hello All,
I have a pretty simple problme with using of EMF supplied ChangeRecorder.
But not really able to solve it. Any help would be appreciated:
Scenario: I have a change recorder in which many changes on some objects
have been recorded. I would like to flush the change recorder only for
some particular objects. How to acheive this?
Example: Obj1, obj2 are already present in change recorder whith their set
of changes. How to remove only the changes of obj1 and leave obj2 as it is?
Thanks in advance,
Prateek
|
|
|
|
|
Re: change recorder [message #418304 is a reply to message #418298] |
Fri, 11 April 2008 06:33  |
Eclipse User |
|
|
|
Prateek,
Either it's not getting removed, or it's getting added back in. Do you
know which of the two is the case? The change description itself is a
model you can add an adapter to get notifications as it changes, so you
could use that to observe what's happening...
Prateek Babel wrote:
> Hello Ed,
> Thanks
> I hacve done the same. But still when i come back to the change
> recorder after the present session..i get back all the data wchich i
> had removed in me last session
>
> Some code snipplet:
> for (EObject changedObject : new
> HashSet<EObject>(modelDelta.getObjectChanges().keySet())) {
> String affectedOriginURI = findOriginURI(changedObject,
> modelDelta);
> if (originURI.equals(affectedOriginURI)) {
> modelDelta.getObjectChanges().remove(changedObject);
> }
> }
> }
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05899 seconds