Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Multiple diagram editors, same model.
Multiple diagram editors, same model. [message #203532] Wed, 27 August 2008 14:39 Go to next message
Maurice O'Connor is currently offline Maurice O'ConnorFriend
Messages: 86
Registered: July 2009
Member
Hi, I have two diagrams based on the same underlying ecore model. I notice
this in plugin.xml for both:

<extension point="org.eclipse.emf.ecore.generated_package">
<package
uri = "http://my.uri.ie/#2_0"
.... other stuff ... />
</extension>

And this in my generated java:

MyFactory MyFactory =
(MyFactory)EPackage.Registry.INSTANCE.getEFactory("http://my.url.ie/#2_0");

So, when Eclipse loads I get a problem, as both diagrams register on the
same URI and clash, then I can't open one to edit the model. They're
supposed to be different editors for the same model. Is there a way to use
multiple diagrams off the same model, or should I be considering a
different approach, perhaps changing the code to use the same generated
packages in both cases, or changing the URI?

Thanks!

Maurice
Re: Multiple diagram editors, same model. [message #203551 is a reply to message #203532] Wed, 27 August 2008 15:01 Go to previous messageGo to next message
Maurice O'Connor is currently offline Maurice O'ConnorFriend
Messages: 86
Registered: July 2009
Member
Forget it! I had different package names for each model, will make these
the same and it won't matter whether they register on the same URI or not,
because they'll be exactly the same when generated.

Thanks,

Maurice
Re: Multiple diagram editors, same model. [message #203689 is a reply to message #203551] Thu, 28 August 2008 15:06 Go to previous messageGo to next message
Maurice O'Connor is currently offline Maurice O'ConnorFriend
Messages: 86
Registered: July 2009
Member
Maurice O'Connor wrote:

> Forget it! I had different package names for each model, will make these
> the same and it won't matter whether they register on the same URI or not,
> because they'll be exactly the same when generated.

Hey, I'm going to reopen this distress call, as these diagrams aren't
working for me. Currently both diagrams are reliant on the same underlying
model, package and plugins (so both diagrams depend on myproject.edit,
myproject.editor and myproject). However, when I open them seperately in
my runtime, one of them doesn't work (can't add new EditParts via the Tool
palette on one, and it doesn't display anything from the model). There are
no problems in my Eclipse development environment.

I found this blog entry on the subject:
http://koehnlein.blogspot.com/2008/02/advanced-gmf.html

"Support for non-canonical diagrams (multiple diagrams for the same
semantic model)"

Can GMF actually do this, or will it require a lot of hacking to work?

Thanks!

Maurice
Re: Multiple diagram editors, same model. [message #204823 is a reply to message #203689] Tue, 09 September 2008 16:04 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Maurice O'Connor,

See http://wiki.eclipse.org/GMF_GenModel_Hints. You have to search for "unique"
word in this document and modify both .gmfgen models to make corresponding
properties actually unique.

-----------------
Alex Shatalin
Previous Topic:Tooltip type display for Node?
Next Topic:Child Reference containment/reference problem
Goto Forum:
  


Current Time: Fri Apr 26 13:55:05 GMT 2024

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

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

Back to the top