I have an implementation of CompoundContributionItem
that I want to get to work in an pure E4 application. I found some kind of documentation for other IContributionItem
s, but not for this one.
What's the mechanism for implementing CompoundContributionItem
in E4?
It's done via the @AboutToShow
annotation:
public class PluginEnablementContributionItem {
@AboutToShow
public void aboutToShow(List<MMenuElement> items) {
MDirectMenuItem item = MMenuFactory.INSTANCE.createDirectMenuItem();
item.setLabel("My Menu Item");
item.setContributorURI("platform:/plugin/org.acme.project");
item.setContributionURI("bundleclass://org.acme.project/org.acme.project.MyHandler");
items.add(item);
}
}