Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Modify creation tool: Create element in conteiner of its container
Modify creation tool: Create element in conteiner of its container [message #501095] Tue, 01 December 2009 00:53
No real name is currently offline No real nameFriend
Messages: 62
Registered: July 2009
Member
Hi,

I am trying to implement a special creation tool. Usually, when using
such a tool, you have to point the mouse over the compartment of the
parent of the element which is created by the tool. I would like to
modify the tool in a way that it is only necessary to point to the
compartment of one of the element's containers and when doing so, if the
containers inbetween do not exist, to create them before creating the
actual element the creation tool is meant for.

To clarify:
Assume, we have an element House, which can contain elements of the
class Room, which in turn can contain elements of the class Furniture.
Usually, I would select the furniture creation tool, move the mouse over
an existing Room until the cursor shows a little plus and then click
to add a Furniture to the Room.

I'd like my tool to work this way:
I select the furniture creation tool, move the mouse over a House
without Rooms and left-click. Then a new Room is created along with a
new Furniture in it. If I move the mouse over a Room, no additional Room
is created, but only the furniture.

So I have to somehow change which elements can be affected by the tool
and what elements are created when using it.

Can you tell me where I should start?

Thanks,
Matthias
Previous Topic:Diagram partitioning -- Changes in one sub-diagram cause changes in another sub-diagram!?
Next Topic:DnD
Goto Forum:
  


Current Time: Thu Apr 25 12:07:12 GMT 2024

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

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

Back to the top