|Don't understand Eclipse - MVC, yet [message #677823]
||Thu, 09 June 2011 13:40
| Bjoern Ickx
Registered: June 2011
Hello together, |
I don't really get into it how to correctly interact between views/editors etc. and the corresponding controllers or handlers.
In my case I have a TreeViewer (view) which shows the open projects. With a context menu on a selected project - the command "deleProject" can be triggered that deletes the selected project, with the help of the corresponding "deleteProjectHandler" (controller !?).
Now I don't really know how to update the view, namely the treeviewer. I couldn't find a adequate listener that can be used by the view.
View --> Controller: with the use of commands
Controller --> View: ??
In my opinion the "deleteProjectHandler" need to get the instance of the "treeViewer" and triggering the refresh method. But what is the best way to get the corresponding instance of the view?
Its really hard to get into the eclipse framework as a eclipse framework newbie. The documentation is really indifferent with a wild mixture of conecpts like commands and actions. And even the snippets or examples are still using actions even though they are deprecated. Figuring out simple things like context menus (e.g. with the use of commands and menuContributions) need way to much time to get into it. My last ten days were just searching, searching, searching the internet and try and error. Making it hard for newbies is not a good thing for frameworks in general.
[Updated on: Thu, 09 June 2011 13:43]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.23980 seconds