* </ul>
*/
@Override
protected IContributionItem[] getContributionItems() {
if( items == null ){
OperationMenuFactory factory = UiPlugin.getDefault().getOperationMenuFactory();
List<IContributionItem> list = factory.createContributionItems( categoryId );
if( list.size() == 0 ){
items = new IContributionItem[0];
}
else if( list.size() == 1 ){
items = list.toArray( new IContributionItem[list.size()]);
}
else {
OperationCategory category = factory.findCategory( categoryId );
MenuManager subMenu = new MenuManager( category.getMenuText(), category.getId() );
for( IContributionItem item : list ){
subMenu.add( item );
}
items = new IContributionItem[]{ subMenu, };