mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
IDEA-343642 LombokBuildManagerListener - do not use AppExecutorUtil - use IO dispatcher to avoid CPU overuse
GitOrigin-RevId: f2256968d547e4aa0848c4fbad086836dfa3437e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d1ac1cd489
commit
e3cfdeb662
@@ -10,7 +10,6 @@ import com.intellij.notification.NotificationAction;
|
|||||||
import com.intellij.notification.NotificationType;
|
import com.intellij.notification.NotificationType;
|
||||||
import com.intellij.notification.SingletonNotificationManager;
|
import com.intellij.notification.SingletonNotificationManager;
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||||
import com.intellij.openapi.application.ApplicationManager;
|
|
||||||
import com.intellij.openapi.application.ReadAction;
|
import com.intellij.openapi.application.ReadAction;
|
||||||
import com.intellij.openapi.project.Project;
|
import com.intellij.openapi.project.Project;
|
||||||
import com.intellij.openapi.ui.MessageType;
|
import com.intellij.openapi.ui.MessageType;
|
||||||
@@ -38,6 +37,7 @@ import java.util.UUID;
|
|||||||
|
|
||||||
import static com.intellij.psi.search.GlobalSearchScope.getScopeRestrictedByFileTypes;
|
import static com.intellij.psi.search.GlobalSearchScope.getScopeRestrictedByFileTypes;
|
||||||
import static com.intellij.psi.search.GlobalSearchScope.projectScope;
|
import static com.intellij.psi.search.GlobalSearchScope.projectScope;
|
||||||
|
import static com.intellij.util.concurrency.AppJavaExecutorUtil.executeOnPooledIoThread;
|
||||||
|
|
||||||
final class LombokBuildManagerListener implements BuildManagerListener {
|
final class LombokBuildManagerListener implements BuildManagerListener {
|
||||||
private final SingletonNotificationManager myNotificationManager =
|
private final SingletonNotificationManager myNotificationManager =
|
||||||
@@ -45,7 +45,7 @@ final class LombokBuildManagerListener implements BuildManagerListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void beforeBuildProcessStarted(@NotNull Project project, @NotNull UUID sessionId) {
|
public void beforeBuildProcessStarted(@NotNull Project project, @NotNull UUID sessionId) {
|
||||||
ApplicationManager.getApplication().executeOnPooledThread(() -> {
|
executeOnPooledIoThread(() -> {
|
||||||
if (ReadAction.nonBlocking(() -> requiresAnnotationProcessing(project)).executeSynchronously()) {
|
if (ReadAction.nonBlocking(() -> requiresAnnotationProcessing(project)).executeSynchronously()) {
|
||||||
suggestEnableAnnotations(project);
|
suggestEnableAnnotations(project);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user