Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Multipage editor - diplay different page as a different element type is selected
Multipage editor - diplay different page as a different element type is selected [message #426871] Thu, 22 January 2009 23:16 Go to next message
Tiago is currently offline TiagoFriend
Messages: 11
Registered: July 2009
Junior Member
Hello,

My name is Tiago, and starting in use the EMF framework.

I have to build a graphical interface to build models to describe
environmental systems. I already build my model (ecore) and generate
the editor with EMF. But I want to display a different page as different
elements are selected.

For all model the selecion page will be displayed as the main page. A
secondary page will be displayed in response to the type of selected
element. For example, if the element selected is of type one, the page
will be a text editor, if the element selected is of type two, the page
that will be displayed will be a graphical editor, and so on.

How can I do this?

Thanks
Tiago Lima
Re: Multipage editor - diplay different page as a different element type is selected [message #426873 is a reply to message #426871] Fri, 23 January 2009 03:18 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Tiago,

Comments below.

Tiago wrote:
> Hello,
>
> My name is Tiago, and starting in use the EMF framework.
>
> I have to build a graphical interface to build models to describe
> environmental systems. I already build my model (ecore) and generate
> the editor with EMF. But I want to display a different page as
> different elements are selected.
> For all model the selecion page will be displayed as the main page. A
> secondary page will be displayed in response to the type of selected
> element. For example, if the element selected is of type one, the page
> will be a text editor, if the element selected is of type two, the
> page that will be displayed will be a graphical editor, and so on.
>
> How can I do this?
It sounds like as the selection changes you could dispose the page
currently being shown for the previous selection and create controls for
a new page. It's not really so much an EMF question so perhaps better
asked on the platform newsgroup...
>
> Thanks
> Tiago Lima
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Multipage editor - diplay different page as a different element type is selected [message #426889 is a reply to message #426871] Fri, 23 January 2009 14:25 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
On 1/22/2009 6:16 PM, Tiago wrote:
> Hello,
>
> My name is Tiago, and starting in use the EMF framework.
>
> I have to build a graphical interface to build models to describe
> environmental systems. I already build my model (ecore) and generate
> the editor with EMF. But I want to display a different page as different
> elements are selected.
> For all model the selecion page will be displayed as the main page. A
> secondary page will be displayed in response to the type of selected
> element. For example, if the element selected is of type one, the page
> will be a text editor, if the element selected is of type two, the page
> that will be displayed will be a graphical editor, and so on.
>
> How can I do this?

This sounds like a classic master-details situation. The Eclipse Forms
and Data Binding frameworks even have direct support for it, because it
is a common GUI pattern.
The Eclipse Forms article
(http://www.eclipse.org/articles/Article-Forms/article.html) has a
section about it and using the built-in class MasterDetailsBlock.
You can get the code for the Forms examples in Eclipse CVS:
http://wiki.eclipse.org/index.php/CVS_Howto
(if you want to check out the code, it is in a project named
"org.eclipse.ui.forms.examples" in the Eclipse CVS repository (see
http://wiki.eclipse.org/index.php/CVS_Howto)

It is also not too hard to build something similar on your own, by
looking at how MasterDetailsBlock is structured.

Hope this helps,
Eric
Previous Topic:Question about xsd-->java transformation
Next Topic:Win the New EMF Book
Goto Forum:
  


Current Time: Tue Apr 23 11:40:25 GMT 2024

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

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

Back to the top