fail in saving diagram file [message #207170] |
Fri, 26 September 2008 08:20  |
Eclipse User |
|
|
|
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 08:49  |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.02727 seconds