mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
'ApplicationListener.afterWriteActionFinished' to get notifications when all writes actions finished and write lock is released
CPP-7082 Cannot initiate symbols rebuild from writeAction in tests CPP-7020 "Access is allowed from event dispatch thread only" after reload Cmake Project (master)
This commit is contained in:
@@ -38,4 +38,7 @@ public abstract class ApplicationAdapter implements ApplicationListener {
|
||||
@Override
|
||||
public void writeActionFinished(@NotNull Object action) {
|
||||
}
|
||||
|
||||
public void afterWriteActionFinished(@NotNull Object action) {
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,12 @@ public interface ApplicationListener extends EventListener {
|
||||
void writeActionStarted(@NotNull Object action);
|
||||
|
||||
/**
|
||||
* Is called on action finish.
|
||||
* Is called on before action finish, while while lock is still being hold
|
||||
*/
|
||||
void writeActionFinished(@NotNull Object action);
|
||||
|
||||
/**
|
||||
* Is called after action finish and lock is released
|
||||
*/
|
||||
void afterWriteActionFinished(@NotNull Object action);
|
||||
}
|
||||
@@ -1122,6 +1122,7 @@ public class ApplicationImpl extends PlatformComponentManagerImpl implements App
|
||||
}
|
||||
if (myWriteActionsStack.isEmpty()) {
|
||||
myLock.writeUnlock();
|
||||
fireAfterWriteActionFinished(clazz);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1263,6 +1264,10 @@ public class ApplicationImpl extends PlatformComponentManagerImpl implements App
|
||||
myDispatcher.getMulticaster().writeActionFinished(action);
|
||||
}
|
||||
|
||||
private void fireAfterWriteActionFinished(@NotNull Class action) {
|
||||
myDispatcher.getMulticaster().afterWriteActionFinished(action);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveSettings() {
|
||||
if (myDoNotSave) return;
|
||||
|
||||
Reference in New Issue
Block a user