fixes include mechanism

This commit is contained in:
2025-10-05 07:54:31 +02:00
parent d9360ce1fd
commit 4305f2ef36
15 changed files with 91 additions and 19 deletions

View File

@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Automatic-Module-Name: com.minres.coredsl.json
Bundle-ManifestVersion: 2
Bundle-Vendor: MINRES Technologies GmbH
Bundle-Version: 2.0.2
Bundle-Version: 2.0.3
Bundle-SymbolicName: com.minres.coredsl.json;singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: com.minres.coredsl;bundle-version="2.0.0",
@@ -12,7 +12,7 @@ Require-Bundle: com.minres.coredsl;bundle-version="2.0.0",
org.eclipse.equinox.preferences;bundle-version="3.8.0",
org.eclipse.xtend.lib;bundle-version="2.14.0",
org.eclipse.xtext;bundle-version="2.22.0",
org.eclipse.emf.mwe.utils;bundle-version="1.6.2",
org.eclipse.emf.mwe.utils,
org.apache.commons.logging;bundle-version="1.2.0",
org.json;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-17

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.coredsl</groupId>
<artifactId>com.minres.coredsl.json.parent</artifactId>
<version>2.0.2</version>
<version>2.0.3</version>
<relativePath>..</relativePath>
</parent>
<artifactId>com.minres.coredsl.json</artifactId>

View File

@@ -8,6 +8,8 @@ import org.eclipse.xtext.generator.JavaIoFileSystemAccess
import org.eclipse.xtext.generator.IOutputConfigurationProvider
import javax.inject.Singleton
import com.minres.coredsl.json.GeneratorOutputConfigurationProvider
import org.eclipse.xtext.scoping.impl.ImportUriResolver
import com.minres.coredsl.scoping.IncludeUriResolver
/**
* Use this class to register components to be used at runtime / without the Equinox extension registry.
@@ -21,11 +23,11 @@ import com.minres.coredsl.json.GeneratorOutputConfigurationProvider
.in(Singleton);
binder.bind(IFileSystemAccess2)
.to(JavaIoFileSystemAccess)
binder.bind(ImportUriResolver)
.to(IncludeUriResolver);
}
def Class<? extends IGenerator2> bindIGenerator2() {
// return DummyGenerator.class;
return typeof(CoreDslJsonGenerator)
}
}

View File

@@ -38,8 +38,8 @@ class Main implements Callable<Integer> {
@Option(names=#["-o", "--output-file"], description="output file")
public File outputFile;
@Option(names=#["-r", "--repository"], description="repository directory")
public String repository = "";
@Option(names=#["-r", "--repository"], description="one ore more repository directories")
public String[] repositories;
@Option(names=#["-v", "--verbose"], description="verbose output")
public Boolean verbose = false;
@@ -70,12 +70,12 @@ class GeneratorMain {
@Inject JavaIoFileSystemAccess fsa
def run(Main params) {
if (params.repository.length > 0) {
params.repositories.forEach[repository, idx|
val projectMapping = new ProjectMapping
projectMapping.projectName = "CoreDSL Repository"
projectMapping.path = params.repository
projectMapping.projectName = "Repository:"+idx
projectMapping.path = repository
new StandaloneSetup().addProjectMapping(projectMapping)
}
]
try {
for (file : params.files) {
// Load the resource