Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » How do you make an untracked change?
How do you make an untracked change? [message #36887] Sat, 10 June 2006 00:32 Go to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

This is a multi-part message in MIME format.

------=_NextPart_000_0018_01C68C03.CB4BA280
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I want to write to some resources without having the =
TransactionalEditingDomain know about it. Or at the very least, without =
marking the resources as dirty. The change is essentially replacing =
proxies with actual EObjects. Is there a way to do so?
------=_NextPart_000_0018_01C68C03.CB4BA280
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2873" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I want to write to some resources =
without having=20
the TransactionalEditingDomain know about it.&nbsp; Or at the very =
least,=20
without marking the resources as dirty.&nbsp; The change is essentially=20
replacing proxies with actual EObjects.&nbsp; Is there a way to do=20
so?</FONT></DIV></BODY></HTML>

------=_NextPart_000_0018_01C68C03.CB4BA280--
Re: How do you make an untracked change? [message #36921 is a reply to message #36887] Sat, 10 June 2006 03:59 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Pratik,

Perform your changes with the Transaction.NO_UNDO,
Transaction.NO_NOTIFICATIONS, and Transaction.NO_TRIGGERS options. If you
think that you may need to make these changes when the calling context has
a read-only transaction in progress, then you would also need the
Transaction.UNPROTECTED option (which actually implies NO_UNDO and
NO_TRIGGERS, anyway, in addition to NO_VALIDATION).

If your resource is tracking modifications (as it would do by default if
you are using GMF), then in order to prevent it becoming dirty, you will
actually have to reset its isModified property. The resource listens
"directly" to its contents using a ModificationTrackingAdapter, so you
can't hide your changes from it.

Do not temporarily disable notification on any object while replacing
proxies in its features using eSetNotify(). This would hide changes from
the ModificationTrackingAdapter, but it would also prevent the
TransactionChangeRecorder from finding out about the new objects attached
to the resource set (esp. in the case of containment proxies). The
consequence would be incomplete change tracking in the future when you do
want it.

HTH,

Christian


Pratik Shah wrote:

> I want to write to some resources without having the
TransactionalEditingDomain know about it. Or at the very least, without
marking the resources as dirty. The change is essentially replacing proxies
with actual EObjects. Is there a way to do so?
Re: How do you make an untracked change? [message #580439 is a reply to message #36887] Sat, 10 June 2006 03:59 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Pratik,

Perform your changes with the Transaction.NO_UNDO,
Transaction.NO_NOTIFICATIONS, and Transaction.NO_TRIGGERS options. If you
think that you may need to make these changes when the calling context has
a read-only transaction in progress, then you would also need the
Transaction.UNPROTECTED option (which actually implies NO_UNDO and
NO_TRIGGERS, anyway, in addition to NO_VALIDATION).

If your resource is tracking modifications (as it would do by default if
you are using GMF), then in order to prevent it becoming dirty, you will
actually have to reset its isModified property. The resource listens
"directly" to its contents using a ModificationTrackingAdapter, so you
can't hide your changes from it.

Do not temporarily disable notification on any object while replacing
proxies in its features using eSetNotify(). This would hide changes from
the ModificationTrackingAdapter, but it would also prevent the
TransactionChangeRecorder from finding out about the new objects attached
to the resource set (esp. in the case of containment proxies). The
consequence would be incomplete change tracking in the future when you do
want it.

HTH,

Christian


Pratik Shah wrote:

> I want to write to some resources without having the
TransactionalEditingDomain know about it. Or at the very least, without
marking the resources as dirty. The change is essentially replacing proxies
with actual EObjects. Is there a way to do so?
Previous Topic:How do you make an untracked change?
Next Topic:Recommended Editor for Java Emitter Templates?
Goto Forum:
  


Current Time: Sun May 19 06:09:49 GMT 2024

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

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

Back to the top