[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Editor doesn't recognizes model changes.

Hello Cayla,

Iâve re-read whole thread and now I can suggest you the following:
1. I think you have to override setInput(IWorkbenchPart part, ISelection selection) in your implementation of PropertySection. Looks like this method will be called on then diagram selection is changed, so you can get currently selected on diagram EMF element and create appropriate set of vehicles in this section. I think first of all you can remove (by calling Widget.dispose()) all the obsolete widgets and then create appropriate SWT widgets representing proper set of vehicles inside a parent composite.


2. In the same method you can add EMF listener to the Location element and update SWT widgets in accordance with current set of vehicles attached to the selected Location element. This is a way to make visible set of vehicles up to date with the model contents (then you press âaddâ button).

3. Due to the org.eclipse.ui.views.properties.tabbed.propertySections extension point description you have to use AbstractPropertySection as a super-class for your PropertySection implementation. Sometimes you can find it useful to extend one of the GMF runtime classes (AbstractModelerPropertySection/AdvancedPropertySection) in this case you probably have to âplug inâ my suggestions into the existing API from runtime, but in general idea should still be the same â remove/create widgets on changing active element and update set of widgets on appropriate EMF notification from currently selected element.

-----------------
Alex Shatalin