Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
const lclient = await this.client.languageClient
const snapshotsDescriptions: CodeContainer = await lclient.sendRequest("keith/kicool/compile", [uri, KeithDiagramManager.DIAGRAM_TYPE + '_sprotty', command,
	this.compilerWidget.compileInplace]) as CodeContainer
// or via a thenable
client.languageClient.then(lClient => {
lClient.sendRequest("keith/kicool/compile").then((languages: LanguageDescription[]) => {
	// very important stuff
}
// await is preferred, since it is shorter. 

...

In this example client is an instance of a language client. It is usally injected like this:

Code Block
constructor(
	@inject(KeithLanguageClientContribution) public readonly client: KeithLanguageClientContribution
	// other injected classes
    ) {
	// constructor stuff
}


How to make a new

How to write a widget