This content has been marked as final.
Show 2 replies
-
1. Re: How to "report" to the user in an add-on ?
jim.riley Mar 25, 2016 11:27 AM (in response to clement.escoffier)I am a newbie, but you might try using the ProgressMonitor
@Override
public Result execute(UIExecutionContext context) throws Exception {
ProgressMonitor progressMonitor = context.getProgressMonitor();
int numberOfWorkItems = 3
progressMonitor.beginTask("Do stuff", numberOfWorkItems );
progressMonitor.subTask("optional subtask ");
// finished one item
progressMonitor.worked(1);
// finished another item
progressMonitor.worked(1);
progressMonitor.subTask("another subtask ");
// finished the third and for my example the last item.
progressMonitor.worked(1);
progressMonitor.done();
-
2. Re: How to "report" to the user in an add-on ?
gastaldi Mar 25, 2016 11:31 AM (in response to jim.riley)That's right Jim. This is the best way to display progress when executing a command.