From 48615d8d1821c6aa6ebf9c895d4086fb5062fe08 Mon Sep 17 00:00:00 2001 From: John Mai Date: Mon, 14 Aug 2023 00:45:15 +0800 Subject: [PATCH] :coffin: Remove Internal method. --- .../goormhelper/startup/GoORMHelperStartupActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/github/maiqingqiang/goormhelper/startup/GoORMHelperStartupActivity.java b/src/main/java/com/github/maiqingqiang/goormhelper/startup/GoORMHelperStartupActivity.java index a5e0bb2..f6c178b 100644 --- a/src/main/java/com/github/maiqingqiang/goormhelper/startup/GoORMHelperStartupActivity.java +++ b/src/main/java/com/github/maiqingqiang/goormhelper/startup/GoORMHelperStartupActivity.java @@ -1,15 +1,15 @@ package com.github.maiqingqiang.goormhelper.startup; import com.github.maiqingqiang.goormhelper.services.GoORMHelperCacheManager; +import com.intellij.openapi.application.ReadAction; import com.intellij.openapi.project.DumbAware; import com.intellij.openapi.project.Project; import com.intellij.openapi.startup.StartupActivity; -import com.intellij.openapi.startup.StartupManager; import org.jetbrains.annotations.NotNull; public class GoORMHelperStartupActivity implements StartupActivity, DumbAware { @Override public void runActivity(@NotNull Project project) { - StartupManager.getInstance(project).runAfterOpened(() -> GoORMHelperCacheManager.getInstance(project).scan()); + ReadAction.run(() -> GoORMHelperCacheManager.getInstance(project).scan()); } }