Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#455 #456 #348 Update coffee-editor to latest versions and run servers as JAR products #457

Merged
merged 34 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
994cd8d
#455 #456 Update to latest versions and run servers as JAR products
ndoschek Aug 30, 2022
b3677f7
#455 #456 Update to latest versions and run servers as JAR products
ndoschek Aug 30, 2022
67e6406
#455 #456 Update to latest versions and run servers as JAR products
ndoschek Aug 31, 2022
c4d8f2b
#455 #456 Update to latest versions
ndoschek Aug 31, 2022
0e3dea7
#455 Update Getting Started
ndoschek Sep 1, 2022
7486b1e
Fix leftovers
ndoschek Sep 1, 2022
3254d02
Fix ESLint warnings and leftovers
ndoschek Sep 1, 2022
cc319b3
Update coffee model and use ID attributes for EObjects
ndoschek Sep 1, 2022
d092d95
Fix Coffee resource handling
ndoschek Sep 1, 2022
9803e09
Fix Coffee commands
ndoschek Sep 1, 2022
9d2ae62
Cleanup leftover GLSP glitches
ndoschek Sep 1, 2022
e2a305b
Cleanup id attribute handling and naming
ndoschek Sep 1, 2022
f468a04
Add application branding
ndoschek Sep 2, 2022
5447326
Fix debugging of WorkflowAnalyzerServer
ndoschek Sep 2, 2022
2f043e9
Fix diagram editor unsubscribe from Model Server
ndoschek Sep 2, 2022
da715a1
Align icons in diagram editor and coffee tree editor
ndoschek Sep 2, 2022
43c0062
Adapt coffee model
ndoschek Sep 4, 2022
cb1cec8
Align CSS styling
ndoschek Sep 4, 2022
ea7b234
Re-enable direct task editing via context menu on Tasks
ndoschek Sep 4, 2022
a8d46cf
Adapt coffee model
ndoschek Sep 4, 2022
93aa471
Update coffee-tree-editor
ndoschek Sep 7, 2022
afaa483
Fix build
ndoschek Sep 7, 2022
27679a9
Remove workaround for TheiaModelServerClientV2
ndoschek Sep 13, 2022
c6c25b0
Update test resources for AnalyzeWorkflowTest
ndoschek Sep 13, 2022
ccb8e6b
Fix graphical model comparison
sgraband Sep 20, 2022
2915a3a
Revert node colors
sgraband Sep 20, 2022
277354d
Update dockerfile to node 14
sgraband Sep 21, 2022
08228a3
Removed validation questions from ModelServerAccess
sgraband Sep 21, 2022
c67c567
Removed "no duplicate GLSP Editor" code
sgraband Sep 21, 2022
c6fd48f
Update README
ndoschek Sep 21, 2022
62e710f
Update CSS styling
ndoschek Sep 22, 2022
6b767ec
Fix ControlUnit child creation in tree-editor
ndoschek Oct 19, 2022
17d905b
Fix diagram node label edit validation
ndoschek Oct 20, 2022
e0f2ba1
Address Eugen's review comments
ndoschek Nov 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,20 @@ WORKDIR /coffee-editor
COPY --chown=theia:theia . .
USER theia

RUN ./run.sh -bcf && \
cp ./web/favicon.ico ./web/browser-app/lib
RUN sed -i 's/<\/head>/<link rel="icon" href="favicon.ico" \/><\/head>/g' web/browser-app/lib/index.html
# Trigger build: Build backend, build client
RUN yarn build
RUN cp ./client/favicon.ico ./client/browser-app/lib
RUN sed -i 's/<\/head>/<link rel="icon" href="favicon.ico" \/><\/head>/g' client/browser-app/lib/index.html

WORKDIR /coffee-editor/backend/examples/SuperBrewer3000
WORKDIR /coffee-editor/client/workspace/SuperBrewer3000

RUN git config --global user.name "Test User"
RUN git config --global user.email "[email protected]"
RUN git init
RUN git add *
RUN git commit -m "init"

WORKDIR /coffee-editor/web/browser-app
WORKDIR /coffee-editor/client/browser-app

EXPOSE 3000

Expand Down
19 changes: 5 additions & 14 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,7 @@ pipeline {
container('ci') {
timeout(30){
dir('backend/releng/org.eclipse.emfcloud.coffee.parent') {
sh 'mvn clean install -Pfatjar -U --batch-mode -Dmaven.repo.local=/home/jenkins/.m2/repository'
}
}
}
}
}
stage('Copy server') {
steps {
container('ci') {
timeout(30){
dir('.') {
sh './run.sh -c'
sh 'mvn clean install -U --batch-mode -Dmaven.repo.local=/home/jenkins/.m2/repository'
}
}
}
Expand All @@ -72,7 +61,7 @@ pipeline {
withCredentials([string(credentialsId: "github-bot-token", variable: 'GITHUB_TOKEN')]) {
timeout(30){
dir('.') {
sh './run.sh -f'
sh 'yarn build:client'
}
}
}
Expand All @@ -85,7 +74,9 @@ pipeline {
steps {
container('ci') {
archiveArtifacts artifacts: 'backend/releng/org.eclipse.emfcloud.coffee.product/target/products/*.zip' , fingerprint: true
archiveArtifacts artifacts: 'web/browser-app/**', fingerprint: true
archiveArtifacts artifacts: 'backend/plugins/org.eclipse.emfcloud.coffee.workflow.glsp.server/target/org.eclipse.emfcloud.coffee.workflow.glsp.server-0.1.0-SNAPSHOT-glsp.jar' , fingerprint: true
archiveArtifacts artifacts: 'backend/plugins/org.eclipse.emfcloud.coffee.modelserver/target/org.eclipse.emfcloud.coffee.modelserver-0.1.0-SNAPSHOT-standalone.jar' , fingerprint: true
archiveArtifacts artifacts: 'client/browser-app/**', fingerprint: true
}
}
}
Expand Down
49 changes: 17 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Refer to the README.md in the workspace for more details on how to use the examp
### Docker Image information

The docker image includes the Theia application and the following VSCode plugins (among others):

- Clangd for C/C++ editing support
- Debug for C/C++ debugging support
- Java LSP
Expand All @@ -42,18 +42,18 @@ The runtime environment has installed (among others)

The coffee-editor consists of a frontend and a backend.

The frontend is located in the `web/` folder and frontend specific documentation can be found in the [frontend README](web/README.md)
The backend is located in the `backend/` folder and backend specific documentation can be found in the [backend README](backend/README.md)
The frontend is located in the [`client/`](./client/) folder and frontend specific documentation can be found in the [client README](client/README.md)
The backend is located in the [`backend/`](./backend/) folder and backend specific documentation can be found in the [backend README](backend/README.md)

## Used Projects

We are relying on a bunch of projects:

- https://github.com/eclipsesource/jsonforms
- https://github.com/eclipse-glsp/glsp
- https://github.com/eclipse-emfcloud/emfcloud-modelserver
- https://github.com/eclipse-emfcloud/emfcloud-modelserver-theia
- https://github.com/eclipse-emfcloud/theia-tree-editor
- <https://github.com/eclipsesource/jsonforms>
- <https://github.com/eclipse-glsp/glsp>
- <https://github.com/eclipse-emfcloud/emfcloud-modelserver>
- <https://github.com/eclipse-emfcloud/emfcloud-modelserver-theia>
- <https://github.com/eclipse-emfcloud/theia-tree-editor>

If you encounter issues please report them in the corresponding project.
This project should not contain much code and should mostly consist of 'glue' code to combine the different components.
Expand All @@ -70,8 +70,8 @@ You need Java 11 to build the Coffee Editor.

### Install npm and node

nvm install 12
nvm use 12
nvm install 16
nvm use 16

### Install yarn

Expand All @@ -96,33 +96,19 @@ On Windows the most reliable way seems to be to install Python and set `npm conf

## Getting started

Clone and build the coffee-editor:
Clone the coffee-editor:

git clone https://github.com/eclipsesource/coffee-editor.git
cd coffee-editor
./run.sh

Run the built coffee-editor:

./run.sh -r
yarn build

Open http://localhost:3000 in the browser.
Open <http://localhost:3000> in the browser.
ndoschek marked this conversation as resolved.
Show resolved Hide resolved

In Theia open the example workspace `backend/examples/SuperBrewer3000` and double click a `.coffee` file. This opens it in a tree master detail editor.

## The build and run script

The `run.sh` script provides funtionality to build the coffee-editor, download used libraries, and run the IDE.
Every part step can be executed independently from each other by using the corresponding paramater:

`-b`: Builds the backend services

`-c`: Integrates the built backend artifacts in the coffee-editor IDE

`-f`: Builds the frontend shown in the web browser

`-r`: Runs the coffee-editor and exposes it at http://localhost:3000

## Publishing the coffee-editor-extension

Create a npm user and login to the npm registry, [more on npm publishing](https://docs.npmjs.com/getting-started/publishing-npm-packages).
Expand Down Expand Up @@ -164,17 +150,16 @@ You can also use the predefined `RunSocketServer-Headless.launch` run config.

#### Coffee Model Server

Use the `org.eclipse.emfcloud.coffee.modelserver.app.application` Eclipse Application or the corresponding `modelserver.product` from `org.eclipse.emfcloud.coffee.product` to start the Model Server.
Use the `CoffeeModelServer` launch config to start the Model Server.

#### Coffee GLSP Server

Use the `workflowserver.product` product to start the GLSP Server.
On the client side, set the `isRunning` flag of the [CoffeeGlspLaunchOptions](web/coffee-server/src/node/backend-module.ts) to `true`.
Use the `WorkflowGLSPServer` launch config to start the GLSP Server.

### Debug Frontend
### Debug Client

- Install VSCode
- Import projects from `web`
- Open folder `client`

#### Debug Theia Backend

Expand Down
3 changes: 2 additions & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Compiled class file
*.class

# Log file
# Log files
*.log
*.log.gz

# BlueJ files
*.ctxt
Expand Down

This file was deleted.

9 changes: 0 additions & 9 deletions backend/examples/SuperBrewer3000/.theia/settings.json

This file was deleted.

20 changes: 0 additions & 20 deletions backend/examples/SuperBrewer3000/.theia/tasks.json

This file was deleted.

32 changes: 0 additions & 32 deletions backend/examples/SuperBrewer3000/superbrewer3000.coffee

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.emfcloud.modelserver.client;bundle-version="0.7.0",
org.eclipse.emfcloud.modelserver.common;bundle-version="0.7.0",
org.eclipse.emfcloud.modelserver.emf;bundle-version="0.7.0",
org.eclipse.emfcloud.modelserver.lib;bundle-version="0.7.0",
org.eclipse.emf.ecore;bundle-version="[2.23.0,3.0.0)"
Export-Package: org.eclipse.emfcloud.coffee.common
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emfcloud.modelserver.client.ModelServerClient;
import org.eclipse.emfcloud.modelserver.common.ModelServerPathParametersV2;

public final class ModelServerClientUtil {
private static final String FORMAT = "xmi";
private static final String MODEL_SERVER_BASE_URL = "http://localhost:8081/api/v1/";
private static final String MODEL_SERVER_BASE_URL = "http://localhost:8081/api/v2/";

private ModelServerClientUtil() {}

@SuppressWarnings("IllegalThrows")
public static EObject loadResource(final URI uri) throws Exception {
@SuppressWarnings("resource")
ModelServerClient client = new ModelServerClient(MODEL_SERVER_BASE_URL);
return client.get(Paths.get(uri).getFileName().toString(), FORMAT).get().body();
return client.get(Paths.get(uri).getFileName().toString(), ModelServerPathParametersV2.FORMAT_XMI).get().body();
}

@SuppressWarnings("IllegalThrows")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="coffee" nsURI="http://www.eclipse.org/emfcloud/coffee/model"
nsPrefix="org.eclipse.emfcloud.coffee.model">
<eClassifiers xsi:type="ecore:EClass" name="Component" abstract="true">
<eClassifiers xsi:type="ecore:EClass" name="Identifiable" abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
iD="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Component" abstract="true" eSuperTypes="#//Identifiable">
<eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
eType="#//Component" containment="true" eOpposite="#//Component/parent"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//Component"
Expand All @@ -27,7 +31,7 @@
<eClassifiers xsi:type="ecore:EClass" name="BrewingUnit" eSuperTypes="#//Component"/>
<eClassifiers xsi:type="ecore:EClass" name="DipTray" eSuperTypes="#//Component"/>
<eClassifiers xsi:type="ecore:EClass" name="WaterTank" eSuperTypes="#//Component"/>
<eClassifiers xsi:type="ecore:EClass" name="Processor">
<eClassifiers xsi:type="ecore:EClass" name="Processor" eSuperTypes="#//Identifiable">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="vendor" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="clockSpeed" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="numberOfCores" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
Expand All @@ -43,32 +47,32 @@
<eLiterals name="nm18" literal="18nm"/>
<eLiterals name="nm25" value="1"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Dimension">
<eClassifiers xsi:type="ecore:EClass" name="Dimension" eSuperTypes="#//Identifiable">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="width" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="height" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="length" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="RAM">
<eClassifiers xsi:type="ecore:EClass" name="RAM" eSuperTypes="#//Identifiable">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="clockSpeed" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="size" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="#//RamType"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="ramType" eType="#//RamType"/>
ndoschek marked this conversation as resolved.
Show resolved Hide resolved
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="RamType">
<eLiterals name="SODIMM" literal="SO-DIMM"/>
<eLiterals name="SIDIMM" literal="SI-DIMM"/>
<eLiterals name="SODIMM" literal="SODIMM"/>
ndoschek marked this conversation as resolved.
Show resolved Hide resolved
<eLiterals name="SIDIMM" value="1" literal="SIDIMM"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Display">
<eClassifiers xsi:type="ecore:EClass" name="Display" eSuperTypes="#//Identifiable">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="width" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="height" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Workflow">
<eClassifiers xsi:type="ecore:EClass" name="Workflow" eSuperTypes="#//Identifiable">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="nodes" lowerBound="1" upperBound="-1"
eType="#//Node" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="flows" upperBound="-1"
eType="#//Flow" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Node" abstract="true">
<eClassifiers xsi:type="ecore:EClass" name="Node" abstract="true" eSuperTypes="#//Identifiable">
<eOperations name="hasCycle" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eParameters name="chain" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
Expand Down Expand Up @@ -158,7 +162,7 @@
</eParameters>
</eOperations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Flow">
<eClassifiers xsi:type="ecore:EClass" name="Flow" eSuperTypes="#//Identifiable">
<eStructuralFeatures xsi:type="ecore:EReference" name="source" lowerBound="1"
eType="#//Node"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="target" lowerBound="1"
Expand Down
Loading