NB 8.1 ProgressBar not working

Werner Schulte <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
Hi all.

I know it might be a boaring question, but I cannot get my application 
showing the Progress for a longer lasting action.

When reading the projects content, the progress bar is shown correctly 
and finished with ProgressHandle.finish.

When the project is open next I eventually call an action which iterates 
thru the data and executes long lasting code.
I want  to show a progress bar for this as well, but it does not show up 
at all.

Have read a lot of comments, but cannot find any useful hints to fix this.

Note that the code is executed in is own module (tools) which has no GUI 
at all.
As far as I understand this should not have any influence on the 
ProgressBar execution ?

Any point to blog, FAQ or other hints would be most welcome.

Here is the code ...

         Runnable tsk = new Runnable() {
             @Override
             public void run() {
                 final ProgressHandle prog = 
ProgressHandleFactory.createHandle("Make " + ecus.size() + " ECUs 
ServiceInfo" );
                 prog.setInitialDelay(1);
                 prog.start( ecus.size() );
                 for (int i = 0; i < ecus.size(); i++) {
                     IODXECU get = ecus.get(i);
                     ECUInfo e = doFullECU(get);
                     if (e == null) {
                         LOG.error("doAllECUs(" + project.getName() + ") 
- ECU[[" + get.getShortName() + "] Conversion NOK. Continue");
                         continue;
                     }
                     leinfo.add(e);
                     prog.progress("ECU[" + i + "][" + 
get.getShortName() + "]", i);
                     prog.progress( i);
                     try {
                         Thread.sleep(200);
                     } catch (InterruptedException ex) {
                     }
                 }
                 prog.finish();
                 if (LOG.isInfoEnabled()) {
                     LOG.info("doOneProject - [" + project.getName() + 
"] - FINISHED");
                 }


             }
         };
         RequestProcessor rp = new RequestProcessor();
         tproc = rp.post(tsk);
         tproc.waitFinished();

Best regards

Werner
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.