Skip to content

Commit f754715

Browse files
authored
Initial version of a Webprotocol based EngineAddon server (#220)
* add dap protocol 1.44.0 as testing protocol of the generators * generator from JSON RCP Schema generates typescript interface generates java (+ xtend) client and server interfaces + data generates plantml documentation * add readme for the protocol generator * add java plugin project for dap and addon protocols api * improved protocol generator code * improved protocol data structure management * add eaop protocol to tycho build simplification of the root pom.xml * build addon protocol plugin * add engine_addon_protocol pomfirst build * add dsl.ecore to the resulting jar * basic impl of IEngineAddon protocol * add websocket server extensionpoint * add ws.server plugin * add executionframework.addon.eaop.server to build * makes sure to activate the websocket server * use jetty 10 javax websocket server * rename thirdparties_pom_to_p2 * enforce install of apache apache.aries required to fulfill jetty requirements * add org.eclipse.gemoc.commons.utils * bump to tycho 2.7.0 * add websocket server and eaop protocol to studio * add EAOP documentation * add mapstruct support Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
1 parent e50353d commit f754715

File tree

99 files changed

+10210
-79
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+10210
-79
lines changed

.asciidoctorconfig.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2+
// + Initial AsciiDoc editor configuration file - V1.0 +
3+
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++
4+
//
5+
// Did not found any configuration files, so create this at project root level.
6+
// If you do not like those files to be generated - you can turn it off inside Asciidoctor Editor preferences.
7+
//
8+
// You can define editor specific parts here.
9+
// For example: with next line you could set imagesdir attribute to subfolder "images" relative to the folder where this config file is located.
10+
// :imagesdir: {asciidoctorconfigdir}/images
11+
//
12+
// For more information please take a look at https://github.com/de-jcup/eclipse-asciidoctor-editor/wiki/Asciidoctor-configfiles

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
1212
hs_err_pid*
1313

14+
node_modules
1415
bin
1516
target
1617
build.acceleo

.mvn/extensions.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<extensions>
3-
<extension>
4-
<groupId>org.eclipse.tycho.extras</groupId>
5-
<artifactId>tycho-pomless</artifactId>
6-
<version>2.5.0</version>
7-
</extension>
3+
<extension>
4+
<groupId>org.eclipse.tycho</groupId>
5+
<artifactId>tycho-build</artifactId>
6+
<version>2.7.0</version>
7+
</extension>
88
</extensions>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
4+
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
5+
<classpathentry kind="src" path="src"/>
6+
<classpathentry kind="output" path="bin"/>
7+
</classpath>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>org.eclipse.gemoc.commons.utils</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.pde.ManifestBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.pde.SchemaBuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
</buildSpec>
24+
<natures>
25+
<nature>org.eclipse.pde.PluginNature</nature>
26+
<nature>org.eclipse.jdt.core.javanature</nature>
27+
</natures>
28+
</projectDescription>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4+
org.eclipse.jdt.core.compiler.compliance=1.8
5+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7+
org.eclipse.jdt.core.compiler.source=1.8
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: GEMOC Commons Utils
4+
Bundle-SymbolicName: org.eclipse.gemoc.commons.utils
5+
Bundle-Version: 1.0.0.qualifier
6+
Bundle-Vendor: Inria
7+
Automatic-Module-Name: org.eclipse.gemoc.commons.utils
8+
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
9+
Export-Package: org.eclipse.gemoc.commons.utils
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source.. = src/
2+
output.. = bin/
3+
bin.includes = META-INF/,\
4+
.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
4+
http://maven.apache.org/maven-v4_0_0.xsd">
5+
6+
<modelVersion>4.0.0</modelVersion>
7+
8+
<groupId>org.eclipse.gemoc.pomfirst</groupId>
9+
<artifactId>org.eclipse.gemoc.commons.utils</artifactId>
10+
<version>1.0.0-SNAPSHOT</version>
11+
12+
<packaging>jar</packaging>
13+
14+
<properties>
15+
<tycho.scmUrl>scm:git:https://github.com/eclipse/gemoc-studio-modeldebugging.git</tycho.scmUrl>
16+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17+
</properties>
18+
19+
20+
<build>
21+
<plugins>
22+
<plugin>
23+
<groupId>org.apache.maven.plugins</groupId>
24+
<artifactId>maven-dependency-plugin</artifactId>
25+
<executions>
26+
<execution>
27+
<id>unpack</id>
28+
<phase>prepare-package</phase>
29+
<goals>
30+
<goal>unpack</goal>
31+
</goals>
32+
<configuration>
33+
<artifactItems>
34+
<artifactItem>
35+
<groupId>org.eclipse.gemoc.commons</groupId>
36+
<artifactId>${project.artifactId}</artifactId>
37+
<version>${project.version}</version>
38+
<type>jar</type>
39+
<overWrite>true</overWrite>
40+
<outputDirectory>${project.build.directory}/classes</outputDirectory>
41+
<includes>**</includes>
42+
</artifactItem>
43+
</artifactItems>
44+
</configuration>
45+
</execution>
46+
</executions>
47+
</plugin>
48+
</plugins>
49+
</build>
50+
51+
<dependencies>
52+
</dependencies>
53+
<repositories>
54+
<repository>
55+
<id>nexus-eclipse-gemoc</id>
56+
<name>Nexus Eclipse GEMOC</name>
57+
<releases>
58+
<enabled>true</enabled>
59+
</releases>
60+
<snapshots>
61+
<enabled>true</enabled>
62+
</snapshots>
63+
<url>https://repo.eclipse.org/content/groups/gemoc/</url>
64+
</repository>
65+
</repositories>
66+
</project>
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2020 Inria and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* Inria - initial API and implementation
10+
*******************************************************************************/
11+
package org.eclipse.gemoc.commons.utils;
12+
13+
import java.io.ByteArrayInputStream;
14+
import java.io.IOException;
15+
import java.io.InputStream;
16+
import java.util.concurrent.LinkedBlockingQueue;
17+
18+
public class ExtensibleInputStream extends InputStream {
19+
20+
LinkedBlockingQueue<InputStream> messages = new LinkedBlockingQueue<>();
21+
22+
@Override
23+
public int read() throws IOException {
24+
25+
// System.out.println("[DEBUG] Read InputStream");
26+
27+
waitForMessage();
28+
29+
InputStream current = messages.peek();
30+
int c = current.read();
31+
if(c != -1) {
32+
return c;
33+
}
34+
else {
35+
// System.out.println("[DEBUG] End InputStream 2");
36+
messages.poll();
37+
38+
waitForMessage();
39+
40+
current = messages.peek();
41+
return current.read();
42+
}
43+
}
44+
45+
public void addMessage(String message) {
46+
// System.out.println("[DEBUG] Fill InputStream");
47+
messages.add(new ByteArrayInputStream(message.getBytes()));
48+
synchronized (this) {
49+
this.notify();
50+
}
51+
}
52+
53+
public void waitForMessage() {
54+
if(messages.isEmpty()) {
55+
try {
56+
synchronized (this) {
57+
this.wait();
58+
}
59+
} catch (InterruptedException e) {
60+
e.printStackTrace();
61+
}
62+
// System.out.println("[DEBUG] Wait");
63+
}
64+
}
65+
}

0 commit comments

Comments
 (0)