generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(application-service): use postStartupActivity instead of internal…
… preloadingActivity
- Loading branch information
Showing
3 changed files
with
19 additions
and
13 deletions.
There are no files selected for viewing
12 changes: 0 additions & 12 deletions
12
src/main/kotlin/fi/testaustime/plugin_intellij/activity/AppPreloadingActivity.kt
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
src/main/kotlin/fi/testaustime/plugin_intellij/activity/AppStartupActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters