| [news.eclipse.tools.gef] Re: Custom view and ... ?? |
Cheers, Greg
Greg wrote:
I've created a custom view for my Graphical Plugin Editor in Eclipse.
Then I've added a my Custom Viwer to it. It creates a form using SWT for element properties. Using SelectionListener nicely it hookes in GraphicalEditor and getProperties from element and display this in a View. My problem is ... how to make it work other way around??????
When I type new things in my Form Text Boxes HOW TO REFLECT CHANGES IN A MODEL.
Well, you just change your model (model.setXxx(), or whatever kind of model you're using). If you're doing it the preferred way, your model has a notification mechanism so the GraphicalEditor will notice the model's changes and update its appearance. It's really very specific to your model. Take a look at the Model-View-Controller design pattern if this doesn't make much sense to you.
Good luck,
Martijn.