Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Loading Multiple Diagram Editor Plugins
Loading Multiple Diagram Editor Plugins [message #203874] Fri, 29 August 2008 13:09 Go to next message
Maurice O'Connor is currently offline Maurice O'ConnorFriend
Messages: 86
Registered: July 2009
Member
Heya, just want to check this is doable.

I have two GMF diagram plugins and I would like to load them in the same
runtime, should this be possible?

At present, one works when the other is shut down and vice versa, but they
will not run correctly together.

Thanks!

Maurice
Re: Loading Multiple Diagram Editor Plugins [message #203947 is a reply to message #203874] Mon, 01 September 2008 06:42 Go to previous messageGo to next message
Seweryn Niemiec is currently offline Seweryn NiemiecFriend
Messages: 80
Registered: July 2009
Member
Maurice O'Connor wrote:
> Heya, just want to check this is doable.

Generally this is doable. Fore more details you have to tell something
more about those editors.

--
Greetings,
Seweryn
Re: Loading Multiple Diagram Editor Plugins [message #204082 is a reply to message #203947] Mon, 01 September 2008 12:41 Go to previous messageGo to next message
Maurice O'Connor is currently offline Maurice O'ConnorFriend
Messages: 86
Registered: July 2009
Member
Seweryn Niemiec wrote:

> Maurice O'Connor wrote:
>> Heya, just want to check this is doable.
>
> Generally this is doable. Fore more details you have to tell something
> more about those editors.

Well, both editors are set to use to same package, but operate on files
with different extensions, ie. in the plugin.xml for each diagram project,
I have:

<package
uri = "http://my.url.ie/#2_0"
class = "My.Package"
genModel = "model/my.genmodel" />

This causes a clash if I load both package plugins at once, but since
they're the same, I just load one. Is that ok?

Maurice
Re: Loading Multiple Diagram Editor Plugins [message #204140 is a reply to message #204082] Tue, 02 September 2008 09:43 Go to previous messageGo to next message
Seweryn Niemiec is currently offline Seweryn NiemiecFriend
Messages: 80
Registered: July 2009
Member
Maurice O'Connor wrote:
> Seweryn Niemiec wrote:
>
>> Maurice O'Connor wrote:
>>> Heya, just want to check this is doable.
>>
>> Generally this is doable. Fore more details you have to tell something
>> more about those editors.
>
> Well, both editors are set to use to same package, but operate on files
> with different extensions, ie. in the plugin.xml for each diagram
> project, I have:
>
> <package uri = "http://my.url.ie/#2_0" class = "My.Package"
> genModel = "model/my.genmodel" />

as a "package" you mean a "semantic model or domain model"?

I don't understand what you try to do exactly, but If you want to have
two diagram editors operating on same semantic model, then you should
take a look at taipan example and (it's in the eclipse.org CVS) and
read this
http://wiki.eclipse.org/GMF_Tips#Sharing_single_EditingDomai n_instance_across_several_diagrams

--
Greetings,
Seweryn
Re: Loading Multiple Diagram Editor Plugins [message #204336 is a reply to message #204140] Wed, 03 September 2008 18:45 Go to previous messageGo to next message
Maurice O'Connor is currently offline Maurice O'ConnorFriend
Messages: 86
Registered: July 2009
Member
Seweryn Niemiec wrote:
> as a "package" you mean a "semantic model or domain model"?

I have separate model files for each diagram editor, with a different
extension for each. However, they both work off the same generated
package. Eg, the generated code from the genmodel, in mypackage,
mypackage.impl and mypackage.util is exactly the same for both. Same for
the .edit project, obviously.

> I don't understand what you try to do exactly, but If you want to have
> two diagram editors operating on same semantic model, then you should
> take a look at taipan example and (it's in the eclipse.org CVS) and
> read this
>

I'm not looking to share the same EditingDomain between diagrams.

My problem is that when I open both diagrams, one reads its model
correctly, but the other does not. It goes like this:

diagram.foo_diagram loads and I see EditParts of type A, B and C, as I
should.

diagram.bar_diagram loads and I see EditParts of type A, B and C, when I
should seeits own Editparts, of type D and E. I can't use the palette to
add elements when this happens.

Both diagrams have different Editor ID's on the runtime workbench and
different contributing plugins. I verified this using Plugin-Spy. This is
as you'd expect.

There are no errors or messages in the runtime Eclipse log. The binding
context listed in elementTypeBindings in plugin.xml is also different
between the two diagrams, with different elementTypes listed for each one.

If I load each diagram plugin individually into my runtime instance, they
both work as expected. It's when they both are loaded together that things
mess up. Seems like there's some kind of clash going on with how one
diagram reads its displayed EditPart types. It decides to display the ones
from the other diagram instead of its own.

I'd be grateful for any tips about which bits of code to look at to remedy
this!

Thanks,

Maurice
Re: Loading Multiple Diagram Editor Plugins [message #204606 is a reply to message #204336] Fri, 05 September 2008 16:05 Go to previous message
Maurice O'Connor is currently offline Maurice O'ConnorFriend
Messages: 86
Registered: July 2009
Member
Got back to this and after some further hacking about got it working. I
changed the model ID on both of my genmodel files, giving a different one
for each model and regenerated. This seems to have solved the issue. I
can't really see why, as one of the model plugins wasn't actually being
loaded anyway, so there shouldn't have been any possibility of a clash...

Maurice
Previous Topic:Using own EditorInput for generated (Bpmn)DiagramEditor
Next Topic:label not updated after edited
Goto Forum:
  


Current Time: Fri Mar 29 07:20:55 GMT 2024

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

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

Back to the top