Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » multiple editors modeling
multiple editors modeling [message #175478] Tue, 04 March 2008 12:08 Go to next message
Eclipse UserFriend
Originally posted by: marsha.rohrer.swisscom.com

Hi,

I have the following problem.

I have defined a graphical editor, with a root element. For that editor
everything works fine.
What I now want is a second editor that may load several models of the
first type (i.e. the root element of those models), and a linker that is
able to link the loaded models.

What I tried so far:
I extended the existing ecore model to support that fact. Then I created
two graphical editors with distinct editing domains. I took one of my
existing 1st_diagram files and tried to initialize a 2nd_diagram file. The
problem here is that the root element of the 2nd diagram file is
hierarchically above the root element for the 1st diagram, since the 2nd
one should load several root elements from the 1st diagram. Because of
that I can't select the root element for the 2nd diagram to be initialized.

My question is now how I can best achieve this, respecting the framework,
the 2nd model should look something like this
<2nd root element>
<1st root element>
.... a loaded model
</1st root element>
.
.
.
<1st root element>
.... a loaded model
</1st root element>
<first element linker source="xyz" target="abc"/>
.
.
.
<first element linker source="xyz" target="abc"/>
</2nd root element>

Where as already said the 1st diagram elements are loaded and the linkers
are drawn with the second editor.

My questions:
Do I have to use one or two ecore models?
How can I go up in the hierarchy of root elements?
Do I have to do it programatically or is there a way in the config files?

I am thankfull for every hint...

Thank you,
Marsha
Re: multiple editors modeling [message #175533 is a reply to message #175478] Tue, 04 March 2008 13:56 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Marsha,

I think you can use one .ecore model.
Try starting with the diagram for 2nd root element, create it, create several
1st root elements on it, save it.
The you should be able to initialize 1st diagram using the same model file
(from the popup menu) by choosing proper rood element for the diagram.

-----------------
Alex Shatalin
Re: multiple editors modeling [message #175567 is a reply to message #175533] Tue, 04 March 2008 14:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marsha.rohrer.swisscom.com

Hi,

The problem is that the 1st editor has to be the starting point. But the
idea I had just now is to use the same ecore model but different domain
file extensions. What should be visualized in the 2nd editor has to be
evaluated with an external mechanism anyway. Once I have the domain file
for the 2nd editor I can easily open it using the standart Initialize
2nd_diagram diagram file action.

Thank you for your help.

Marsha
Re: multiple editors modeling [message #175614 is a reply to message #175478] Tue, 04 March 2008 15:38 Go to previous message
Eclipse UserFriend
Originally posted by: marsha.rohrer.swisscom.com

Hi,

I have another question related to this.

In the graphical definition of my 2nd editor I only defined the root
element and the linker object which points to the elements from the 1st
editor that need to be linked.

How can I display the 1st editor graphical models in the 2nd editor? They
shouldn't be editable. All the user can do is adding those linkers.

Do I have to use the same graphical definition and add the linker and the
2nd editors root element but using a reduced palette? But in that case the
elements already shown still will be editable no?
Is it possible to show them grayish, so that the user intuitivly sees that
he can't change those elements?
Previous Topic:CustomModificationListener missing??
Next Topic:MultiPageEditor and ElementBinding (Dynamic editing domain ID)
Goto Forum:
  


Current Time: Wed Sep 25 02:54:42 GMT 2024

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

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

Back to the top