mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
statistics service: "runWhenProjectIsInitialized" (nik)
This commit is contained in:
+10
@@ -22,6 +22,7 @@ import com.intellij.internal.statistic.connect.StatisticsHttpClientSender;
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.project.DumbService;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.startup.StartupManager;
|
||||
import com.intellij.util.Alarm;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -38,6 +39,15 @@ public class SendStatisticsProjectComponent implements ProjectComponent {
|
||||
|
||||
@Override
|
||||
public void projectOpened() {
|
||||
StartupManager.getInstance(myProject).runWhenProjectIsInitialized(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
runStatisticsService();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void runStatisticsService() {
|
||||
final RemotelyConfigurableStatisticsService statisticsService =
|
||||
new RemotelyConfigurableStatisticsService(new StatisticsConnectionService(),
|
||||
new StatisticsHttpClientSender(),
|
||||
|
||||
Reference in New Issue
Block a user