Hide last authors
Soeren Domroes 6.1 1 == ==
2
3 {{toc/}}
4
Soeren Domroes 5.1 5 == Setting up your eclipse ==
Soeren Domroes 1.1 6
Soeren Domroes 5.1 7 For everything not mentioned here refer to [[Configuring Eclipse>>doc:KIELER.Configuring Eclipse||shape="rect"]] guide.
Soeren Domroes 1.1 8
Soeren Domroes 5.1 9 Use the installer go to advanced mode, add the KIELER url. Then select first pragmatics and after that semantics (that is very important).
Soeren Domroes 1.1 10
Soeren Domroes 5.1 11 Select the Theia stream for semantics and the Keith stream for pragmatics and use the latest eclipse if possible. Set the targetplatform to photon and finish.
Soeren Domroes 1.1 12
Soeren Domroes 5.1 13 Wait till everything installs and the setup tasks finish. If you have any problems in this stage refer to the [[Configuring Eclipse>>doc:KIELER.Configuring Eclipse||shape="rect"]] guide.
Soeren Domroes 1.1 14
Soeren Domroes 5.1 15 \\
Soeren Domroes 1.1 16
Soeren Domroes 5.1 17 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.
Soeren Domroes 1.1 18
Soeren Domroes 5.1 19 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//
Soeren Domroes 1.1 20
Soeren Domroes 5.1 21 == [[image:attach:Screenshot from 2019-02-15 14-10-50.png]] ==
Soeren Domroes 1.1 22
Soeren Domroes 5.1 23 \\
Soeren Domroes 1.1 24
Soeren Domroes 5.1 25 You have to edit the arguments too. The Vm arguments host and port are added to connect the LS via socket.
Soeren Domroes 1.1 26
Soeren Domroes 5.1 27 [[image:attach:Screenshot from 2019-02-15 14-13-34.png]]
Soeren Domroes 1.1 28
Soeren Domroes 5.1 29 The default port to which KEITH tries to connect is 5007.
Soeren Domroes 1.1 30
31 == Setting up a KEITH developer setup... ==
32
33 General requirements:
34
35 * node
36 * npm (whatever node installs)
37 * yarn (latest version)
38 * Python (2.7.X)
39 * gcc, g++, and make (for native dependencies of some npm packages)
40 * [[Visual Studio Code>>url:https://code.visualstudio.com/||shape="rect"]] (latest version)
41 * a cloned [[keith >>url:https://git.rtsys.informatik.uni-kiel.de/projects/KIELER/repos/keith/browse||shape="rect"]]repository
42
43 == ... on linux: ==
44
45 (Theia has a [[guide >>url:https://www.theia-ide.org/doc/authoring_extensions||shape="rect"]]for extension development that might be helpful)
46
47 install node 8:
48
49 {{code}}
50 curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
51 nvm install 8
52 {{/code}}
53
54 Install python if you haven't (remember: Python 2: , Python 3: ).
55
56 {{code language="none"}}
57 Install yarn (a package manager build on the package manager npm):
58 {{/code}}
59
60 {{{}}}
61
62 \\
63
64 {{code}}
65 npm install -g yarn
66 {{/code}}
67
68 \\
69
70 == ... on windows: ==
71
72 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}}.
73
74 Use that to install windows-build-tools:
75
76 {{code}}
77 npm install -g windows-build-tools
78 {{/code}}
79
80 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)
81
82 == ... on mac: ==
83
84 Get a package manager, something like [[brew>>url:https://brew.sh/index_de||shape="rect"]].
85
86 Use brew to install all necessary stuff.
87
88 Apparently there is an issue with xcode-select: [[Theia developers>>url:https://github.com/theia-ide/theia/blob/master/doc/Developing.md||shape="rect"]] recommend the following:
89
90 {{code}}
91 xcode-select --install
92 {{/code}}
93
Soeren Domroes 5.1 94 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).
Soeren Domroes 1.1 95
Soeren Domroes 5.1 96 = Stuff that may help =
Soeren Domroes 1.1 97
Soeren Domroes 5.1 98 == Running the already build LS ==
Soeren Domroes 1.1 99
Soeren Domroes 5.1 100 Go to the latest [[Bamboo build>>url:https://rtsys.informatik.uni-kiel.de/bamboo/browse/KISEMA-NSI||shape="rect"]] and go to Artifacts.
Soeren Domroes 1.1 101
Soeren Domroes 5.1 102 [[image:attach:image2019-2-7_17-46-58.png]]
Soeren Domroes 1.1 103
Soeren Domroes 5.1 104 Select Language Server Zip and download the LS and unpack it somewhere.
105
106 Locate the kieler.ini file. Depending on the OS it has a different location (linux; toplevel, windows, toplevel, mac: Content/Eclipse/kieler.ini)
107
108 Paste the following at the beginning of the ini-file:
109
Soeren Domroes 1.1 110 {{code language="bash"}}
Soeren Domroes 5.1 111 -application
112 de.cau.cs.kieler.language.server.LanguageServer
113 -noSplash
Soeren Domroes 1.1 114 {{/code}}
115
Soeren Domroes 5.1 116 Since an eclipse application is built, this is needed to start the LS without a splashscreen.
Soeren Domroes 1.1 117
Soeren Domroes 5.1 118 If you want to connect that LS via socket to your Theia application (KEITH) add the following to the vmargs:
Soeren Domroes 3.1 119
Soeren Domroes 5.1 120 {{code}}
121 -Dport=5007
122 {{/code}}
Soeren Domroes 1.1 123
Soeren Domroes 5.1 124 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:
Soeren Domroes 1.1 125
Soeren Domroes 5.1 126 Assume you are in the [[keith >>url:https://git.rtsys.informatik.uni-kiel.de/projects/KIELER/repos/keith/browse||shape="rect"]]repository. Go to {{code language="none"}}keith-app{{/code}}, you should see something like this:
Soeren Domroes 1.1 127
Soeren Domroes 5.1 128 [[image:attach:image2019-2-7_17-58-22.png]]
Soeren Domroes 1.1 129
Soeren Domroes 5.1 130 Open the {{code language="none"}}package.json{{/code}}. In the{{code language="none"}} package.json{{/code}} are several scripts defined.
Soeren Domroes 3.1 131
Soeren Domroes 5.1 132 [[image:attach:image2019-2-7_18-0-7.png]]
Soeren Domroes 1.1 133
Soeren Domroes 5.1 134 The {{code language="none"}}LSP_PORT{{/code}} option is used to activate the connection via socket. It is also possible to specify a relative location to a LS via {{code language="none"}}LS_PATH=<path to LS>{{/code}}.
Soeren Domroes 3.1 135
Soeren Domroes 5.1 136 You can also set these options for an already build [[keith electron app>>url:http://rtsys.informatik.uni-kiel.de/~~kieler/files/nightly/sccharts-integration/||shape="rect"]].
Soeren Domroes 3.1 137
Soeren Domroes 1.1 138 \\
139
Soeren Domroes 5.1 140 == How run KEITH in developer setup (socket) ==
Soeren Domroes 3.1 141
Soeren Domroes 5.1 142 Run the following to build and run KEITH in its developer setup (in socket mode, so the LS has to be started separately)
Soeren Domroes 3.1 143
Soeren Domroes 5.1 144 {{code language="bash"}}
145 yarn && cd keith-app && yarn run socket
146 {{/code}}
147
148 Per default the KEITH opens on localhost:3000.
149
150 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.