Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Phatom node keep referencing a deleted element => save impossible !
Phatom node keep referencing a deleted element => save impossible ! [message #199334] Tue, 29 July 2008 08:52 Go to next message
Eclipse UserFriend
Originally posted by: zippo29.hotmail.fr

Hi all!

I am struggling for days with a problem concerning element deletion and a
phamatm node keeping reference to the deleted element. Here my problem in
more detail hoping someone have a hint to solve it:

1)I have a model: Root<>---As<>---Bs<>---Cs<>---Ds, Root<>---Es ,
E<----->D

2)I created an editor where I display As and Bs contaiment via compartment
Re: Phatom node keep referencing a deleted element => save impossible ! [message #199381 is a reply to message #199334] Tue, 29 July 2008 12:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: awm_abu.yahoo.com

Hi,

I had a similar issue which involved two different resources.
Are the elements you list below in the same or different resources ?
Also how do you do the deletion ? (using EcoreUtil.delete or something else
?)

thanks


"Mous" <zippo29@hotmail.fr> wrote in message
news:1b422e7e4be0d87824c67879318d6f81$1@www.eclipse.org...
> Hi all!
>
> I am struggling for days with a problem concerning element deletion and a
> phamatm node keeping reference to the deleted element. Here my problem in
> more detail hoping someone have a hint to solve it:
>
> 1)I have a model: Root<>---As<>---Bs<>---Cs<>---Ds, Root<>---Es ,
> E<----->D
> 2)I created an editor where I display As and Bs contaiment via compartment
Re: Phatom node keep referencing a deleted element => save impossible ! [message #199400 is a reply to message #199381] Tue, 29 July 2008 15:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zippo29.hotmail.fr

Hi, Thanks for your reply

> Hi,

> I had a similar issue which involved two different resources.
> Are the elements you list below in the same or different resources ?


They are in the same diagram file but as i said through a diagram
partition.


> Also how do you do the deletion ? (using EcoreUtil.delete or something else
> ?)


I do the deletion in the diagram via "delete" key or "delete from model"
and I have the same result.

In fact, I created a command to close(if opened) and supress the
sub-diagram that represents the B node from the resource. A sort of clean
up of the GMFResource.

Then I tried to use the same mechanism for the Cs children present in B
diagram to have acess to the D element and to easy the reuse because I had
other sub diagrams and phatom nodes.
I found that this solution is no use because the editparts instances are
accessible only if the concerned diagram editor is opened.

I tried to send a deleteRequest to the model trying to use the
DeleteCommand mechanism but i failed. I think because the diagram did not
share the same editing domain with the model tree-editor.

I did not try EcoreUtil.delete but I think it will only remove the
references from the GMFResource without using a command and then without
updating the model.

But I will give it a try.


Regards



> thanks


> "Mous" <zippo29@hotmail.fr> wrote in message
> news:1b422e7e4be0d87824c67879318d6f81$1@www.eclipse.org...
>> Hi all!
>>
>> I am struggling for days with a problem concerning element deletion and a
>> phamatm node keeping reference to the deleted element. Here my problem in
>> more detail hoping someone have a hint to solve it:
>>
>> 1)I have a model: Root<>---As<>---Bs<>---Cs<>---Ds, Root<>---Es ,
>> E<----->D
>> 2)I created an editor where I display As and Bs contaiment via compartment
Re: Phatom node keep referencing a deleted element => save impossible ! [message #208596 is a reply to message #199334] Wed, 15 October 2008 02:40 Go to previous message
Jevon  is currently offline Jevon Friend
Messages: 164
Registered: July 2009
Senior Member
Hi Mous,

This is easy to achieve if you are editing a model that was designed
with an older version of your plugin. If you create the model from
scratch you should be able to save it without the phantom node problem.

Jevon

Mous wrote:
> Hi all!
>
> I am struggling for days with a problem concerning element deletion and
> a phamatm node keeping reference to the deleted element. Here my problem
> in more detail hoping someone have a hint to solve it:
>
> 1)I have a model: Root<>---As<>---Bs<>---Cs<>---Ds, Root<>---Es , E<----->D
> 2)I created an editor where I display As and Bs contaiment via compartment
Previous Topic:Installing GEF source code in Ganyemde
Next Topic:Unexpected DND Error with GMF 2.1.1
Goto Forum:
  


Current Time: Thu Apr 18 17:47:37 GMT 2024

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

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

Back to the top