change recorder [message #418288] |
Thu, 10 April 2008 09: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 #418298 is a reply to message #418290] |
Fri, 11 April 2008 08:22 |
Eclipse User |
|
|
|
Originally posted by: prateek.babel.in.bosch.com
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);
}
}
}
|
|
|
Re: change recorder [message #418304 is a reply to message #418298] |
Fri, 11 April 2008 10:33 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
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);
> }
> }
> }
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03526 seconds