2 Replies Latest reply on Mar 25, 2016 11:31 AM by George Gastaldi

    How to "report" to the user in an add-on ?

    Clement Escoffier Newbie



      I'm building an add-on and I would like to know what's the best way to "report" to the user. Report in the sense of notifying the user of what's going on. Right know I'm using System.out, but I'm not sure it's the right way.


      Second (related) question, what's the best way for an add on to log messages ?



        • 1. Re: How to "report" to the user in an add-on ?
          Jim Riley Newbie

          I am a newbie, but you might try using the ProgressMonitor



            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


               // finished another item


                progressMonitor.subTask("another subtask  ");

              // finished the third and for my example the last item.



          • 2. Re: How to "report" to the user in an add-on ?
            George Gastaldi Master

            That's right Jim. This is the best way to display progress when executing a command.