Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ class GenerateLanguageServer {
return validateModels()
}

// Avoid Guice's unsafe class loading on newer JDKs.
if (System.getProperty("guice_custom_class_loading") === null) {
System.setProperty("guice_custom_class_loading", "CHILD")
}
val server = new «data.visualizationName.toFirstUpper»LanguageServer
server.configureAndRun(new «data.visualizationName.toFirstUpper»LanguageRegistration, new «data.visualizationName.toFirstUpper»LsCreator)
return CommandLine.ExitCode.OK
Expand Down Expand Up @@ -448,27 +452,6 @@ class GenerateLanguageServer {
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21&quot; path=&quot;5&quot; type=&quot;4&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry path=&quot;5&quot; projectName=&quot;«data.bundleNamePrefix».language.server&quot; type=&quot;1&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/«data.bundleNamePrefix».language.server&quot; path=&quot;5&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry path=&quot;5&quot; projectName=&quot;«data.bundleNamePrefix».model&quot; type=&quot;1&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/«data.bundleNamePrefix».model&quot; path=&quot;5&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry path=&quot;5&quot; projectName=&quot;«data.bundleNamePrefix».viz&quot; type=&quot;1&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/«data.bundleNamePrefix».viz&quot; path=&quot;5&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry path=&quot;5&quot; projectName=&quot;«data.modelBundleNamePrefix».model&quot; type=&quot;1&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/«data.modelBundleNamePrefix».model&quot; path=&quot;5&quot; type=&quot;2&quot;/&gt;&#10;"/>
«IF !noModelDsl»
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry path=&quot;5&quot; projectName=&quot;«data.modelBundleNamePrefix».model.dsl&quot; type=&quot;1&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/«data.modelBundleNamePrefix».model.dsl&quot; path=&quot;5&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry path=&quot;5&quot; projectName=&quot;«data.modelBundleNamePrefix».model.dsl.ide&quot; type=&quot;1&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/«data.modelBundleNamePrefix».model.dsl.ide&quot; path=&quot;5&quot; type=&quot;2&quot;/&gt;&#10;"/>
«ENDIF»
«IF !noDiff»
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry path=&quot;5&quot; projectName=&quot;«data.bundleNamePrefix».diffviz&quot; type=&quot;1&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/«data.bundleNamePrefix».diffviz&quot; path=&quot;5&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry path=&quot;5&quot; projectName=&quot;«data.modelBundleNamePrefix».diff.dsl&quot; type=&quot;1&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/«data.modelBundleNamePrefix».diff.dsl&quot; path=&quot;5&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry path=&quot;5&quot; projectName=&quot;«data.modelBundleNamePrefix».diff.dsl.ide&quot; type=&quot;1&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/«data.modelBundleNamePrefix».diff.dsl.ide&quot; path=&quot;5&quot; type=&quot;2&quot;/&gt;&#10;"/>
«ENDIF»
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER&quot; path=&quot;5&quot; type=&quot;4&quot;/&gt;&#10;"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class GenerateMavenBuild {
if (!project.exists || !project.isDirectory) {
throw new IllegalStateException("The project does either not exist or is not a directory, but should be: " + projectId)
}
val content = pomXmlContent(artifactIdPrefix, bundleSuffix, version, bundleSuffix.equals("model"))
val content = pomXmlContent(artifactIdPrefix, bundleSuffix, version)
FileGenerator.generateFile(project, "pom.xml", content)
}

Expand Down Expand Up @@ -166,7 +166,11 @@ class GenerateMavenBuild {

'''
}
private static def pomXmlContent(String vizArtifactIdPrefix, String bundleSuffix, String version, boolean modelXcoreBuild) {
private static def pomXmlContent(String vizArtifactIdPrefix, String bundleSuffix, String version) {
val modelXcoreBuild = bundleSuffix.equals("model")
val includeServicesResource = bundleSuffix.equals("viz") || bundleSuffix.equals("diffviz")
val includeIconsResource = bundleSuffix.equals("viz")

return '''
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
Expand All @@ -184,6 +188,23 @@ class GenerateMavenBuild {

<build>
<sourceDirectory>src-gen</sourceDirectory>
«IF includeServicesResource»
<resources>
<resource>
<directory>META-INF</directory>
<targetPath>META-INF</targetPath>
<includes>
<include>services/**</include>
</includes>
</resource>
«IF includeIconsResource»
<resource>
<directory>icons</directory>
<targetPath>icons</targetPath>
</resource>
«ENDIF»
</resources>
«ENDIF»
<plugins>
«IF modelXcoreBuild»
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ class SPVizGenerator extends AbstractGenerator {
val deps = newLinkedList(
new Dependency("com.google.code.gson", "gson", "${gson-version}"),
new Dependency("com.google.inject", "guice", "${guice-version}"),
new Dependency("com.google.guava", "guava", "${guava-version}"),
new Dependency("de.cau.cs.kieler.klighd", "de.cau.cs.kieler.kgraph.text", "${klighd-version}"),
new Dependency("de.cau.cs.kieler.klighd", "de.cau.cs.kieler.kgraph.text.ide", "${klighd-version}"),
new Dependency("de.cau.cs.kieler.klighd", "de.cau.cs.kieler.klighd", "${klighd-version}"),
Expand All @@ -299,6 +300,8 @@ class SPVizGenerator extends AbstractGenerator {
new Dependency("org.eclipse.xtend", "org.eclipse.xtend.lib", "${xtend-version}"),
new Dependency("org.eclipse.xtext", "org.eclipse.xtext.ide", "${xtext-version}"),
new Dependency("org.eclipse.xtext", "org.eclipse.xtext.xbase.lib", "${xtext-version}"),
new Dependency("org.eclipse.platform", "org.eclipse.core.runtime", "${core-runtime-version}"),
new Dependency("org.eclipse.platform", "org.eclipse.equinox.common", "${equinox-common-version}"),
new Dependency("info.picocli", "picocli", "4.7.7"),
new Dependency("org.eclipse.emf", "org.eclipse.emf.ecore.xmi", "2.39.0"),
new Dependency(data.bundleNamePrefix, data.bundleNamePrefix + ".model", "${project.version}"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,18 @@ class GenerateModelMavenBuild {

<elk-version>0.11.0</elk-version>
<gson-version>2.13.2</gson-version>
<guava-version>33.7.1-jre</guava-version>
<guice-version>7.0.0</guice-version>
<klighd-version>3.1.0.v20250428</klighd-version>
<lsp4j-version>0.24.0</lsp4j-version>
<tycho-version>4.0.13</tycho-version>
<xtext-version>2.41.0</xtext-version>
<xtend-version>2.41.0</xtend-version>

<!-- a few dependency versions from the currently used Eclipse Platform release to avoid signer mismatches from incompatible version numbers -->
<core-runtime-version>3.34.100</core-runtime-version>
<equinox-common-version>3.20.300</equinox-common-version>

<sourceFeatureLabelSuffix>&#xA0;(Sources)</sourceFeatureLabelSuffix>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ class Dependency {
<groupId>«groupId»</groupId>
<artifactId>«artifactId»</artifactId>
<version>«version»</version>
««« Exclude P2 artifacts from dependent own bundles, only use Maven artifacts. Relevant when launching from Eclipse.
«IF version.equals("${project.version}")»
<exclusions>
<exclusion>
<groupId>p2.eclipse.plugin</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
«ENDIF»
</dependency>
'''
}
Expand Down
Loading