Skip to content

Commit

Permalink
Check if project or modules aren't disposed
Browse files Browse the repository at this point in the history
- Fixes #1090
  • Loading branch information
gastaldi committed Aug 9, 2023
1 parent d21a621 commit 3a781e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public static boolean isQuarkusExtensionWithDeploymentArtifact(Library library)
* @param progressIndicator
*/
public static void ensureQuarkusLibrary(Module module, ProgressIndicator progressIndicator) {
if (module.isDisposed())
return;
LOGGER.info("Ensuring library to " + module.getName());
long start = System.currentTimeMillis();
ToolDelegate toolDelegate = ToolDelegate.getDelegate(module);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,12 @@ public void sourceFilesChanged(Set<com.intellij.openapi.util.Pair<VirtualFile, M
}

public void processModules(com.intellij.openapi.progress.ProgressIndicator progressIndicator) {
for (var module : ModuleManager.getInstance(project).getModules()) {
LOGGER.info("Calling ensure from processModules");
QuarkusModuleUtil.ensureQuarkusLibrary(module, progressIndicator);
}
if (!project.isDisposed()) {
for (var module : ModuleManager.getInstance(project).getModules()) {
LOGGER.info("Calling ensure from processModules");
QuarkusModuleUtil.ensureQuarkusLibrary(module, progressIndicator);
}
}
}


Expand Down

0 comments on commit 3a781e2

Please sign in to comment.