|
|
|
Re: AbstractSaveableTreeView 0.5.1 [message #1712379 is a reply to message #1712318] |
Fri, 23 October 2015 12:21  |
|
On 23/10/2015 00:49, John Conlon wrote:
> Sorry for the format problems code snippet should be:
>
>
> class MasterTreeView extends AbstractSaveableTreeView {
> protected List<Action> actions = new ArrayList<Action>();
> private RemoveAllViewSelectorsAction removeAllViewerSelectors;
> private OCLFilterSelectionAction oclFilterSelectionAction;
>
> @Override
> public void menuAboutToShow(IMenuManager manager) {
> super.menuAboutToShow(manager);
> manager.add(removeAllViewerSelectors);
>
> }
>
Hi John
as described in the migration guide, we changed the context menu
handling to make it easier; in particular, it should be easier to
customize the context menu in the DSL.
Can you implement the actions with the DSL section?
If you can't, and you really want to manage the menu yourself, I think
you can still retrieve the Menu of the underlying viewer:
viewer.getControl().getMenu()
and then create a new menu menager on top of that. (You can get
inspiration from ViewerContextMenuHelper).
It might also be worthwhile to reintroduce some API in our views to get
access to the menu manager... in that case, please file a bug.
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
Powered by
FUDForum. Page generated in 0.02375 seconds