Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » fail in saving diagram file
fail in saving diagram file [message #207170] Fri, 26 September 2008 12:20 Go to next message
yeliu is currently offline yeliuFriend
Messages: 145
Registered: July 2009
Senior Member
Hello,
when I run a generated grapihical editor and try to save it ,the
following warning pop up.What is the reason?
-------------------------------------------
save could not be completed.
Reason: the
object'com.eclipse.xxx.impl.DatadefImp@914a0a(data,sourceFT:null,targetFT:null,type:null)
is not contained in a resource'
____________________________________________
data,sourceFT,targetFT are the attributes that Datadef inherited from its
super class CObjects.

How to solve this?

Thanks a lot!


ye
Re: fail in saving diagram file [message #207177 is a reply to message #207170] Fri, 26 September 2008 12:49 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Ye,

This implies that you have a non-containment reference to a Datadef
instance and that Datadef instance isn't contained by anything. I.e.,
its eContainer is null and its eResource is null. So that object will
never be serialized because only things for which eResource() != null
will be serialized, i.e., only things directly or indirectly contained
by a resource will be serialized. Hence a reference to such an object
can't be serialized either, since normally such a reference would need
to use
datadef.eResource().getURI().appendFragment(datadef.eResourc e().getURIFragment(datadef))
to serialize a reference and naturally if eResource() is null, that's
not possible. So be sure to add this object either directly to the
resource's contents or to some containment reference on a parent object
that's directly or indirectly contained by a resource.


ye wrote:
> Hello,
> when I run a generated grapihical editor and try to save it ,the
> following warning pop up.What is the reason?
> -------------------------------------------
> save could not be completed.
> Reason: the
> object'com.eclipse.xxx.impl.DatadefImp@914a0a(data,sourceFT:null,targetFT:null,type:null)
> is not contained in a resource'
> ____________________________________________
> data,sourceFT,targetFT are the attributes that Datadef inherited from
> its super class CObjects.
>
> How to solve this?
>
> Thanks a lot!
>
>
> ye
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:self-containing compartment?
Next Topic:Label positioned under RoundedRectangle?
Goto Forum:
  


Current Time: Fri Apr 19 10:52:52 GMT 2024

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

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

Back to the top