Skip to content

Commit

Permalink
[all] Split the UI module into "ui" and "ide" modules.
Browse files Browse the repository at this point in the history
Merging these modules breaks down the modular definition of the packages
provided by Xtext. It makes impossible to use SARL with Java 11
framework.

see #955

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Oct 1, 2020
1 parent 43d4bb4 commit 6b9916a
Show file tree
Hide file tree
Showing 19 changed files with 197 additions and 68 deletions.
18 changes: 18 additions & 0 deletions main/coreplugins/io.sarl.lang.ide/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: io.sarl.lang.ide
Bundle-SymbolicName: io.sarl.lang.ide;singleton:=true
Bundle-Version: 0.12.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: io.sarl.lang.ide,
io.sarl.lang.ide.contentassist.antlr,
io.sarl.lang.ide.contentassist.antlr.internal
Require-Bundle: io.sarl.lang.core;bundle-version="0.12.0",
io.sarl.lang;bundle-version="0.12.0",
org.eclipse.xtext.common.types.ui;bundle-version="2.22.0",
org.eclipse.xtext.ide;bundle-version="2.22.0",
org.eclipse.xtext.xbase.ide;bundle-version="2.22.0",
org.eclipse.xtend.core;bundle-version="2.22.0",
com.google.inject;bundle-version="4.2.3"
Automatic-Module-Name: io.sarl.lang.ide
6 changes: 6 additions & 0 deletions main/coreplugins/io.sarl.lang.ide/build.properties
@@ -0,0 +1,6 @@
source.. = src/,\
src-gen/
bin.includes = META-INF/,\
.
jre.compilation.profile = JavaSE-1.8
jars.compile.order = .
90 changes: 90 additions & 0 deletions main/coreplugins/io.sarl.lang.ide/pom.xml
@@ -0,0 +1,90 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.sarl</groupId>
<artifactId>io.sarl.tycho-parent-ui</artifactId>
<version>0.12.0-SNAPSHOT</version>
<relativePath>../../../tycho-parent/tycho-parent-ui</relativePath>
</parent>

<artifactId>io.sarl.lang.ide</artifactId>
<packaging>eclipse-plugin</packaging>
<name>Eclipse IDE Contributions</name>

<build>
<plugins>
<!-- The following resource plugin is used to copy the files from "src-gen/META-INF"
into the root META-INF. The files into src-gen are created by the MWE2 generator. -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-xtext-generated-metainf</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<overwrite>true</overwrite>
<outputDirectory>${basedir}/META-INF/services</outputDirectory>
<resources>
<resource>
<directory>/src-gen/META-INF/services</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<executions>
<execution>
<id>prepare-eclipse-buildproperties</id>
<phase>process-resources</phase>
<goals>
<goal>replace</goal>
</goals>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<file>${project.basedir}/build.properties</file>
<regexFlags>
<regexFlag>MULTILINE</regexFlag>
</regexFlags>
<replacements>
<replacement>
<token>^(jre\.compilation\.profile *= *)(.*)$</token>
<value>$1${sarl-dsl.min.jre.environment}</value>
</replacement>
</replacements>
</configuration>
</execution>
<execution>
<id>prepare-eclipse-manifestmf</id>
<phase>process-resources</phase>
<goals>
<goal>replace</goal>
</goals>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<file>${project.basedir}/META-INF/MANIFEST.MF</file>
<regexFlags>
<regexFlag>MULTILINE</regexFlag>
</regexFlags>
<replacements>
<replacement>
<token>^(Bundle-RequiredExecutionEnvironment: *)(.*)$</token>
<value>$1${sarl-run.min.jre.environment}</value>
</replacement>
</replacements>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Expand Up @@ -22,12 +22,13 @@
package io.sarl.lang.ide;

/**
* Use this class to register ide components.
* Use this class to register IDE components of the SARL suite.
*
* @author $Author: sgalland$
* @version $FullVersion$
* @mavengroupid $GroupId$
* @mavenartifactid $ArtifactId$
* @since 0.12
*/
public class SARLIdeModule extends AbstractSARLIdeModule {
//
Expand Down
Expand Up @@ -35,6 +35,7 @@
* @version $FullVersion$
* @mavengroupid $GroupId$
* @mavenartifactid $ArtifactId$
* @since 0.12
*/
public class SARLIdeSetup extends SARLStandaloneSetup {

Expand Down
Expand Up @@ -52,14 +52,17 @@ var baseName = "io.sarl.lang"
var runtimeProjectName = "${baseName}"
var projectPath = "${rootPath}/${runtimeProjectName}"

var uiProjectName = "${baseName}.ui"
var uiProjectPath = "${rootPath}/${uiProjectName}"
var genericUiProjectName = "${baseName}.ui"
var genericUiProjectPath = "${rootPath}/${genericUiProjectName}"

var ideProjectName = "${baseName}.ide"
var ideProjectPath = "${rootPath}/${ideProjectName}"

var testProjectName = "io.sarl.tests.api"
var testProjectPath = "${overallRootPath}/tests/${testProjectName}"

var testUiProjectName = "${testProjectName}.ui"
var testUiProjectPath = "${overallRootPath}/tests/${testUiProjectName}"
var testEclipseProjectName = "${testProjectName}.ui"
var testEclipseProjectPath = "${overallRootPath}/tests/${testEclipseProjectName}"

var externalToolPath = "${overallRootPath}/formatting-styles"

Expand Down Expand Up @@ -107,13 +110,16 @@ Workflow {
directory = "${projectPath}/src-gen"
}
component = DirectoryCleaner {
directory = "${uiProjectPath}/src-gen"
directory = "${genericUiProjectPath}/src-gen"
}
component = DirectoryCleaner {
directory = "${ideProjectPath}/src-gen"
}
component = DirectoryCleaner {
directory = "${testProjectPath}/src/generated/java"
}
component = DirectoryCleaner {
directory = "${testUiProjectPath}/src-gen"
directory = "${testEclipseProjectPath}/src-gen"
}
component = DirectoryCleaner {
directory = "${prettifyToolPath}"
Expand Down Expand Up @@ -142,25 +148,27 @@ Workflow {
configuration = SarlGeneratorModule {
// Project configuration
project = StandardProjectConfig auto-inject {
baseName = baseName
rootPath = rootPath
runtime = auto-inject {
enabled = true
name = runtimeProjectName
}
eclipsePlugin = auto-inject {
enabled = true
name = uiProjectName
name = genericUiProjectName
}
genericIde = auto-inject {
enabled = true
name = uiProjectName
name = ideProjectName
}
runtimeTest = auto-inject {
enabled = true
root = testProjectPath
}
eclipsePluginTest = auto-inject {
enabled = true
root = testUiProjectPath
root = testEclipseProjectPath
}
mavenLayout = false
createEclipseMetaData = true
Expand Down
24 changes: 9 additions & 15 deletions main/coreplugins/io.sarl.lang.ui/META-INF/MANIFEST.MF
@@ -1,34 +1,28 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-Name: io.sarl.lang.ui
Bundle-Vendor: %Bundle-Vendor
Bundle-Version: 0.12.0.qualifier
Bundle-SymbolicName: io.sarl.lang.ui; singleton:=true
Automatic-Module-Name: io.sarl.lang.ui
Bundle-ActivationPolicy: lazy
Require-Bundle: io.sarl.lang;bundle-version="0.12.0";visibility:=reexport,
org.eclipse.xtext.ui;bundle-version="2.22.0",
io.sarl.lang.ide;bundle-version="0.12.0",
org.eclipse.xtext.builder;bundle-version="2.22.0",
org.eclipse.xtext.common.types.ui;bundle-version="2.22.0",
org.eclipse.xtext.xbase.ui;bundle-version="2.22.0",
org.eclipse.xtext.ui.shared;bundle-version="2.22.0",
org.eclipse.xtext.ui;bundle-version="2.22.0",
org.eclipse.xtext.ui.codetemplates.ui;bundle-version="2.22.0",
org.eclipse.xtext.xbase.ui;bundle-version="2.22.0",
org.eclipse.xtext.builder;bundle-version="2.22.0",
org.eclipse.xtend.ide;bundle-version="2.22.0",
org.eclipse.xtend.core;bundle-version="2.22.0",
org.eclipse.xtext.common.types.ui;bundle-version="2.22.0",
org.eclipse.xtend.ide;bundle-version="2.22.0",
org.eclipse.compare;bundle-version="3.7.1000",
org.eclipse.jdt.core;bundle-version="3.22.0",
org.eclipse.jdt.ui;bundle-version="3.21.100",
org.eclipse.compare;bundle-version="3.7.1000",
org.eclipse.jdt.debug.ui;bundle-version="3.11.0",
org.eclipse.ui;bundle-version="3.117.0",
org.eclipse.ui.editors;bundle-version="3.13.200",
org.antlr.runtime;bundle-version="3.2.0",
org.eclipse.ui.forms;bundle-version="3.9.100"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Activator: io.sarl.lang.ui.internal.LangActivator
Export-Package: io.sarl.lang.ide,
io.sarl.lang.ide.contentassist.antlr,
io.sarl.lang.ide.contentassist.antlr.internal,
io.sarl.lang.ui,
Export-Package: io.sarl.lang.ui,
io.sarl.lang.ui.codebuilder,
io.sarl.lang.ui.codemining,
io.sarl.lang.ui.compiler,
Expand Down
1 change: 1 addition & 0 deletions main/coreplugins/pom.xml
Expand Up @@ -24,6 +24,7 @@
<module>io.sarl.lang.core</module>
<module>io.sarl.lang</module>
<module>io.sarl.lang.ui</module>
<module>io.sarl.lang.ide</module>
<module>io.sarl.eclipse</module>
<module>io.sarl.m2e</module>
<module>io.sarl.eclipse-dsl4sarl</module>
Expand Down
1 change: 1 addition & 0 deletions main/features/io.sarl.baseplatform.dsl/feature.xml
Expand Up @@ -348,6 +348,7 @@ for the SARL DSL Environment
<import plugin="org.eclipse.core.runtime" version="3.18.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.workbench" version="3.119.0" match="greaterOrEqual"/>
<import plugin="org.antlr.runtime" version="3.2.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jgit" version="5.8.0" match="equivalent"/>
</requires>

<plugin
Expand Down
28 changes: 5 additions & 23 deletions main/features/io.sarl.compiler/feature.xml
Expand Up @@ -238,22 +238,6 @@
<import plugin="org.apache.commons.io" version="2.6.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.runtime" version="3.18.0" match="greaterOrEqual"/>
<import plugin="org.apache.log4j"/>
<import plugin="io.sarl.lang" version="0.12.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.ui" version="2.22.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.ui.shared" version="2.22.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.ui.codetemplates.ui" version="2.22.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.xbase.ui" version="2.22.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.builder" version="2.22.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtend.ide" version="2.22.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.common.types.ui" version="2.22.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.core" version="3.22.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.ui" version="3.21.100" match="greaterOrEqual"/>
<import plugin="org.eclipse.compare" version="3.7.1000" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.debug.ui" version="3.11.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui" version="3.117.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.editors" version="3.13.200" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.forms" version="3.9.100" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.ui.codemining"/>
<import plugin="org.eclipse.core.runtime" version="3.6.0" match="compatible"/>
<import plugin="org.eclipse.emf.common" version="2.19.0" match="compatible"/>
<import plugin="org.eclipse.core.resources" version="3.6.0" match="compatible"/>
Expand All @@ -267,11 +251,16 @@
<import plugin="org.eclipse.emf.ecore" version="2.20.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.emf.common" version="2.17.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtend.lib" version="2.14.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.ui" version="2.22.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.editors" version="3.11.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.ide" version="3.13.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui" version="3.109.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.builder" version="2.22.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.common.types.ui" version="2.22.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.ui.shared" version="2.22.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.common.types.shared"/>
<import plugin="org.eclipse.xtext.xbase.lib" version="2.14.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.ui.codetemplates.ui" version="2.22.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.search" version="3.11.100" match="greaterOrEqual"/>
<import plugin="org.apache.commons.lang" version="2.6.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.filesystem" version="1.7.0" match="greaterOrEqual"/>
Expand All @@ -288,13 +277,6 @@
version="0.0.0"
unpack="false"/>

<plugin
id="io.sarl.lang.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.emf.codegen"
download-size="0"
Expand Down

0 comments on commit 6b9916a

Please sign in to comment.