Setting up your Eclipse
For everything not mentioned here refer to Getting Eclipse guide.
Use the installer go to advanced mode, add the KIELER url. If you plan to develop for the semantic language server (e.g. for the compiler) you should select KIELER semantics for diagram only KIELER pragmatics. In any case select the keith stream.
If you plan to develop in elk at the same time first select the Eclispe Layout Kernel setup and after that either the semantics or pragmatics setup.
Wait till everything installs and the setup tasks finish. If you have any problems in this stage refer to the Getting Eclipse guide.
Make sure that you have necessary forks of ELK/KlighD set up.
If you have problems in the workspace that are still there after a clean build do the following:
- Disable Project>Build automatically
- Select all Klighd and pragmatics plugins and do Project>Clean>Only selected and build only selected
- Do the same for the semantics projects
- Enable Project>Build automatically
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 (for semantics LS,de.cau.cs.kieler.kgraph.language.server.LanguageServer otherwise)
You have to edit the arguments too. The Vm arguments host and port are added to connect the LS via socket:
The default port to which KEITH tries to connect is 5007. You can of course change this for the languae server but be aware that this has to be changed in KEITH too.
Setting up a KEITH developer setup...
- node (and additional dependencies see Theia developer guide)
- npm (whatever node installs)
- yarn (latest version)
- Python (2.7.X)
- gcc, g++, and make (for native dependencies of some npm packages)
- Visual Studio Code (latest version)
- a cloned keith repository
... on linux:
(Theia has a guide for extension development that might be helpful)
install node (for the version we refer to the Theia developer guide):
Install python if you haven't (remember: Python 2: , Python 3: ).
Install yarn (a package manager build on the package manager npm):
... on windows:
Install node for windows. I personally used the
.msi. For the version refer to the Theia developer guide.
Use that to install windows-build-tools by executing the command in an administrative powershell.
This installs make, gcc, g++, python and all this. Somehow this does not really terminate. If nothing happens anymore it may be finished, just kill the process if it does not terminate.
All the installed executables are not in the path and that is okay. This is not needed since yarn/npm knows how to call them when needed.
Yarn can be downloaded and installed from here.
Known Problems in this step
If python3 was already installed this may cause some problems.
... on mac:
Get a package manager, something like brew.
Use brew to install all necessary stuff.
Apparently there is an issue with xcode-select: Theia developers recommend the following:
After doing this for your OS all that is missing is running KEITH (in developer setup) and setting up your Eclipse for language server development).
Stuff that may help
How to run KEITH in developer setup (socket)
Run the following to build and run KEITH in its developer setup (in socket mode, so the LS has to be started separately)
Running KEITH in the browser
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.
Per default the KEITH opens on localhost:3000.
If you previously build keith electron, you have to execute
yarn run rebuild:browser
Run Launch in Chrome via VSCode to open a chrome browser on localhost:3000
This is necessary to be able to debug in VSCode.
Running KEITH as (unbundled) electron app
yarn builds all the stuff. yarn run socket in keith-app-electron 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-electron. Now refreshing your browser is enough to apply the changes.
If you previously build keith electron, you have to execute
yarn run rebuild:electron
Running the already build LS (you normally do not want to do this)
Go to the latest Bamboo build and go to Artifacts.
Select Language Server Zip and download the LS and unpack it somewhere.
Locate the kieler.ini file. Depending on the OS it has a different location (linux; toplevel, windows, toplevel, mac: Content/Eclipse/kieler.ini)
Paste the following at the beginning of the ini-file:
Since an Eclipse application is built, this is needed to start the LS without a splashscreen.
If you want to connect that LS via socket to your Theia application (KEITH) add the following to the vmargs:
5007 is the standard port KEITH is currently connecting to in socket mode. You can find this port in your Theia application at the following location:
Assume you are in the keith repository. Go to
keith-app, you should see something like this:
package.json. In the
package.json are several scripts defined.
LSP_PORT option is used to activate the connection via socket. It is also possible to specify a relative location to a LS via
LS_PATH=<path to LS>.
Known issues for windows:
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.
Known issues on mac:
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.
- KEITH works in the browser/electron app, but not in the electron app/browser with the following error message:
symbol lookup error: ... symbol lookup error: .../keith/node_modules/nsfw/build/Release/nsfw.node: undefined symbol: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeE
Done in 0.90s.
yarn run rebuild:electron/browserafter yarn to fix this. If it does not work, delete the
node_modulesfolder and try again (for browser version rebuild browser is not needed, since
yarnalready builds the correct sources).