File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
src/main/kotlin/com/github/blarc/gitlab/template/lint/plugin/pipeline/middleware Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 1313
1414### Fixed
1515- NPE when opening a folder as project.
16+ - Access is allowed only from Event Dispatch Thread in ` LintContext ` .
1617
1718## [ 1.11.1] - 2023-05-08
1819
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import com.github.blarc.gitlab.template.lint.plugin.pipeline.Pass
77import com.github.blarc.gitlab.template.lint.plugin.providers.EditorWithMergedPreview
88import com.github.blarc.gitlab.template.lint.plugin.settings.ProjectSettings
99import com.github.blarc.gitlab.template.lint.plugin.widget.LintStatusEnum
10+ import com.intellij.openapi.application.runReadAction
1011import com.intellij.openapi.command.WriteCommandAction
1112import com.intellij.openapi.components.Service
1213import com.intellij.openapi.components.service
@@ -82,13 +83,16 @@ class LintContext : Middleware {
8283 remoteId : Long ,
8384 branch : String
8485 ): GitlabLintResponse ? {
85- return gitlab.lintContent(
86- gitlabUrl,
87- gitlabToken,
88- pass.file.text,
89- remoteId,
90- branch,
91- showGitlabTokenNotification
92- ).get()
86+
87+ return runReadAction {
88+ return @runReadAction gitlab.lintContent(
89+ gitlabUrl,
90+ gitlabToken,
91+ pass.file.text,
92+ remoteId,
93+ branch,
94+ showGitlabTokenNotification
95+ ).get()
96+ }
9397 }
9498}
You can’t perform that action at this time.
0 commit comments