Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » saving default value literal in XML resource
saving default value literal in XML resource [message #429002] Mon, 06 April 2009 18:53 Go to next message
Mircea Luchian is currently offline Mircea LuchianFriend
Messages: 89
Registered: July 2009
Member
Hello,

Is there a way to save automatically the default value literal for an
EMF feature in the associated XML resource? By default, the default
value literal is not saved in the XML, as it is interpreted by the
model. In some cases, saving the default value literal is needed in my
application.

How would I enable this behavior?

Thank you,

Mircea
Re: saving default value literal in XML resource [message #429006 is a reply to message #429002] Mon, 06 April 2009 19:05 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010800030301060204030308
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Mircea,

Comments below.

M. Luchian wrote:
> Hello,
>
> Is there a way to save automatically the default value literal for an
> EMF feature in the associated XML resource?
Yes, there is.
> By default, the default value literal is not saved in the XML, as it
> is interpreted by the model.
That's right.
> In some cases, saving the default value literal is needed in my
> application.
It's good there's an option then.
>
> How would I enable this behavior?

/**
* Keep default content ( e.g. default attributes). This applies
to saving and converting contents to DOM.
* By default the default content is discarded.
* To save the default content, set this option to
<code>Boolean.TRUE</code>.
*/
String OPTION_KEEP_DEFAULT_CONTENT = "KEEP_DEFAULT_CONTENT";

>
> Thank you,
>
> Mircea

--------------010800030301060204030308
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Mircea,<br>
<br>
Comments below.<br>
<br>
M. Luchian wrote:
<blockquote cite="mid:grdj2g$t6r$1@build.eclipse.org" type="cite">Hello,
<br>
<br>
Is there a way to save automatically the default value literal for an
EMF feature in the associated XML resource?</blockquote>
Yes, there is.<br>
<blockquote cite="mid:grdj2g$t6r$1@build.eclipse.org" type="cite"> By
default, the default value literal is not saved in the XML, as it is
interpreted by the model.</blockquote>
That's right.<br>
<blockquote cite="mid:grdj2g$t6r$1@build.eclipse.org" type="cite">In
some cases, saving the default value literal is needed in my
application.
<br>
</blockquote>
It's good there's an option then.<br>
<blockquote cite="mid:grdj2g$t6r$1@build.eclipse.org" type="cite"><br>
How would I enable this behavior?
<br>
</blockquote>
<blockquote><small>&nbsp; /**</small><br>
<small>&nbsp;&nbsp; * Keep default content ( e.g. default attributes). This
applies to saving and converting contents to DOM.</small><br>
<small>&nbsp;&nbsp; * By default the default content is discarded.</small><br>
<small>&nbsp;&nbsp; * To save the default content, set this option to
&lt;code&gt;Boolean.TRUE&lt;/code&gt;.</small ><br>
<small>&nbsp;&nbsp; */</small><br>
<small>&nbsp; String OPTION_KEEP_DEFAULT_CONTENT = "KEEP_DEFAULT_CONTENT";</small><br>
</blockquote>
<blockquote cite="mid:grdj2g$t6r$1@build.eclipse.org" type="cite"><br>
Thank you,
<br>
<br>
Mircea
<br>
</blockquote>
</body>
</html>

--------------010800030301060204030308--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: saving default value literal in XML resource [message #429075 is a reply to message #429006] Tue, 07 April 2009 14:24 Go to previous messageGo to next message
Michael  Mühlberg is currently offline Michael MühlbergFriend
Messages: 33
Registered: July 2009
Member
This is a multi-part message in MIME format.

------=_NextPart_000_0089_01C9B79D.592930F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

10x, I also needed this.

"Ed Merks" <Ed.Merks@gmail.com> wrote in message =
news:grdjp6$dg$1@build.eclipse.org...
Mircea,

Comments below.

M. Luchian wrote:=20
Hello,=20

Is there a way to save automatically the default value literal for =
an EMF feature in the associated XML resource?
Yes, there is.

By default, the default value literal is not saved in the XML, as it =
is interpreted by the model.
That's right.

In some cases, saving the default value literal is needed in my =
application.=20

It's good there's an option then.


How would I enable this behavior?=20

/**
* Keep default content ( e.g. default attributes). This applies =
to saving and converting contents to DOM.
* By default the default content is discarded.
* To save the default content, set this option to =
<code>Boolean.TRUE</code>.
*/
String OPTION_KEEP_DEFAULT_CONTENT =3D "KEEP_DEFAULT_CONTENT";


Thank you,=20

Mircea=20

------=_NextPart_000_0089_01C9B79D.592930F0
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 content=3Dtext/html;charset=3DISO-8859-1 =
http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.18702">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff text=3D#000000>
<DIV><FONT size=3D2 face=3DArial>10x, I also needed this.</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; =
PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"=20
dir=3Dltr>
<DIV>"Ed Merks" &lt;<A=20
href=3D"mailto:Ed.Merks@gmail.com">Ed.Merks@gmail.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:grdjp6$dg$1@build.eclipse.org">news:grdjp6$dg$1@build.eclips=
e.org</A>...</DIV>Mircea,<BR><BR>Comments=20
below.<BR><BR>M. Luchian wrote:=20
<BLOCKQUOTE cite=3Dmid:grdj2g$t6r$1@build.eclipse.org =
type=3D"cite">Hello,=20
<BR><BR>Is there a way to save automatically the default value =
literal for=20
an EMF feature in the associated XML resource?</BLOCKQUOTE>Yes, =
there is.<BR>
<BLOCKQUOTE cite=3Dmid:grdj2g$t6r$1@build.eclipse.org type=3D"cite">By =
default,=20
the default value literal is not saved in the XML, as it is =
interpreted by=20
the model.</BLOCKQUOTE>That's right.<BR>
<BLOCKQUOTE cite=3Dmid:grdj2g$t6r$1@build.eclipse.org type=3D"cite">In =
some=20
cases, saving the default value literal is needed in my application. =

<BR></BLOCKQUOTE>It's good there's an option then.<BR>
<BLOCKQUOTE cite=3Dmid:grdj2g$t6r$1@build.eclipse.org =
type=3D"cite"><BR>How=20
would I enable this behavior? <BR></BLOCKQUOTE>
<BLOCKQUOTE><SMALL>&nbsp; /**</SMALL><BR><SMALL>&nbsp;&nbsp; * Keep =
default=20
content ( e.g. default attributes). This applies to saving and =
converting=20
contents to DOM.</SMALL><BR><SMALL>&nbsp;&nbsp; * By default the =
default=20
content is discarded.</SMALL><BR><SMALL>&nbsp;&nbsp; * To save the =
default=20
content, set this option to=20
=
&lt;code&gt;Boolean.TRUE&lt;/code&gt;.</SMALL ><BR><SMALL>&nbsp;&nbsp;=20
*/</SMALL><BR><SMALL>&nbsp; String OPTION_KEEP_DEFAULT_CONTENT =3D=20
"KEEP_DEFAULT_CONTENT";</SMALL><BR></BLOCKQUOTE>
<BLOCKQUOTE cite=3Dmid:grdj2g$t6r$1@build.eclipse.org =
type=3D"cite"><BR>Thank=20
you, <BR><BR>Mircea <BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0089_01C9B79D.592930F0--
Re: saving default value literal in XML resource [message #429079 is a reply to message #429006] Tue, 07 April 2009 15:38 Go to previous message
Mircea Luchian is currently offline Mircea LuchianFriend
Messages: 89
Registered: July 2009
Member
This is a multi-part message in MIME format.
--------------000007020209070302040002
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

This is perfect.
Thank you,
Mircea

Ed Merks wrote:
> Mircea,
>
> Comments below.
>
> M. Luchian wrote:
>> Hello,
>>
>> Is there a way to save automatically the default value literal for an
>> EMF feature in the associated XML resource?
> Yes, there is.
>> By default, the default value literal is not saved in the XML, as it
>> is interpreted by the model.
> That's right.
>> In some cases, saving the default value literal is needed in my
>> application.
> It's good there's an option then.
>>
>> How would I enable this behavior?
>
> /**
> * Keep default content ( e.g. default attributes). This applies
> to saving and converting contents to DOM.
> * By default the default content is discarded.
> * To save the default content, set this option to
> <code>Boolean.TRUE</code>.
> */
> String OPTION_KEEP_DEFAULT_CONTENT = "KEEP_DEFAULT_CONTENT";
>
>>
>> Thank you,
>>
>> Mircea

--------------000007020209070302040002
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
This is perfect. <br>
Thank you,<br>
Mircea<br>
<br>
Ed Merks wrote:
<blockquote cite="midgrdjp6$dg$1@build.eclipse.org" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Mircea,<br>
<br>
Comments below.<br>
<br>
M. Luchian wrote:
<blockquote cite="mid:grdj2g$t6r$1@build.eclipse.org" type="cite">Hello,
<br>
<br>
Is there a way to save automatically the default value literal for an
EMF feature in the associated XML resource?</blockquote>
Yes, there is.<br>
<blockquote cite="mid:grdj2g$t6r$1@build.eclipse.org" type="cite"> By
default, the default value literal is not saved in the XML, as it is
interpreted by the model.</blockquote>
That's right.<br>
<blockquote cite="mid:grdj2g$t6r$1@build.eclipse.org" type="cite">In
some cases, saving the default value literal is needed in my
application. <br>
</blockquote>
It's good there's an option then.<br>
<blockquote cite="mid:grdj2g$t6r$1@build.eclipse.org" type="cite"><br>
How would I enable this behavior? <br>
</blockquote>
<blockquote><small>&nbsp; /**</small><br>
<small>&nbsp;&nbsp; * Keep default content ( e.g. default attributes). This
applies to saving and converting contents to DOM.</small><br>
<small>&nbsp;&nbsp; * By default the default content is discarded.</small><br>
<small>&nbsp;&nbsp; * To save the default content, set this option to
&lt;code&gt;Boolean.TRUE&lt;/code&gt;.</small ><br>
<small>&nbsp;&nbsp; */</small><br>
<small>&nbsp; String OPTION_KEEP_DEFAULT_CONTENT =
"KEEP_DEFAULT_CONTENT";</small><br>
</blockquote>
<blockquote cite="mid:grdj2g$t6r$1@build.eclipse.org" type="cite"><br>
Thank you, <br>
<br>
Mircea <br>
</blockquote>
</blockquote>
</body>
</html>

--------------000007020209070302040002--
Previous Topic:Undo/Redo in EMF based RCP application
Next Topic:EMF/XSD Activities Example
Goto Forum:
  


Current Time: Thu Apr 25 15:02:03 GMT 2024

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

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

Back to the top