Skip to content

Commit

Permalink
fix(application-service): use postStartupActivity instead of internal…
Browse files Browse the repository at this point in the history
… preloadingActivity
  • Loading branch information
bluelhf committed Apr 14, 2023
1 parent a7455a0 commit 465f407
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package fi.testaustime.plugin_intellij.activity

import com.intellij.openapi.components.service
import com.intellij.openapi.project.Project
import com.intellij.openapi.startup.StartupActivity
import fi.testaustime.plugin_intellij.services.TestaustimeApplicationService
import java.util.concurrent.atomic.AtomicBoolean

internal class AppStartupActivity : StartupActivity.DumbAware {

private var initialized: AtomicBoolean = AtomicBoolean(false);

override fun runActivity(project: Project) {
if (initialized.compareAndSet(false, true)) {
service<TestaustimeApplicationService>()
}
}
}
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Show the world how dedicated you are to your projects, now available for Intelli
<applicationService serviceImplementation="fi.testaustime.plugin_intellij.configuration.SettingsState"/>
<projectService serviceImplementation="fi.testaustime.plugin_intellij.services.TestaustimeProjectService"/>
<postStartupActivity implementation="fi.testaustime.plugin_intellij.activity.ProjectStartupActivity" />
<preloadingActivity implementation="fi.testaustime.plugin_intellij.activity.AppPreloadingActivity" />
<postStartupActivity implementation="fi.testaustime.plugin_intellij.activity.AppStartupActivity" />
<notificationGroup displayType="BALLOON" id="testaustime.info"
key="notificationGroup.information" bundle="messages.TestaustimeBundle"/>
<notificationGroup id="testaustime.warnings"
Expand Down

0 comments on commit 465f407

Please sign in to comment.