<
From version < 12.1 >
edited by Soeren Domroes
on 2019/04/01 10:58
To version < 10.1 >
edited by Soeren Domroes
on 2019/04/01 09:14
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -73,7 +73,7 @@
73 73  
74 74  Install [[node 8>>url:https://nodejs.org/download/release/v8.15.0/||shape="rect"]] for windows. I personally used the {{code language="none"}}.msi{{/code}}.
75 75  
76 -Use that to install windows-build-tools by executing the command in an administrative powershell.
76 +Use that to install windows-build-tools:
77 77  
78 78  {{code}}
79 79  npm install -g windows-build-tools
... ... @@ -81,10 +81,6 @@
81 81  
82 82  This installs make, gcc, g++, python and all this (I am not sure about yarn, anyway you can always install yarn the same way as in the linux description)
83 83  
84 -=== Known Problems in this step ===
85 -
86 -Python is not correctly registered in the path.
87 -
88 88  == ... on mac: ==
89 89  
90 90  Get a package manager, something like [[brew>>url:https://brew.sh/index_de||shape="rect"]].
... ... @@ -205,97 +205,12 @@
205 205  de.cau.cs.kieler.kicool.ide.language.server.KiCoolLanguageServerContribution
206 206  {{/code}}
207 207  
208 -This is the fully qualified name of the contribution written earlier.
204 +This
209 209  
210 -The language server uses all LanguageServerExtensions like this:
211 -
212 -{{code}}
213 -var iLanguageServerExtensions = <Object>newArrayList(languageServer) // list of all language server extensions
214 -for (lse : KielerServiceLoader.load(ILanguageServerContribution)) { // load all contributions
215 - iLanguageServerExtensions.add(lse.getLanguageServerExtension(injector))
216 -}
217 -{{/code}}
218 -
219 -The resulting list of implementions is used to add the extensions to the language server.
220 -
221 221  == Register an extension (on server side) ==
222 222  
223 -See example above for ServiceLoader and initial stuff.
208 +== Register an extension (on client side) ==
224 224  
225 -What is still missing are the contents of the CommandExtension implemented by the KiCoolLanguageServerExtension. This is an interface defining all additional commands. The CommandExtension looks like this.
210 +== How to send messages ==
226 226  
227 -{{code}}
228 -package de.cau.cs.kieler.kicool.ide.language.server
229 -
230 -import java.util.concurrent.CompletableFuture
231 -import org.eclipse.lsp4j.jsonrpc.services.JsonRequest
232 -import org.eclipse.lsp4j.jsonrpc.services.JsonSegment
233 -
234 -/**
235 - * Interface to the LSP extension commands
236 - *
237 - * @author really fancy name
238 - *
239 - */
240 -@JsonSegment('keith/kicool')
241 -interface CommandExtension {
242 -
243 - /**
244 - * Compiles file given by uri with compilationsystem given by command.
245 - */
246 - @JsonRequest('compile')
247 - def CompletableFuture<CompilationResults> compile(String uri, String clientId, String command, boolean inplace);
248 -
249 - /**
250 - * Build diagram for snapshot with id index for file given by uri. Only works, if the file was already compiled.
251 - */
252 - @JsonRequest('show')
253 - def CompletableFuture<String> show(String uri, String clientId, int index)
254 -
255 - /**
256 - * Returns all compilation systems which are applicable for the file at given uri.
257 - *
258 - * @param uri URI as string to get compilation systems for
259 - * @param filter boolean indicating whether compilation systems should be filtered
260 - */
261 - @JsonRequest('get-systems')
262 - def CompletableFuture<Object> getSystems(String uri, boolean filterSystems)
263 -}
264 -{{/code}}
265 -
266 -This defines three json-rpc commands: "keith/kicool/compile", "keith/kicool/show", "keith/kicool/get-systems". These are implemented in KiCoolLanguageServerExtension.
267 -
268 -== Register and calling an extension (on client side) ==
269 -
270 -Language server extension do not have to be registered on the client side. It is just called.
271 -
272 -You can send a request or a notification to the language server like this:
273 -
274 -{{code}}
275 -const lclient = await this.client.languageClient
276 -const snapshotsDescriptions: CodeContainer = await lclient.sendRequest("keith/kicool/compile", [uri, KeithDiagramManager.DIAGRAM_TYPE + '_sprotty', command,
277 - this.compilerWidget.compileInplace]) as CodeContainer
278 -// or via a thenable
279 -client.languageClient.then(lClient => {
280 -lClient.sendRequest("keith/kicool/compile").then((languages: LanguageDescription[]) => {
281 - // very important stuff
282 -}
283 -// await is preferred, since it is shorter.
284 -{{/code}}
285 -
286 -In this example client is an instance of a language client. It is usally injected like this:
287 -
288 -{{code}}
289 -constructor(
290 - @inject(KeithLanguageClientContribution) public readonly client: KeithLanguageClientContribution
291 - // other injected classes
292 - ) {
293 - // constructor stuff
294 -}
295 -{{/code}}
296 -
297 -\\
298 -
299 -== How to make a new ==
300 -
301 301  == How to write a widget ==
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -56852530
1 +56852525
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/56852530/Running KEITH
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/56852525/Running KEITH