void (@NotNull ModuleRootEvent event) { for (RootsChangeRescanningInfo info : ((ModuleRootEventImpl)event).getInfos()) { if (info == RootsChangeRescanningInfo.TOTAL_RESCAN) { DumbService.getInstance(myProject).cancelTask(task); return; } } }