0

I have an Eclipse RCP application that's using ProgressMonitors to provide continuous feedback to the user. All worked fine since a few days ago when suddenly all ProgressMonitors used in the application failed to show up.

IProgressMonitor monitor = Job.getJobManager().createProgressGroup()
Job jobMain = new Job("Initializing ...") {
    @Override 
    protected IStatus run(final IProgressMonitor monitor) {
        monitor.beginTask("doing stuff", 100); 
        // DO STUFF  
        return Status.OK_STATUS; 
    }
}; 
jobMain.setUser(true); 
jobMain.setProgressGroup(monitor, 100); 
jobMain.schedule(); 

Is this an Eclipse issue? Has anyone ever had that problem that no Progress Dialogs showed anymore?

pmax1
  • 226
  • 1
  • 4
  • 17
  • What class do you get in `monitor`? If things are not set up properly `createProgressGroup` can return `NullProgressMonitor`. – greg-449 Aug 22 '18 at 06:48
  • What do you mean by "what class"? I don't think that this is a code related issue as it worked perfectly until a few days ago. – pmax1 Aug 22 '18 at 06:58
  • I mean what is `monitor` an instance of? If things are set up properly it should be an instance of `org.eclipse.ui.internal.progress.GroupInfo`. – greg-449 Aug 22 '18 at 07:03
  • Job.getJobManager().createProgressGroup() returns an instance of type org.eclipse.core.runtime.IProgressMonitor – pmax1 Aug 22 '18 at 07:15
  • 1
    That is the interface that it returns, I want you to do some debugging and see what the actual class implementing that interface is being returned. That might be a simple as just printing out the value of `monitor.getClass().getName()` – greg-449 Aug 22 '18 at 07:22

1 Answers1

0

We had the same thing occur in our RCP application during P2 updates once we moved to 2020-09 (we were on a much older platform). What ended up solving the problem for us was https://stackoverflow.com/a/41440793/13170238

I.E. setting :

IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setShowProgressIndicator(true);

in the org.eclipse.ui.application.WorkbenchWindowAdvisor.preWindowOpen()