Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Model-View-Controller Question
Model-View-Controller Question [message #150488] Fri, 10 September 2004 16:34
Eclipse UserFriend
Originally posted by: patrick.sirr.embarcadero.com

Hello - I understand the GEF MVC model. I have a problem though that I
can't fit into that archetecture. I was hoping for some help.

Normal MVC :
User Grabs a figure with the mouse
Figure's EditPart is queried for a command using a request.
The EditPart's installed policies fulfil that request for a command
Command is executed changing the Model
The Model sends a property change (ie location) to the listenters (ie the
EditPart)
The Edit part receives and says 'updateVisuals' to get the figure to update.

Here's my situation. Anyone have any ideas on how to fit this into the MVC
paradigm? :
User hits the SWT.INSERT key on the diagram
The insert key is received and a command is created and executed to create a
new model element
Problem -> Within that command I'd like to position the new figure in the
center of the diagram. My problem is though that I've created the new model
element and I know that it's first listener is the EditPart I need, but
casting that first listener to an EditPart violates MVC. How can I get the
figure created by the step above and position it without violating MVC?

Thanks!

Patrick
Previous Topic:Problems with PaletteDrawer
Next Topic:Where I can find org.eclipse.ui.part?
Goto Forum:
  


Current Time: Thu Apr 25 23:48:07 GMT 2024

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

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

Back to the top