|
|
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 |
Eric Rizzo 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
|
|
|
Powered by
FUDForum. Page generated in 0.50212 seconds