Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to implement auto-filling compartments?
How to implement auto-filling compartments? [message #184306] Fri, 25 April 2008 10:57
Eclipse UserFriend
Originally posted by: matthias.schmidt.xactium.com

Hello everybody,

I'm trying to implement a GMF tool for a simple model containing two
classes. A Usage class and a Component class. The Usage references the
Component via a composition called 'uses'.
There a connections between the usages and potentially different
subclasses of component but that's not important at the minute.

The idea now is to show a node in the diagram which is an instance of a
the Usage class. This node should contain an instance of Component as a
compartment element.

To hide the fact that there is a Usage wrapping the Component the tool
should come up with a dialog whenever the user drags a new Usage node on
the diagram. This dialog would present a list of existing components and
would give the user the opportunity the create a new one.

The hole Usage-Component stuff was created to be able to show two nodes
in the diagram which point to the same(!) underlying concept. So when
the user edits one of them the other one gets updated.

....

I managed to generate the basic GMF tool with a top node for Usages
containing a child node for Components. I've implemented the dialog
which contains a sample catalog of Components and provides the user with
a facility to create a new one.

I'm editing the diagram using the model code generated by the .genmodel
and I use the according FactoryImpl class to create new instances.
Everything works fine, but:

I can't assign the same component to two usages!!
And I still don't know how to open the dialog upon the drag-in event. At
the minute I'm using the right click context menu of the Usage.


Especially the first problem drives me crazy. Does anybody have an idea
how to solve that? I'm completely at my wits' end! :-/


Quite a long text - sorry about that. :)
Thanks in advance!

Matthias
Previous Topic:Integrating GMF plugin to an exist RCP
Next Topic:multiline WrapLabel?
Goto Forum:
  


Current Time: Thu Apr 25 06:29:06 GMT 2024

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

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

Back to the top