Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Help with hiding node
Help with hiding node [message #229007] Wed, 06 May 2009 14:48 Go to next message
Giordano is currently offline GiordanoFriend
Messages: 21
Registered: July 2009
Junior Member
Hi!! I'have a big problem..
First at all... sorry if my english is not good..

I need to hide a node when I double click on one other node associated
with it.
If i change the EditPart.getFigure.setVisible value I obtain what I want
but I need to save the changes.. (when I reopen the diagram I need that
the node is still not visible) and with this method I can't do that. There
is a way to notify the visibility change?

I try also with a command that change the property of the EditPart
(ChangeValueRequest or something like that) but with this method the node
that I hide disappears also in the children collection of the other node
and I don't want this!!!

Please help me.. Thanks
Re: Help with hiding node [message #229074 is a reply to message #229007] Thu, 07 May 2009 04:49 Go to previous messageGo to next message
BG is currently offline BGFriend
Messages: 45
Registered: July 2009
Member
Hi,
Try to obtain the view from editpart and perform the hide operation inside
command class
View hostView = (View)editPart.getModel();
hostView.setVisible(false);

Regards
Byre
Re: Help with hiding node [message #229192 is a reply to message #229074] Thu, 07 May 2009 13:24 Go to previous messageGo to next message
Giordano is currently offline GiordanoFriend
Messages: 21
Registered: July 2009
Junior Member
Byre wrote:

> Hi,
> Try to obtain the view from editpart and perform the hide operation inside
> command class
> View hostView = (View)editPart.getModel();
> hostView.setVisible(false);

> Regards
> Byre
Thanks but also with this method GMF delete the reference to the child
EditPart and I can't show again the figure because the child collection of
my parent editpart is empty!!
Re: Help with hiding node [message #229242 is a reply to message #229192] Fri, 08 May 2009 03:14 Go to previous messageGo to next message
BG is currently offline BGFriend
Messages: 45
Registered: July 2009
Member
Hi,
If you want to show the child again back. Then go one level up obtain the
view from the parent editpart. Then obtain the child views and filter out
and obtain the view to be unhidden.

Regards
Byre
Re: Help with hiding node [message #229327 is a reply to message #229242] Mon, 11 May 2009 08:46 Go to previous message
Giordano is currently offline GiordanoFriend
Messages: 21
Registered: July 2009
Junior Member
thank you very much!!!! It's working!! ;)
Previous Topic:Problem with plugin-feature
Next Topic:convert gef editor to gmf, performance with large diagrams
Goto Forum:
  


Current Time: Wed Apr 24 23:25:54 GMT 2024

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

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

Back to the top