Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Hide an attribute
Hide an attribute [message #551588] Sat, 07 August 2010 16:49 Go to next message
bachra04  is currently offline bachra04 Friend
Messages: 148
Registered: April 2010
Senior Member
I have the following problem I need to resolve:

I have an EClass myclass with a few Eattributes attA, attB, attC

each time I change the attribute then save the information is written to an XML file.

<myClass>

attA="dd" attB="dd" attC="p"


</myClass>

So the GMF engine is doing the writing to the XML file using introspection

so it will check if attA isSet then it will put it inside the xml file otherwise no and same thing for other attributes

I have a situation where I need not to put attA even if it is set. in other words I need to override the behavior of GMF engine for this attribute.

Is there a way to do that?

Thanks
Re: Hide an attribute [message #551589 is a reply to message #551588] Sat, 07 August 2010 16:55 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
You can make attA transient so that it will never be saved.


bachra04 wrote:
> I have the following problem I need to resolve:
>
> I have an EClass myclass with a few Eattributes attA, attB, attC
>
> each time I change the attribute then save the information is written
> to an XML file.
>
> <myClass>
>
> attA="dd" attB="dd" attC="p"
>
>
> </myClass>
>
> So the GMF engine is doing the writing to the XML file using
> introspection
>
> so it will check if attA isSet then it will put it inside the xml file
> otherwise no and same thing for other attributes
>
> I have a situation where I need not to put attA even if it is set. in
> other words I need to override the behavior of GMF engine for this
> attribute.
>
> Is there a way to do that?
>
> Thanks
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[TEXO] problem with annotationsmodel
Next Topic:Empty String as initial value
Goto Forum:
  


Current Time: Fri Apr 26 20:28:59 GMT 2024

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

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

Back to the top