Changes for page Running KEITH
Last modified by Richard Kreissig on 2023/09/14 08:48
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -16,7 +16,7 @@ 16 16 17 17 \\ 18 18 19 -The setup tasks for Modular Target will fail. Disable it after this happens and execute them again via //Help>Perform Setup Tasks//. Open the //plug-in development// perspective. Select working sets as top level elements.Run //clean build//. Several pragmatics projects have errors. Just close them and you will be fine.19 +The setup tasks for Modular Target will fail. Disable it after this happens and execute them again via //Help>Perform Setup Tasks//. Run //clean build//. Several pragmatics projects have error. Just close them and you will be fine. 20 20 21 21 To run the language server go to //Run Configurations// create a new //eclipse application// run configuration and select //Run an application// and //de.cau.cs.kieler.language.server.LanguageServer// 22 22 ... ... @@ -151,24 +151,10 @@ 151 151 yarn && cd keith-app && yarn run socket 152 152 {{/code}} 153 153 154 -//yarn// builds all the stuff. //yarn run socket// in keith-app starts the application. After an initial build via yarn you can run //yarn watch // to watch the changes in your repository. In another console you run yarn run socket in keith-app. Now refreshing your browser is enough to apply the changes. 155 - 156 156 Per default the KEITH opens on localhost:3000. 157 157 158 158 It is required to restart the language server if KEITH is restarted, since the diagram view has a problem (since theia-sprotty is used) to reconnect after that. 159 159 160 -=== Known issues for windows: === 161 - 162 -nsfw.code not found: In the top level package.json exists a script called postinstall. Remove this on windows, delete the node_modules folder and rebuilt the application. This is a known issue of electron-builder. 163 - 164 -=== Known issues on mac: === 165 - 166 -Since SWT is still used as part of the diagram synthesis (but is not relevant anymore). Since it is not called on the main thread this causes a deadlock. Therefore mac just does not work. 167 - 168 -=== Known issues: === 169 - 170 -Refreshing the browser is not enough for the diagram to work. If the diagram is needed the language server has to be restarted before the browser is refreshed. This is a known issue in theia-sprotty. 171 - 172 172 = Developing for KEITH = 173 173 174 174 We use java ServiceLoader to register stuff. Here is a small example how a LanguageServerExtension is registered via a ServiceLoader and how it is used: ... ... @@ -290,68 +290,12 @@ 290 290 const snapshotsDescriptions: CodeContainer = await lclient.sendRequest("keith/kicool/compile", [uri, KeithDiagramManager.DIAGRAM_TYPE + '_sprotty', command, 291 291 this.compilerWidget.compileInplace]) as CodeContainer 292 292 // or via a thenable 293 -client.languageClient.then(lClient => { 294 -lClient.sendRequest("keith/kicool/compile").then((snapshotsDescriptions: CodeContainer) => { 295 - // very important stuff 296 -} 297 -// await is preferred, since it is shorter. 298 -{{/code}} 299 299 300 -In this example client is an instance of a language client. It is usually injected like this: 301 301 302 -{{code}} 303 -constructor( 304 - @inject(KeithLanguageClientContribution) public readonly client: KeithLanguageClientContribution 305 - // other injected classes 306 - ) { 307 - // constructor stuff 308 -} 309 309 {{/code}} 310 310 311 311 \\ 312 312 313 -== How to makeanewpackagefor KEITH==285 +== How to send messages == 314 314 315 -Clone the [[KEITH repository>>url:https://git.rtsys.informatik.uni-kiel.de/projects/KIELER/repos/keith/browse||shape="rect"]]. 316 - 317 -Open the keith folder in VSCode. You are know in the keith directory in VSCode. 318 - 319 -You see something like this: TODO picture 320 - 321 -Create a new folder called keith-<your extension name>. 322 - 323 -Copy a package.json, a tslint.json, a tsconfig.json, and a src folder into the folder. 324 - 325 -Add keith-<your extension name> to workspaces in the top level package.json. 326 - 327 -Add "keith-<your extension name>(% style="color: rgb(0,0,0);" %)": (%%)"0.1.0"(% style="color: rgb(0,0,0);" %) to the dependencies in the top level package.json and the product package.json files (e.g. the package.json in keith-app). 328 - 329 -=== What is in the src directory? === 330 - 331 -The source directory has three optional subfolders. 332 - 333 -* node: Holds all backend related classes. This does currently only exist in the [[keith-language package>>url:https://git.rtsys.informatik.uni-kiel.de/projects/KIELER/repos/keith/browse/keith-language||shape="rect"]]. 334 -* common: Holds general helper methods, string constants and some data classes 335 -* browser: Holds all widgets, contribution for commands, menus, and widgets, and the frontend-extension. 336 - 337 -==== The frontend-extension ==== 338 - 339 -This binds all necessary classes. Look at existing frontend extension in [[KEITH>>url:https://git.rtsys.informatik.uni-kiel.de/projects/KIELER/repos/keith/browse||shape="rect"]] or [[Theia>>url:https://github.com/theia-ide/theia/tree/master/packages||shape="rect"]] to see how this is done. 340 - 341 -==== More examples for stuff ==== 342 - 343 -See [[Theia examples>>url:https://www.theia-ide.org/doc/Commands_Keybindings.html||shape="rect"]]. 344 - 345 345 == How to write a widget == 346 - 347 -There are different kinds of widgets that are commonly used in [[KEITH>>url:https://git.rtsys.informatik.uni-kiel.de/projects/KIELER/repos/keith/browse||shape="rect"]] or in existing [[Theia packages>>url:https://github.com/theia-ide/theia/tree/master/packages||shape="rect"]]. 348 - 349 -* BaseWidget: Very basic 350 -* ReactWidget: A render method has to be implemented that redraws the widget on demand. Additionally several on* event methods can beimplemented. 351 -* TreeWidget: Extends the ReactWidget and draws the contents of the widget in a tree view. 352 - 353 -If a widget has a state it should implement the StatefulWidget interface, which allows to imlement a store and restore method. 354 - 355 -Look at examples in KEITH or Theia to see how this is done. 356 - 357 -\\
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -568525 321 +56852527 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/568525 32/Running KEITH1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/56852527/Running KEITH