Skip to content
Snippets Groups Projects
Commit 0f3ce5e2 authored by Michael Leuschel's avatar Michael Leuschel
Browse files

improve operations popup menu for large nr of events

custom guard and parameter dialog entries at top
for large number of events
parent c3fd2bf7
No related branches found
No related tags found
No related merge requests found
...@@ -31,12 +31,15 @@ public class ParameterMenu extends ExtensionContributionFactory { ...@@ -31,12 +31,15 @@ public class ParameterMenu extends ExtensionContributionFactory {
nondetcounter = 0; nondetcounter = 0;
if (operations.size()<=10) {
// if number of operations small: show enabled operations first
for (Operation operation : operations) { for (Operation operation : operations) {
long id = operation.getId(); long id = operation.getId();
additions.addContributionItem( additions.addContributionItem(
createEntry(serviceLocator, operation, id), null); createEntry(serviceLocator, operation, id), null);
} }
}
CommandContributionItemParameter contributionParameters = new CommandContributionItemParameter( CommandContributionItemParameter contributionParameters = new CommandContributionItemParameter(
serviceLocator, "", "de.prob.ui.show_parameter_dialog", serviceLocator, "", "de.prob.ui.show_parameter_dialog",
...@@ -54,6 +57,17 @@ public class ParameterMenu extends ExtensionContributionFactory { ...@@ -54,6 +57,17 @@ public class ParameterMenu extends ExtensionContributionFactory {
contributionCustomGuard); contributionCustomGuard);
additions.addContributionItem(customGuardDialogItem, null); additions.addContributionItem(customGuardDialogItem, null);
if (operations.size()>10) {
// if number of operations large: show enabled operations last
// TODO: nested view according to parameters or group entries together into submenus of 20 operations or so
for (Operation operation : operations) {
long id = operation.getId();
additions.addContributionItem(
createEntry(serviceLocator, operation, id), null);
}
}
} }
private CommandContributionItem createEntry( private CommandContributionItem createEntry(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment