mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
MvcModuleStructureSynchronizer: restart bg process only once (IDEA-149481)
This commit is contained in:
+7
-11
@@ -276,22 +276,18 @@ public class MvcModuleStructureSynchronizer extends AbstractProjectComponent {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Continuation performInReadAction(@NotNull ProgressIndicator indicator) throws ProcessCanceledException {
|
||||
if (!isUpToDate()) {
|
||||
scheduleRunActions();
|
||||
return null;
|
||||
}
|
||||
|
||||
final Set<Trinity<Module, SyncAction, MvcFramework>> actions = computeRawActions(orderSnapshot);
|
||||
public Continuation performInReadAction(@NotNull final ProgressIndicator indicator) throws ProcessCanceledException {
|
||||
final Set<Trinity<Module, SyncAction, MvcFramework>> actions = isUpToDate() ? computeRawActions(orderSnapshot)
|
||||
: Collections.<Trinity<Module,SyncAction,MvcFramework>>emptySet();
|
||||
return new Continuation(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!isUpToDate()) {
|
||||
scheduleRunActions();
|
||||
}
|
||||
else {
|
||||
if (isUpToDate()) {
|
||||
runActions(actions);
|
||||
}
|
||||
else if (!indicator.isCanceled()) {
|
||||
scheduleRunActions();
|
||||
}
|
||||
}
|
||||
}, ModalityState.NON_MODAL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user