File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/main/kotlin/com/github/oldmegit/goframehelper/startup Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,18 +2,24 @@ package com.github.oldmegit.goframehelper.startup
22
33import com.github.oldmegit.goframehelper.data.Bundle
44import com.github.oldmegit.goframehelper.gf.GfGoMod
5- import com.intellij.openapi.progress.BackgroundTaskQueue
65import com.intellij.openapi.progress.ProgressIndicator
6+ import com.intellij.openapi.progress.ProgressManager
77import com.intellij.openapi.progress.Task
88import com.intellij.openapi.project.Project
99import com.intellij.openapi.startup.StartupActivity
1010
11+
1112class StartUp : StartupActivity {
1213 override fun runActivity (project : Project ) {
13- val task = BackgroundTaskQueue (project, Bundle .getMessage(" name" ) )
14- task. run (object : Task .Backgroundable (project, Bundle .getMessage( " init " ) ) {
14+ val taskTitle = Bundle .getMessage(" name" )
15+ ProgressManager .getInstance(). run (object : Task .Backgroundable (project, taskTitle ) {
1516 override fun run (indicator : ProgressIndicator ) {
17+ if (indicator.isCanceled) {
18+ return
19+ }
20+ indicator.text = Bundle .getMessage(" init" )
1621 GfGoMod .reset(project)
22+ indicator.fraction = 1.0
1723 }
1824 })
1925 }
You can’t perform that action at this time.
0 commit comments