Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to hide view for some model elements
How to hide view for some model elements [message #204421] Thu, 04 September 2008 15:33 Go to next message
Eclipse UserFriend
Originally posted by: a.rahman.distilinteractive.com

Hi,

I have an GMF generated editor, that is working fine with models some thing
like this:

<Library>
<Book>
<Author>
<Address>
<City></City>
<State></State>
</Address>
</Author>
</Book>
</Library>

Now, I don't want to regernerate the code, but want to hide view for
Address, city, state, i.e. every thing that goes under Address.
Any hints is appreciated to where to change the generated code.

Thanks,
Anisur.
Re: How to hide view for some model elements [message #205018 is a reply to message #204421] Wed, 10 September 2008 07:21 Go to previous messageGo to next message
Eclipse UserFriend
Hello Anisur,

You can call org.eclipse.gmf.runtime.notation.View.setVisible(false) for
any diagram elements to hide them. This code can be added into custom popup
menu action..

-----------------
Alex Shatalin
Re: How to hide view for some model elements [message #205585 is a reply to message #205018] Tue, 16 September 2008 10:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: a.rahman.distilinteractive.com

Thanks Alex. Actually, my question was how to change the code, so that the
edit part and view will be created for one of the model, and to prevent the
creation of edit part and view for the model with aggregation relation.

I have done that by generating a simpler editor twice and by comaring the
difference. Most of the work was done in ...EditPartFactory,
...VisualIDRegistry, ..ElementTypes, ...ParserProvider, ..ViewProvider,
....DiagramUpdater.

May be I could save some time, knowing which part is optional.

Thanks,
Anisur.


"Alex Shatalin" <vano@borland.com> wrote in message
news:3c3172e6266c08cae15f425c6f0d@news.eclipse.org...
> Hello Anisur,
>
> You can call org.eclipse.gmf.runtime.notation.View.setVisible(false) for
> any diagram elements to hide them. This code can be added into custom
> popup menu action..
>
> -----------------
> Alex Shatalin
>
>
Re: How to hide view for some model elements [message #205636 is a reply to message #205585] Wed, 17 September 2008 06:37 Go to previous message
Eclipse UserFriend
Hello Anisur,

Well, i think you can change only ..VisualIDRegistry the rest is not so necessary.

-----------------
Alex Shatalin
Previous Topic:Experiences with Eclipse 3.4 / GMF 2.1
Next Topic:Connection EditPart not showing
Goto Forum:
  


Current Time: Wed May 07 05:08:12 EDT 2025

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

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

Back to the top