I've tried to use this example of the RASCAL documentation: http://tutor.rascal-mpl.org/Rascal/Libraries/util/IDE/Menus/Menus.html#/Rascal/Libraries/util/IDE/IDE.html
After registering the language and annotator nothing happens.
My goal is to build out this example to register some menu items for java files which could startup a RASCAL visualization or report.
Any help is appreciated.
Steps to reproduce:
- Start Rascal console in Eclipse
- type
import util::IDE;
- type
import ParseTree;
- type
m1 = popup(menu("MyMenu", [action("Example item", void (Tree t, loc s) { println("<t> @ <s>");})]));
- type
registerContributions("abc",{m1});
I expect a new menu item 'MyMenu' in the Eclipse IDE when I open a *.abc file. I don't know where it should popup, the documentation doesn't tell where the menuitem should show up.
rascal>import util::IDE;
ok
rascal>import ParseTree;
ok
rascal>m1 = popup(menu("MyMenu", [action("Example item", void (Tree t, loc s) { println("<t> @ <s>");})]));
Contribution: popup(menu(
"MyMenu",
[action("Example item",function(|prompt:///|(50,45,<1,50>,<1,95>)))]))
rascal>registerContributions("abc",{m1});
ok
rascal>registerContributions("rsc",{m1});