Skip to content

Commit

Permalink
#622 Update theia project templates
Browse files Browse the repository at this point in the history
Consume a fix for OS-independent file path handling. (eclipse-glsp/glsp-theia-integration#116)
- Update glsp-theia-integration version
- Update to Theia 1.25
- Update Readmes

Part of eclipse-glsp/glsp#561
  • Loading branch information
tortmayr committed May 29, 2022
1 parent b72b63a commit 5c25633
Show file tree
Hide file tree
Showing 14 changed files with 418 additions and 444 deletions.
35 changes: 28 additions & 7 deletions project-templates/java-emf-theia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,25 @@ Alternatively, you can also open the `Extension View` (Ctrl + Shift + X) and typ

## Building the example

The server component of the minimal example has to be built using Maven, the client component has to be built using yarn. This can be done via CLI:
The server component hast to be built using `maven` and the client component have to be built using `yarn`.
A convenience script to build both is provided.
To build all components execute the following in the directory containing this README:

cd glsp-server && mvn clean verify && cd ..
cd glsp-client && yarn
```bash
yarn build
```

or the available VSCode tasks (via Menu _Terminal > Run Task..._)
In addition, it is also possible to build each component individually:

```bash
# Build only the glsp-client
yarn build:client

# Build only glsp-server
yarn build:server
```

Or you can use the available VSCode tasks configured in the [workspace](java-emf-theia-example.code-workspace) (via Menu _Terminal > Run Task..._)

- `Build TaskList GLSP Server`
- `Build TaskList GLSP Client example`
Expand All @@ -72,11 +85,15 @@ or the available VSCode tasks (via Menu _Terminal > Run Task..._)

To start the Theia browser application with the integrated tasklist example, navigate to the client directory

cd glsp-client
```bash
cd glsp-client
```

and then execute:

yarn start
```bash
yarn start
```

This will launch the example in the browser with an embedded GLSP server on [localhost:3000](http://localhost:3000).

Expand All @@ -95,6 +112,8 @@ Here you can choose between four different launch configurations:
- `Launch TaskList Theia Backend (Embedded GLSP Server)`<br>
This config launches the Theia browser backend application and will start the GLSP server as embedded process which means you won't be able to debug the GLSP Server source code.
Breakpoints in the source files of the `glsp-client/**/node` directories will be picked up.
- `Launch TaskList Theia backed with external GLSP Server`<br>
This is a convenience compound config that launches both the TaskList Theia backend in external server mode and the TaskList GLSP server process. Enables debugging of both the glsp-client and glsp-server code simultaneously.
- `Launch Theia Frontend`<br>
Launches a Google chrome instance, opens the Theia browser application at `http://localhost:3000` and will automatically open an example workspace that contains a `example.tasklist` file.
Double-click the file in the `Explorer` to open it with the `Tasklist Diagram Editor`.
Expand All @@ -104,7 +123,9 @@ Here you can choose between four different launch configurations:

To run TypeScript in watch-mode so that TypeScript files are compiled as you modify them via CLI:

yarn watch
```bash
yarn watch
```

or the VSCode task `Watch TaskList GLSP Client example`.

Expand Down
40 changes: 19 additions & 21 deletions project-templates/java-emf-theia/glsp-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,25 @@
"tasklist-browser-app"
],
"resolutions": {
"**/@eclipse-glsp/client": "0.10.0-next.b3a810f.172",
"**/@eclipse-glsp/protocol": "0.10.0-next.b3a810f.172",
"**/@eclipse-glsp/theia-integration": "0.10.0-next.2318ea9.123",
"**/@theia/cli": "1.24.0",
"**/@theia/core": "1.24.0",
"**/@theia/editor": "1.24.0",
"**/@theia/filesystem": "1.24.0",
"**/@theia/markers": "1.24.0",
"**/@theia/messages": "1.24.0",
"**/@theia/monaco": "1.24.0",
"**/@theia/navigator": "1.24.0",
"**/@theia/outline-view": "1.24.0",
"**/@theia/preferences": "1.24.0",
"**/@theia/process": "1.24.0",
"**/@theia/terminal": "1.24.0",
"**/@theia/variable-resolver": "1.24.0",
"**/@theia/userstorage": "1.24.0",
"**/@theia/workspace": "1.24.0",
"**/inversify": "5.1.1",
"**/sprotty": "0.11.0-next.e898c14.30",
"**/sprotty-protocol": "0.11.0-next.e898c14.30",
"**/@theia/cli": "1.25.0",
"**/@theia/core": "1.25.0",
"**/@theia/editor": "1.25.0",
"**/@theia/filesystem": "1.25.0",
"**/@theia/markers": "1.25.0",
"**/@theia/messages": "1.25.0",
"**/@theia/monaco": "1.25.0",
"**/@theia/navigator": "1.25.0",
"**/@theia/outline-view": "1.25.0",
"**/@theia/preferences": "1.25.0",
"**/@theia/process": "1.25.0",
"**/@theia/terminal": "1.25.0",
"**/@theia/variable-resolver": "1.25.0",
"**/@theia/userstorage": "1.25.0",
"**/@theia/workspace": "1.25.0",
"**/@eclipse-glsp/client": "0.10.0-next.c94277c.176",
"**/@eclipse-glsp/protocol": "0.10.0-next.c94277c.176",
"**/@eclipse-glsp/theia-integration": "0.10.0-next.e1dad52.128",
"**/sprotty": "0.12.0-next.00a6590.0",
"**/sprotty-theia": "0.12.0-next.bc7b3d7"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
"name": "tasklist-browser-app",
"version": "0.1.0",
"dependencies": {
"@theia/core": "1.24.0",
"@theia/editor": "1.24.0",
"@theia/filesystem": "1.24.0",
"@theia/markers": "1.24.0",
"@theia/messages": "1.24.0",
"@theia/monaco": "1.24.0",
"@theia/navigator": "1.24.0",
"@theia/preferences": "1.24.0",
"@theia/process": "1.24.0",
"@theia/terminal": "1.24.0",
"@theia/workspace": "1.24.0",
"@theia/core": "1.25.0",
"@theia/editor": "1.25.0",
"@theia/filesystem": "1.25.0",
"@theia/markers": "1.25.0",
"@theia/messages": "1.25.0",
"@theia/monaco": "1.25.0",
"@theia/navigator": "1.25.0",
"@theia/preferences": "1.25.0",
"@theia/process": "1.25.0",
"@theia/terminal": "1.25.0",
"@theia/workspace": "1.25.0",
"@eclipse-glsp-examples/tasklist-theia": "0.10.0"
},
"devDependencies": {
"@theia/cli": "1.24.0"
"@theia/cli": "1.25.0"
},
"scripts": {
"prepare": "yarn build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
import { getPort, JavaSocketServerContribution, JavaSocketServerLaunchOptions } from '@eclipse-glsp/theia-integration/lib/node';
import { getPort, GLSPSocketServerContribution, GLSPSocketServerContributionOptions } from '@eclipse-glsp/theia-integration/lib/node';
import { injectable } from '@theia/core/shared/inversify';
import { join, resolve } from 'path';
import { TaskListLanguage } from '../common/tasklist-language';
Expand All @@ -26,12 +26,12 @@ const JAR_FILE = resolve(
);

@injectable()
export class TaskListGLSPServerContribution extends JavaSocketServerContribution {
export class TaskListGLSPServerContribution extends GLSPSocketServerContribution {
readonly id = TaskListLanguage.contributionId;

createLaunchOptions(): Partial<JavaSocketServerLaunchOptions> {
createContributionOptions(): Partial<GLSPSocketServerContributionOptions> {
return {
jarPath: JAR_FILE,
executable: JAR_FILE,
additionalArgs: ['--consoleLog', 'false', '--fileLog', 'true', '--logDir', LOG_DIR],
socketConnectionOptions: {
port: getPort(PORT_ARG_KEY, DEFAULT_PORT)
Expand Down
Loading

0 comments on commit 5c25633

Please sign in to comment.