Skip to content

Commit

Permalink
Update Xtext to version 2.33
Browse files Browse the repository at this point in the history
- update Xsemantics
- update Tomcat
- build on Java 17
  • Loading branch information
natzei committed Jan 10, 2024
1 parent cf35910 commit b02bc95
Show file tree
Hide file tree
Showing 15 changed files with 143 additions and 95 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,4 +1,4 @@
FROM tomcat:9-jdk17
FROM tomcat:10-jdk17

LABEL maintainer="atzeinicola@gmail.com"

Expand Down
13 changes: 13 additions & 0 deletions xyz.balzaclang.balzac.lib/.classpath
Expand Up @@ -23,5 +23,18 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
79 changes: 61 additions & 18 deletions xyz.balzaclang.balzac.parent/pom.xml
Expand Up @@ -8,14 +8,14 @@
<packaging>pom</packaging>

<properties>
<mwe2Version>2.13.0</mwe2Version>
<xtext-version>2.27.0</xtext-version>
<tycho-version>2.6.0</tycho-version>
<xsemantics-version>1.22.0-SNAPSHOT</xsemantics-version>
<xsemantics-p2-url>http://download.eclipse.org/xsemantics/milestones/1.22</xsemantics-p2-url>
<mwe2Version>2.16.0</mwe2Version>
<xtext-version>2.33.0</xtext-version>
<tycho-version>3.0.5</tycho-version>
<xsemantics-version>1.24.0</xsemantics-version>
<xsemantics-p2-url>http://download.eclipse.org/xsemantics/milestones/1.24</xsemantics-p2-url>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.release>17</maven.compiler.release>
<tycho.target.execution-environment>JavaSE-17</tycho.target.execution-environment>
<lib.version>1.0.0-SNAPSHOT</lib.version>
Expand Down Expand Up @@ -67,28 +67,20 @@
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-source-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>plugin-source</id>
<goals>
<goal>plugin-source</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-source-feature-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>source-feature</id>
<phase>package</phase>
<id>feature-source</id>
<goals>
<goal>source-feature</goal>
<goal>feature-source</goal>
</goals>
</execution>

</executions>
</plugin>
<plugin>
Expand Down Expand Up @@ -266,6 +258,9 @@
</versionRange>
<goals>
<goal>compile</goal>
<goal>
validate-classpath
</goal>
</goals>
</pluginExecutionFilter>
<action>
Expand Down Expand Up @@ -352,6 +347,32 @@
<enabled>false</enabled>
</snapshots>
</repository>
<!-- This must be disabled explicitly, otherwise it is enabled by https://github.com/mojohaus/mojo-parent
which is taken from exec-maven-plugin from at least version 1.6.0 -->
<repository>
<id>ossrh-snapshots</id>
<name>ossrh-snapshots</name>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
<!-- This is enabled by /org/sonatype/oss/oss-parent/7 used as parent by
org/xtext/antlr-generator/3.2.1 -->
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
Expand All @@ -365,6 +386,28 @@
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>ossrh-snapshots</id>
<name>ossrh-snapshots</name>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
</pluginRepository>
<pluginRepository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<profiles>
<profile>
Expand Down
20 changes: 10 additions & 10 deletions xyz.balzaclang.balzac.target/xyz.balzaclang.balzac.target.target
Expand Up @@ -7,19 +7,19 @@
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20210223232630/repository"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/releases/2022-06"/>
<unit id="org.eclipse.xtext.sdk.feature.group" version="2.27.0.v20220530-0508"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/xsemantics/milestones/1.22"/>
<unit id="org.eclipse.xsemantics.feature.feature.group" version="1.22.0.v20220621-0842"/>
<unit id="org.eclipse.xsemantics.runtime.feature.feature.group" version="1.22.0.v20220621-0842"/>
<unit id="org.eclipse.xsemantics.sdk.feature.group" version="1.22.0.v20220621-0842"/>
<repository location="http://download.eclipse.org/xsemantics/milestones/1.24"/>
<unit id="org.eclipse.xsemantics.feature.feature.group" version="1.24.0.v20231130-1618"/>
<unit id="org.eclipse.xsemantics.runtime.feature.feature.group" version="1.24.0.v20231130-1618"/>
<unit id="org.eclipse.xsemantics.sdk.feature.group" version="1.24.0.v20231130-1618"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/releases/2022-06"/>
<unit id="org.eclipse.emf.mwe2.runtime.sdk.feature.group" version="2.13.0.v20220519-1115"/>
<repository location="http://download.eclipse.org/releases/2023-12"/>
<unit id="org.eclipse.xtext.sdk.feature.group" version="2.33.0.v20231121-0955"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/releases/2023-12"/>
<unit id="org.eclipse.emf.mwe2.runtime.sdk.feature.group" version="2.16.0.v20231117-0522"/>
</location>
</locations>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
Expand Down
3 changes: 2 additions & 1 deletion xyz.balzaclang.balzac.ui.tests/META-INF/MANIFEST.MF
Expand Up @@ -14,7 +14,8 @@ Require-Bundle: xyz.balzaclang.balzac.ui,
org.eclipse.xtext.xbase.junit,
org.eclipse.core.runtime,
org.eclipse.ui.workbench;resolution:=optional,
org.eclipse.xtext.ui.testing
org.eclipse.xtext.ui.testing,
org.eclipse.xtext.xbase.ui.testing
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: xyz.balzaclang.ui.tests;x-internal=true
Import-Package: org.hamcrest.core,
Expand Down
7 changes: 6 additions & 1 deletion xyz.balzaclang.balzac.web/.classpath
Expand Up @@ -8,7 +8,12 @@
</classpathentry>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="src" path="src-resources"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src-resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
Expand Down
4 changes: 2 additions & 2 deletions xyz.balzaclang.balzac.web/WebRoot/index.html
Expand Up @@ -11,7 +11,7 @@

<link rel="stylesheet" type="text/css" href="webjars/codemirror/5.49.0/lib/codemirror.css" />
<link rel="stylesheet" type="text/css" href="webjars/codemirror/5.49.0/addon/hint/show-hint.css" />
<link rel="stylesheet" type="text/css" href="xtext/2.25.0/xtext-codemirror.css"/>
<link rel="stylesheet" type="text/css" href="xtext/2.33.0/xtext-codemirror.css"/>

<!-- Loading buttons -->
<link rel="stylesheet" type="text/css" href="loading-btn/loading.css"/>
Expand Down Expand Up @@ -39,7 +39,7 @@
paths: {
"xtext/balzac": "xtext-resources/generated/mode-balzac",
"jquery": "webjars/jquery/3.4.1/jquery.min",
"xtext/xtext-codemirror": "xtext/2.27.0/xtext-codemirror",
"xtext/xtext-codemirror": "xtext/2.33.0/xtext-codemirror",
"bootstrap": "webjars/bootstrap/4.3.1/js/bootstrap.bundle.min",
"bootstrap-toggle": "webjars/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min"
},
Expand Down
@@ -1,23 +1,23 @@
define(["codemirror", "codemirror/addon/mode/simple"], function(CodeMirror, SimpleMode) {
var keywords = "AIAO|AINO|AISO|BTC|SIAO|SINO|SISO|_|absLock|address|assert|between|block|bool|boolean|checkBlock|checkBlockDelay|checkDate|checkTimeDelay|const|date|else|eval|false|fees|from|fun|hash|hash160|hash256|if|import|input|int|key|mainnet|max|min|network|of|output|package|participant|private|pubkey|relLock|ripemd160|sha1|sha256|sig|signature|size|string|testnet|then|this|toAddress|toPubkey|transaction|true|txid|value|versig|void";
CodeMirror.defineSimpleMode("xtext/balzac", {
start: [
{token: "comment", regex: "\\/\\/.*$"},
{token: "comment", regex: "\\/\\*", next : "comment"},
{token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
{token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
{token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
{token: "lparen", regex: "[\\[({]"},
{token: "rparen", regex: "[\\])}]"},
{token: "keyword", regex: "\\b(?:" + keywords + ")\\b"}
],
comment: [
{token: "comment", regex: ".*?\\*\\/", next : "start"},
{token: "comment", regex: ".+"}
],
meta: {
dontIndentStates: ["comment"],
lineComment: "//"
}
});
var keywords = "AIAO|AINO|AISO|BTC|SIAO|SINO|SISO|_|absLock|address|assert|between|block|bool|boolean|checkBlock|checkBlockDelay|checkDate|checkTimeDelay|const|date|else|eval|false|fees|from|fun|hash|hash160|hash256|if|import|input|int|key|mainnet|max|min|network|of|output|package|participant|private|pubkey|relLock|ripemd160|sha1|sha256|sig|signature|size|string|testnet|then|this|toAddress|toPubkey|transaction|true|txid|value|versig|void";
CodeMirror.defineSimpleMode("xtext/balzac", {
start: [
{token: "comment", regex: "\\/\\/.*$"},
{token: "comment", regex: "\\/\\*", next : "comment"},
{token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
{token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
{token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
{token: "lparen", regex: "[\\[({]"},
{token: "rparen", regex: "[\\])}]"},
{token: "keyword", regex: "\\b(?:" + keywords + ")\\b"}
],
comment: [
{token: "comment", regex: ".*?\\*\\/", next : "start"},
{token: "comment", regex: ".+"}
],
meta: {
dontIndentStates: ["comment"],
lineComment: "//"
}
});
});
6 changes: 3 additions & 3 deletions xyz.balzaclang.balzac.web/pom.xml
Expand Up @@ -177,9 +177,9 @@
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Expand Up @@ -18,9 +18,9 @@
*/
package xyz.balzaclang.web

import javax.servlet.annotation.WebServlet
import org.eclipse.xtext.util.DisposableRegistry
import org.eclipse.xtext.web.servlet.XtextServlet
import jakarta.servlet.annotation.WebServlet

/**
* Deploy this class into a servlet container to enable DSL-specific services.
Expand Down
Expand Up @@ -16,17 +16,17 @@
package xyz.balzaclang.web

import com.google.gson.Gson
import jakarta.servlet.ServletException
import jakarta.servlet.annotation.WebServlet
import jakarta.servlet.http.HttpServlet
import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse
import java.io.IOException
import java.time.Instant
import java.time.LocalDateTime
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter
import java.util.Properties
import javax.servlet.ServletException
import javax.servlet.annotation.WebServlet
import javax.servlet.http.HttpServlet
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse
import org.eclipse.xtend.lib.annotations.Accessors
import org.slf4j.Logger
import org.slf4j.LoggerFactory
Expand Down
Expand Up @@ -17,12 +17,12 @@ package xyz.balzaclang.web

import com.google.gson.Gson
import com.google.gson.JsonParseException
import jakarta.servlet.ServletException
import jakarta.servlet.annotation.WebServlet
import jakarta.servlet.http.HttpServlet
import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse
import java.io.IOException
import javax.servlet.ServletException
import javax.servlet.annotation.WebServlet
import javax.servlet.http.HttpServlet
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse
import org.apache.commons.io.IOUtils
import org.eclipse.xtend.lib.annotations.Accessors
import xyz.balzaclang.lib.model.Address
Expand Down
12 changes: 6 additions & 6 deletions xyz.balzaclang.balzac/META-INF/MANIFEST.MF
Expand Up @@ -6,16 +6,16 @@ Bundle-Vendor: University of Cagliari
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: xyz.balzaclang.balzac; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.xtext;bundle-version="2.27.0",
Require-Bundle: org.eclipse.xtext;bundle-version="2.33.0",
org.eclipse.xtext.xbase,
org.eclipse.xsemantics.runtime;bundle-version="1.22.0",
org.eclipse.equinox.security;bundle-version="1.3.900",
org.eclipse.equinox.common;bundle-version="3.16.100",
org.eclipse.xsemantics.runtime;bundle-version="1.24.0",
org.eclipse.equinox.security;bundle-version="1.4.100",
org.eclipse.equinox.common;bundle-version="3.18.200",
org.eclipse.emf.ecore,
org.eclipse.xtext.xbase.lib;bundle-version="2.27.0",
org.eclipse.xtext.xbase.lib;bundle-version="2.33.0",
org.eclipse.xtext.util,
org.eclipse.emf.common,
org.eclipse.xtend.lib;bundle-version="2.27.0",
org.eclipse.xtend.lib;bundle-version="2.33.0",
org.antlr.runtime;bundle-version="[3.2.0,3.2.1)"
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: xyz.balzaclang,
Expand Down
26 changes: 6 additions & 20 deletions xyz.balzaclang.balzac/pom.xml
Expand Up @@ -58,26 +58,6 @@
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=475098#c3 -->
</configuration>
<dependencies>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.mwe2.launch</artifactId>
<version>${mwe2Version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.common.types</artifactId>
<version>${xtext-version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.xtext.generator</artifactId>
<version>${xtext-version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.xbase</artifactId>
<version>${xtext-version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>xtext-antlr-generator</artifactId>
Expand Down Expand Up @@ -123,6 +103,12 @@
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<!-- <dependencies>-->
<!-- <dependency>-->
<!-- <groupId>javax.annotation</groupId>-->
<!-- <artifactId>javax.annotation-api</artifactId>-->
<!-- </dependency>-->
<!-- </dependencies>-->
</plugin>

<plugin>
Expand Down

0 comments on commit b02bc95

Please sign in to comment.