Skip to content

Commit c803936

Browse files
committed
Replace StartupActivity with ProjectActivity
1 parent 8f8ccfe commit c803936

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/main/clojure/com/github/clojure_lsp/intellij/extension/init_db_startup.clj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
[com.github.ericdallo.clj4intellij.extension :refer [def-extension]])
55
(:import
66
[com.intellij.openapi.project Project]
7-
[com.intellij.openapi.startup StartupActivity]))
7+
[com.intellij.openapi.startup ProjectActivity]
8+
[kotlinx.coroutines CoroutineScope]))
89

910
(set! *warn-on-reflection* true)
1011

1112
(def-extension InitDBStartup []
12-
StartupActivity
13-
(runActivity [_this ^Project project]
13+
ProjectActivity
14+
(execute [_this ^Project project ^CoroutineScope _]
1415
(db/init-db-for-project project)))

src/main/clojure/com/github/clojure_lsp/intellij/extension/register_actions_startup.clj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
CommonDataKeys]
2020
[com.intellij.openapi.editor Editor]
2121
[com.intellij.openapi.project Project]
22-
[com.intellij.openapi.startup StartupActivity]
22+
[com.intellij.openapi.startup ProjectActivity]
2323
[com.redhat.devtools.lsp4ij LanguageServerManager]
2424
[com.redhat.devtools.lsp4ij.commands LSPCommand LSPCommandAction]
25-
[com.redhat.devtools.lsp4ij.usages LSPUsageType LSPUsagesManager LocationData]))
25+
[com.redhat.devtools.lsp4ij.usages LSPUsageType LSPUsagesManager LocationData]
26+
[kotlinx.coroutines CoroutineScope]))
2627

2728
(set! *warn-on-reflection* true)
2829

@@ -108,8 +109,8 @@
108109
(.getInputEvent event))))
109110

110111
(def-extension RegisterActionsStartup []
111-
StartupActivity
112-
(runActivity [_this ^Project _project]
112+
ProjectActivity
113+
(execute [_this ^Project _project ^CoroutineScope _]
113114
(doseq [{:keys [name text description use-shortcut-of keyboard-shortcut]} clojure-lsp-commands]
114115
(action/register-action! :id (str "ClojureLSP." (csk/->PascalCase name))
115116
:title text

0 commit comments

Comments
 (0)