use of eu.esdihumboldt.hale.ui.function.contribution.internal.SetPriorityAction in project hale by halestudio.
the class SetPriorityContribution method fill.
/**
* @see AbstractFunctionWizardContribution#fill(Menu, int)
*/
@Override
public void fill(Menu menu, int index) {
if (getOriginalCell() == null)
return;
AlignmentService alignmentService = PlatformUI.getWorkbench().getService(AlignmentService.class);
Cell cell = getOriginalCell();
Priority oldPriority = cell.getPriority();
for (Priority priority : Priority.values()) {
if (priority != oldPriority) {
SetPriorityAction setPriorityAction = new SetPriorityAction(priority, cell.getId(), alignmentService);
IContributionItem item = new ActionContributionItem(setPriorityAction);
item.fill(menu, index++);
}
}
}
Aggregations