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
2
2
3
3
import com.github.oldmegit.goframehelper.data.Bundle
4
4
import com.github.oldmegit.goframehelper.gf.GfGoMod
5
- import com.intellij.openapi.progress.BackgroundTaskQueue
6
5
import com.intellij.openapi.progress.ProgressIndicator
6
+ import com.intellij.openapi.progress.ProgressManager
7
7
import com.intellij.openapi.progress.Task
8
8
import com.intellij.openapi.project.Project
9
9
import com.intellij.openapi.startup.StartupActivity
10
10
11
+
11
12
class StartUp : StartupActivity {
12
13
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 ) {
15
16
override fun run (indicator : ProgressIndicator ) {
17
+ if (indicator.isCanceled) {
18
+ return
19
+ }
20
+ indicator.text = Bundle .getMessage(" init" )
16
21
GfGoMod .reset(project)
22
+ indicator.fraction = 1.0
17
23
}
18
24
})
19
25
}
You can’t perform that action at this time.
0 commit comments