<
From version < 23.1 >
edited by Soeren Domroes
on 2019/05/16 10:53
To version < 24.1 >
edited by Soeren Domroes
on 2019/05/16 10:56
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -334,13 +334,13 @@
334 334  
335 335  These messages can be caught on the client side by defining the message that is caught like this:
336 336  
337 -{{code}}
337 +{{code title="Client side message definition"}}
338 338  export const snapshotDescriptionMessageType = new NotificationType<CodeContainer, void>('keith/kicool/compile');
339 339  {{/code}}
340 340  
341 341  This message type is bound to a method that should be called whenever the client receives such a message.
342 342  
343 -{{code}}
343 +{{code title="Client side message registration"}}
344 344  const lClient: ILanguageClient = await this.client.languageClient
345 345  lClient.onNotification(snapshotDescriptionMessageType, this.handleNewSnapshotDescriptions.bind(this))
346 346  {{/code}}
... ... @@ -349,7 +349,7 @@
349 349  
350 350  Such a notification from server to client is send like this:
351 351  
352 -{{code}}
352 +{{code title="Server side message sending"}}
353 353  future.thenAccept([
354 354   // client is the KeithLanguageClient registered in a LanguageServerExtension that implements a ILanguageClientProvider
355 355   // compile is the command defined in the KeithLanguageClientInterface
... ... @@ -365,7 +365,7 @@
365 365  
366 366  You can send a request or a notification to the language server like this:
367 367  
368 -{{code}}
368 +{{code title="Client side message sending"}}
369 369  const lclient = await this.client.languageClient
370 370  const snapshotsDescriptions: CodeContainer = await lclient.sendRequest("keith/kicool/compile", [uri, KeithDiagramManager.DIAGRAM_TYPE + '_sprotty', command,
371 371   this.compilerWidget.compileInplace]) as CodeContainer
... ... @@ -379,10 +379,10 @@
379 379  
380 380  In this example client is an instance of a language client. It is usually injected like this:
381 381  
382 -{{code}}
382 +{{code title="Client side LanguageClientContribution injection"}}
383 +@inject(KeithLanguageClientContribution) public readonly client: KeithLanguageClientContribution
383 383  constructor(
384 - @inject(KeithLanguageClientContribution) public readonly client: KeithLanguageClientContribution
385 - // other injected classes
385 + // other injected classes that are relevant for the constructor
386 386   ) {
387 387   // constructor stuff
388 388  }
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -57802999
1 +57803004
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/57802999/Running KEITH
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/57803004/Running KEITH