ProgressManager does not show progress

I used ProgressManager in ModuleBuilder and it does not show progress. Where i mistake?

@NotNull 
@Override
public Module createModule(@NotNull ModifiableModuleModel moduleModel) throws InvalidDataException, IOException, ModuleWithNameAlreadyExists, JDOMException, ConfigurationException {
   Module baseModule = super.createModule(moduleModel);
   Project project = baseModule.getProject();
   ProgressManager.getInstance().runProcessWithProgressSynchronously(() -> {
      ProgressManager.getInstance().getProgressIndicator().setIndeterminate(true);
      try {
         // some actions
      } catch (InvalidDataException | IOException | JDOMException | ModuleWithNameAlreadyExists | ConfigurationException e) {
         e.printStackTrace();
      }
   }, "Title", true, project);
return baseModule;

Thanks.

3 comments
Comment actions Permalink

That's too little information. Is createModule invoked on Swing thread? What is shown?

0
Comment actions Permalink

Maybe. I'm not sure.

I don't know every WizardStep create Swing component or IDEA create Swing component which show every WizardStep. If the second then Yes.

i create the MyModuleBuilder, which extends JavaModuleBuilder.
in this i override createModule(...). When i finished project creation, i expect that MyModuleBuilder.createModule(...) was invoked, and i have seen progress bar. But i don't see nothing . And last IDEA window was freezed.

Some time later my ModuleType was created successfully.

0
Comment actions Permalink

Have you tried to debug this and put a breakpoint into createModule? Is the breakpoint hit? Which thread does this happen in?

0

Please sign in to leave a comment.