newAdditionsActionsArray[2] = getActionRegistry().getAction(
AddDynamFormAsChildAction.ACTION_ID);
newAdditionsActionsArray[3] = getActionRegistry().getAction(
AddFermataFormAsChildAction.ACTION_ID);
SubmenuAction submenuContainer = new SubmenuAction(
newContainerActionsArray, MusicMessages.MusicContextMenuProvider_0,
MusicMessages.MusicContextMenuProvider_1,
ImageDescriptor.createFromImage(HelperMethods
.createImage("icons/icon-section.gif")), true); //$NON-NLS-1$
if (submenuContainer.getActiveOperationCount() > 0)
manager.appendToGroup(GEFActionConstants.GROUP_REST,
submenuContainer);
SubmenuAction submenuEvent = new SubmenuAction(newEventActionsArray,
MusicMessages.MusicContextMenuProvider_3, MusicMessages.MusicContextMenuProvider_1,
ImageDescriptor.createFromImage(HelperMethods
.createImage("icons/icon-note.gif")), true); //$NON-NLS-1$
if (submenuEvent.getActiveOperationCount() > 0)
manager.appendToGroup(GEFActionConstants.GROUP_REST, submenuEvent);
SubmenuAction submenuVariant = new SubmenuAction(
newVariantActionsArray, MusicMessages.MusicContextMenuProvider_6,
MusicMessages.MusicContextMenuProvider_1,
ImageDescriptor.createFromImage(HelperMethods
.createImage("icons/icon-apparatus.gif")), true); //$NON-NLS-1$
if (submenuVariant.getActiveOperationCount() > 0)
manager.appendToGroup(GEFActionConstants.GROUP_REST, submenuVariant);
SubmenuAction submenuStaves = new SubmenuAction(newStavesActionsArray,
MusicMessages.MusicContextMenuProvider_9, MusicMessages.MusicContextMenuProvider_1,
ImageDescriptor.createFromImage(HelperMethods
.createImage("icons/icon-score.gif")), true); //$NON-NLS-1$
if (submenuStaves.getActiveOperationCount() > 0)
manager.appendToGroup(GEFActionConstants.GROUP_REST, submenuStaves);
SubmenuAction submenuAdditions = new SubmenuAction(newAdditionsActionsArray,
MusicMessages.MusicContextMenuProvider_2, MusicMessages.MusicContextMenuProvider_4,
ImageDescriptor.createFromImage(HelperMethods
.createImage("icons/icon-dynam.png")), true); //$NON-NLS-1$
if (submenuAdditions.getActiveOperationCount() > 0)
manager.appendToGroup(GEFActionConstants.GROUP_REST, submenuAdditions);
action = getActionRegistry().getAction(RelabelMeasuresAction.ACTION_ID);
if(action.isEnabled())
manager.appendToGroup(GEFActionConstants.GROUP_REST, action);