From 4431e313a3d4c2f9d5b626e3b8d638596ee21725 Mon Sep 17 00:00:00 2001 From: Guido Grune <100089178+gg-dim@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:15:30 +0200 Subject: [PATCH 01/21] Add sonatype snapshot url --- .../resources/template/workspace.bnd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.gecko.emf.util.bnd.library.workspace/resources/template/workspace.bnd b/org.gecko.emf.util.bnd.library.workspace/resources/template/workspace.bnd index 484934d2..7d5a638c 100644 --- a/org.gecko.emf.util.bnd.library.workspace/resources/template/workspace.bnd +++ b/org.gecko.emf.util.bnd.library.workspace/resources/template/workspace.bnd @@ -1,7 +1,7 @@ -plugin.geckoEMFUtil: \ aQute.bnd.repository.maven.provider.MavenBndRepository;\ releaseUrl = "https://repo.maven.apache.org/maven2/,https://devel.data-in-motion.biz/nexus/repository/dim-release/"; \ - snapshotUrl = "https://devel.data-in-motion.biz/nexus/repository/dim-snapshot/";\ + snapshotUrl = "https://devel.data-in-motion.biz/nexus/repository/dim-snapshot/,https://oss.sonatype.org/content/repositories/snapshots/";\ index = "${.}/geckoEMFUtil.maven" ;\ readOnly = true;\ - name="GeckoEMF Util Dependencies" \ No newline at end of file + name="GeckoEMF Util Dependencies" From 6a12b3c38d7a473228f9112475eead258844bae7 Mon Sep 17 00:00:00 2001 From: Mark Hoffmann Date: Fri, 15 Jul 2022 20:16:49 +0200 Subject: [PATCH 02/21] #3 - set context attribute of ROOT_ELEMENT is set Signed-off-by: Mark Hoffmann --- .../emf/json/configuration/ConfigurableJsonResource.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java index 800020c4..8f91cfdb 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java @@ -11,6 +11,7 @@ */ package org.gecko.emf.json.configuration; +import static org.eclipse.emfcloud.jackson.databind.EMFContext.Attributes.ROOT_ELEMENT; import static org.eclipse.emfcloud.jackson.databind.EMFContext.Attributes.RESOURCE; import static org.eclipse.emfcloud.jackson.databind.EMFContext.Attributes.RESOURCE_SET; @@ -216,6 +217,10 @@ protected void doLoad(InputStream inputStream, Map options) throws IOExcep ContextAttributes attributes = EMFContext.from(options).withPerCallAttribute(RESOURCE_SET, getResourceSet()) .withPerCallAttribute(RESOURCE, this); + EClass eclass = getOrDefault(options, EMFJs.OPTION_ROOT_ELEMENT, null); + if (eclass != null) { + attributes = attributes.withPerCallAttribute(ROOT_ELEMENT, eclass); + } configureMapper(options).reader().with(attributes).forType(Resource.class).withValueToUpdate(this) .readValue(inputStream); From 9a88225f6b7fce2151f28c152db5079a01740ac3 Mon Sep 17 00:00:00 2001 From: Mark Hoffmann Date: Fri, 15 Jul 2022 20:59:46 +0200 Subject: [PATCH 03/21] fixes #3 - added root_element attribute - added tests Signed-off-by: Mark Hoffmann --- org.gecko.emf.json.tests/bnd.bnd | 6 +- .../gecko/emf/json/tests/RootElementTest.java | 124 ++++++++++++++++++ org.gecko.emf.json.tests/test.bndrun | 7 +- 3 files changed, 133 insertions(+), 4 deletions(-) create mode 100644 org.gecko.emf.json.tests/src/org/gecko/emf/json/tests/RootElementTest.java diff --git a/org.gecko.emf.json.tests/bnd.bnd b/org.gecko.emf.json.tests/bnd.bnd index 7a9faf5d..9b5ff3ed 100644 --- a/org.gecko.emf.json.tests/bnd.bnd +++ b/org.gecko.emf.json.tests/bnd.bnd @@ -6,4 +6,8 @@ javac.target: 11 Bundle-Version: 1.0.1.SNAPSHOT -buildpath: \ - org.eclipse.emfcloud.emfjson-jackson;version=latest \ No newline at end of file + org.eclipse.emfcloud.emfjson-jackson;version=latest,\ + org.gecko.emf.osgi.component,\ + org.eclipse.emf.ecore.xmi,\ + org.eclipse.emf.ecore,\ + org.gecko.emf.osgi.example.model.basic \ No newline at end of file diff --git a/org.gecko.emf.json.tests/src/org/gecko/emf/json/tests/RootElementTest.java b/org.gecko.emf.json.tests/src/org/gecko/emf/json/tests/RootElementTest.java new file mode 100644 index 00000000..e8e8209c --- /dev/null +++ b/org.gecko.emf.json.tests/src/org/gecko/emf/json/tests/RootElementTest.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) 2012 - 2022 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ +package org.gecko.emf.json.tests; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.gecko.emf.json.configuration.ConfigurableJsonResource; +import org.gecko.emf.json.configuration.ConfigurableJsonResourceFactory; +import org.gecko.emf.json.constants.EMFJs; +import org.gecko.emf.osgi.example.model.basic.BasicFactory; +import org.gecko.emf.osgi.example.model.basic.BasicPackage; +import org.gecko.emf.osgi.example.model.basic.Person; +import org.gecko.emf.osgi.example.model.basic.impl.BasicPackageImpl; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +/** + * + * @author mark + * @since 15.07.2022 + */ +public class RootElementTest { + + private ResourceSetImpl resourceSet; + private BasicPackage packageImpl; + private BasicFactory factoryImpl; + + @BeforeEach + public void beforeEach() { + resourceSet = new ResourceSetImpl(); + resourceSet.getPackageRegistry().put(EcorePackage.eNS_URI, EcorePackage.eINSTANCE); + packageImpl = BasicPackageImpl.init(); + factoryImpl = BasicFactory.eINSTANCE; + resourceSet.getPackageRegistry().put(BasicPackage.eNS_URI, packageImpl); + resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("json", new ConfigurableJsonResourceFactory()); + } + + @Test + public void testSaveJson() { + Resource resource = resourceSet.createResource(URI.createURI("test.json")); + assertNotNull(resource); + assertTrue(resource instanceof ConfigurableJsonResource); + + Person p = factoryImpl.createPerson(); + p.setFirstName("Emil"); + p.setLastName("Tester"); + resource.getContents().add(p); + + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + resource.save(baos, null); + } catch (IOException e) { + fail("Error saving Person"); + } + String result = new String(baos.toByteArray()); + System.out.println(result); + } + + @Test + public void testLoadJsonError() { + String json = "{\n" + + " \"firstName\" : \"Emil\",\n" + + " \"lastName\" : \"Tester\"\n" + + "}"; + Resource loadResource = resourceSet.createResource(URI.createURI("test-load-error.json")); + assertNotNull(loadResource); + assertTrue(loadResource instanceof ConfigurableJsonResource); + + ByteArrayInputStream bais = new ByteArrayInputStream(json.getBytes()); + try { + loadResource.load(bais, null); + assertEquals(0, loadResource.getContents().size()); + } catch (IOException e) { + fail("Error loading Person"); + } + } + + @Test + public void testLoadJson() { + String json = "{\n" + + " \"firstName\" : \"Emil\",\n" + + " \"lastName\" : \"Tester\"\n" + + "}"; + Resource loadResource = resourceSet.createResource(URI.createURI("test-load.json")); + assertNotNull(loadResource); + assertTrue(loadResource instanceof ConfigurableJsonResource); + + ByteArrayInputStream bais = new ByteArrayInputStream(json.getBytes()); + try { + Map loadOptions = new HashMap(); + loadOptions.put(EMFJs.OPTION_ROOT_ELEMENT, packageImpl.getPerson()); + loadResource.load(bais, loadOptions); + assertEquals(1, loadResource.getContents().size()); + Person p = (Person) loadResource.getContents().get(0); + assertEquals("Emil", p.getFirstName()); + assertEquals("Tester", p.getLastName()); + } catch (IOException e) { + fail("Error loading Person"); + } + } + +} diff --git a/org.gecko.emf.json.tests/test.bndrun b/org.gecko.emf.json.tests/test.bndrun index 774cb76c..798b2a14 100644 --- a/org.gecko.emf.json.tests/test.bndrun +++ b/org.gecko.emf.json.tests/test.bndrun @@ -12,7 +12,6 @@ com.fasterxml.jackson.dataformat.jackson-dataformat-properties;version='[2.13.2,2.13.3)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-yaml;version='[2.13.2,2.13.3)',\ de.undercouch.bson4jackson;version='[2.13.1,2.13.2)',\ - emfjson-jackson;version='[2.1.0,2.1.1)',\ junit-jupiter-api;version='[5.8.2,5.8.3)',\ junit-platform-commons;version='[1.8.2,1.8.3)',\ net.bytebuddy.byte-buddy;version='[1.12.8,1.12.9)',\ @@ -32,9 +31,11 @@ org.opentest4j;version='[1.2.0,1.2.1)',\ org.osgi.service.component;version='[1.4.0,1.4.1)',\ org.osgi.util.function;version='[1.1.0,1.1.1)',\ - org.osgi.util.promise;version='[1.1.1,1.1.2)',\ org.osgi.util.pushstream;version='[1.0.1,1.0.2)',\ - org.yaml.snakeyaml;version='[1.30.0,1.30.1)' + org.yaml.snakeyaml;version='[1.30.0,1.30.1)',\ + org.apache.felix.converter;version='[1.0.18,1.0.19)',\ + org.eclipse.emfcloud.emfjson-jackson;version='[2.1.0,2.1.1)',\ + org.osgi.util.promise;version='[1.2.0,1.2.1)' From f974d409dd3e188cc1dbedc88aedd23f61e67594 Mon Sep 17 00:00:00 2001 From: Mark Hoffmann Date: Fri, 15 Jul 2022 21:00:03 +0200 Subject: [PATCH 04/21] fixes #3 - added root_element attribute - added tests Signed-off-by: Mark Hoffmann --- cnf/central.mvn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cnf/central.mvn b/cnf/central.mvn index 82756dc8..2885985a 100644 --- a/cnf/central.mvn +++ b/cnf/central.mvn @@ -157,7 +157,6 @@ org.geckoprojects.bnd:org.gecko.bnd.jacoco.library:1.1.1 #org.geckoprojects.emf:org.gecko.emf.osgi.api:4.1.1.202202162308 org.geckoprojects.emf:org.gecko.emf.osgi.bnd.library.workspace:4.1.1-SNAPSHOT -org.geckoprojects.emf:org.gecko.emf.osgi.example.model.basic:4.1.1-SNAPSHOT com.fasterxml.jackson.core:jackson-core:2.13.2 com.fasterxml.jackson.core:jackson-databind:2.13.2 @@ -168,3 +167,4 @@ org.eclipse.emfcloud:emfjson-jackson:2.1.0-SNAPSHOT de.undercouch:bson4jackson:2.13.1 org.yaml:snakeyaml:1.30 #org.emfjson:emfjson-jackson:1.3.0 +org.geckoprojects.emf:org.gecko.emf.osgi.example.model.basic:4.1.1.202202162309 From 7a9b7bef1092f189974680b61b9bc4947c2047fb Mon Sep 17 00:00:00 2001 From: Juergen Albert Date: Tue, 13 Sep 2022 20:53:36 +0200 Subject: [PATCH 05/21] removed useless configuration Signed-off-by: Juergen Albert --- cnf/central.mvn | 2 +- .../emf/json/configuration/ConfigurableJsonResource.java | 5 ----- .../src/org/gecko/emf/json/constants/EMFJs.java | 4 ---- .../src/org/gecko/emf/jaxrs/EMFJsonAnnotationConverter.java | 1 - .../org/gecko/emf/jaxrs/annotations/json/EMFJSONConfig.java | 5 ----- 5 files changed, 1 insertion(+), 16 deletions(-) diff --git a/cnf/central.mvn b/cnf/central.mvn index 2885985a..938485ed 100644 --- a/cnf/central.mvn +++ b/cnf/central.mvn @@ -163,7 +163,7 @@ com.fasterxml.jackson.core:jackson-databind:2.13.2 com.fasterxml.jackson.core:jackson-annotations:2.13.2 com.fasterxml.jackson.dataformat:jackson-dataformat-properties:2.13.2 com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.2 -org.eclipse.emfcloud:emfjson-jackson:2.1.0-SNAPSHOT +org.eclipse.emfcloud:emfjson-jackson:2.1.0 de.undercouch:bson4jackson:2.13.1 org.yaml:snakeyaml:1.30 #org.emfjson:emfjson-jackson:1.3.0 diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java index 8f91cfdb..5ff346cd 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java @@ -108,11 +108,6 @@ public ObjectMapper configureMapper(Map options) { private EMFModule createInitModule(Map options, boolean isNew) { EMFModule module = new EMFModule(); - Boolean serContainment = getOrDefault(options, EMFJs.OPTION_SERIALIZE_CONTAINMENT_AS_HREF, - isNew ? false : null); - if (serContainment != null) { - module.configure(Feature.OPTION_SERIALIZE_CONTAINMENT_AS_HREF, serContainment); - } Boolean serDefaults = getOrDefault(options, EMFJs.OPTION_SERIALIZE_DEFAULT_VALUE, isNew ? false : null); if (serDefaults != null) { module.configure(Feature.OPTION_SERIALIZE_DEFAULT_VALUE, serDefaults); diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/constants/EMFJs.java b/org.gecko.emf.json/src/org/gecko/emf/json/constants/EMFJs.java index 1e1d832f..d7fb4b35 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/constants/EMFJs.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/constants/EMFJs.java @@ -51,10 +51,6 @@ public final class EMFJs { */ public static final String OPTION_INDENT_OUTPUT = "OPTION_INDENT_OUTPUT"; - /** - * Option used to indicate the module to serialize containments as references. - */ - public static final String OPTION_SERIALIZE_CONTAINMENT_AS_HREF = "OPTION_SERIALIZE_CONTAINMENT_AS_HREF"; /** * When value is true, the writer will include an _id key to each json objects * and sets as value the fragment identifier. diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFJsonAnnotationConverter.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFJsonAnnotationConverter.java index 6b7e9455..e7de1d28 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFJsonAnnotationConverter.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFJsonAnnotationConverter.java @@ -70,7 +70,6 @@ public void convertAnnotation(Annotation annotation, boolean serialize, Map Date: Fri, 14 Oct 2022 16:05:04 +0200 Subject: [PATCH 06/21] added mermaid core generator Signed-off-by: Ilenia Salvadori --- cnf/build.bnd | 2 +- cnf/central.mvn | 15 +- org.gecko.emf.util.mermaid.command/.classpath | 16 + org.gecko.emf.util.mermaid.command/.gitignore | 2 + org.gecko.emf.util.mermaid.command/.project | 23 ++ .../org.eclipse.core.resources.prefs | 9 + .../.settings/org.eclipse.jdt.core.prefs | 11 + .../.settings/org.eclipse.jdt.ui.prefs | 10 + org.gecko.emf.util.mermaid.command/bnd.bnd | 11 + .../data/3DPrinter.ecore | 139 +++++++++ .../data/3DPrinter.md | 26 ++ .../data/bsm.ecore | 292 ++++++++++++++++++ .../data/bsm.md | 112 +++++++ .../launch.bndrun | 48 +++ .../EcoreToMermaidCommandComponent.java | 65 ++++ org.gecko.emf.util.mermaid.command/test/.keep | 0 org.gecko.emf.util.mermaid/.classpath | 12 + org.gecko.emf.util.mermaid/.gitignore | 1 + org.gecko.emf.util.mermaid/.project | 29 ++ org.gecko.emf.util.mermaid/bnd.bnd | 13 + .../emf/util/mermaid/MermaidCodeGen.xtend | 66 ++++ .../org/gecko/emf/util/mermaid/packageinfo | 1 + .../emf/util/mermaid/.MermaidCodeGen.xtendbin | Bin 0 -> 3765 bytes .../org/gecko/emf/util/mermaid/.gitignore | 1 + .../emf/util/mermaid/MermaidCodeGen.java | 174 +++++++++++ 25 files changed, 1074 insertions(+), 4 deletions(-) create mode 100644 org.gecko.emf.util.mermaid.command/.classpath create mode 100644 org.gecko.emf.util.mermaid.command/.gitignore create mode 100644 org.gecko.emf.util.mermaid.command/.project create mode 100644 org.gecko.emf.util.mermaid.command/.settings/org.eclipse.core.resources.prefs create mode 100644 org.gecko.emf.util.mermaid.command/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.gecko.emf.util.mermaid.command/.settings/org.eclipse.jdt.ui.prefs create mode 100644 org.gecko.emf.util.mermaid.command/bnd.bnd create mode 100644 org.gecko.emf.util.mermaid.command/data/3DPrinter.ecore create mode 100644 org.gecko.emf.util.mermaid.command/data/3DPrinter.md create mode 100644 org.gecko.emf.util.mermaid.command/data/bsm.ecore create mode 100644 org.gecko.emf.util.mermaid.command/data/bsm.md create mode 100644 org.gecko.emf.util.mermaid.command/launch.bndrun create mode 100644 org.gecko.emf.util.mermaid.command/src/org/gecko/emf/util/mermaid/command/EcoreToMermaidCommandComponent.java create mode 100644 org.gecko.emf.util.mermaid.command/test/.keep create mode 100644 org.gecko.emf.util.mermaid/.classpath create mode 100644 org.gecko.emf.util.mermaid/.gitignore create mode 100644 org.gecko.emf.util.mermaid/.project create mode 100644 org.gecko.emf.util.mermaid/bnd.bnd create mode 100644 org.gecko.emf.util.mermaid/src/org/gecko/emf/util/mermaid/MermaidCodeGen.xtend create mode 100644 org.gecko.emf.util.mermaid/src/org/gecko/emf/util/mermaid/packageinfo create mode 100644 org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/.MermaidCodeGen.xtendbin create mode 100644 org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/.gitignore create mode 100644 org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/MermaidCodeGen.java diff --git a/cnf/build.bnd b/cnf/build.bnd index e3941155..40ceb982 100644 --- a/cnf/build.bnd +++ b/cnf/build.bnd @@ -25,7 +25,7 @@ base-version: 1.0.0.SNAPSHOT javac.source: 11 javac.target: 11 --require-bnd "(version>=6.2.0)" +-require-bnd "(version>=6.3.1)" -plugin.Central: \ aQute.bnd.repository.maven.provider.MavenBndRepository; \ diff --git a/cnf/central.mvn b/cnf/central.mvn index 938485ed..09a3b92d 100644 --- a/cnf/central.mvn +++ b/cnf/central.mvn @@ -130,9 +130,9 @@ org.osgi:osgi.core:8.0.0 org.slf4j:slf4j-api:1.7.30 org.slf4j:slf4j-simple:1.7.30 -org.eclipse.emf:org.eclipse.emf.common:2.23.0 -org.eclipse.emf:org.eclipse.emf.ecore:2.25.0 -org.eclipse.emf:org.eclipse.emf.ecore.xmi:2.16.0 +#org.eclipse.emf:org.eclipse.emf.common:2.23.0 +#org.eclipse.emf:org.eclipse.emf.ecore:2.25.0 +#org.eclipse.emf:org.eclipse.emf.ecore.xmi:2.16.0 org.eclipse.emf:org.eclipse.emf.codegen.ecore:2.28.0 org.eclipse.emf:org.eclipse.emf.codegen:2.22.0 org.eclipse.emf:org.eclipse.emf.ecore.xcore.lib:1.6.0 @@ -168,3 +168,12 @@ de.undercouch:bson4jackson:2.13.1 org.yaml:snakeyaml:1.30 #org.emfjson:emfjson-jackson:1.3.0 org.geckoprojects.emf:org.gecko.emf.osgi.example.model.basic:4.1.1.202202162309 + + +#xtext +org.eclipse.xtext:org.eclipse.xtext.xbase.lib:2.29.0.M1 +org.eclipse.xtext:org.eclipse.xtext.builder:2.10.0 +com.google.guava:guava:30.1-jre +com.google.guava:failureaccess:1.0.1 + +org.gecko.runtime:org.gecko.templates:1.0.31 diff --git a/org.gecko.emf.util.mermaid.command/.classpath b/org.gecko.emf.util.mermaid.command/.classpath new file mode 100644 index 00000000..1e6e6a74 --- /dev/null +++ b/org.gecko.emf.util.mermaid.command/.classpath @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/org.gecko.emf.util.mermaid.command/.gitignore b/org.gecko.emf.util.mermaid.command/.gitignore new file mode 100644 index 00000000..7fdbdef7 --- /dev/null +++ b/org.gecko.emf.util.mermaid.command/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/bin_test/ diff --git a/org.gecko.emf.util.mermaid.command/.project b/org.gecko.emf.util.mermaid.command/.project new file mode 100644 index 00000000..e42e15fd --- /dev/null +++ b/org.gecko.emf.util.mermaid.command/.project @@ -0,0 +1,23 @@ + + + org.gecko.emf.util.mermaid.command + + + + + + org.eclipse.jdt.core.javabuilder + + + + + bndtools.core.bndbuilder + + + + + + org.eclipse.jdt.core.javanature + bndtools.core.bndnature + + diff --git a/org.gecko.emf.util.mermaid.command/.settings/org.eclipse.core.resources.prefs b/org.gecko.emf.util.mermaid.command/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..a28533c9 --- /dev/null +++ b/org.gecko.emf.util.mermaid.command/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,9 @@ +eclipse.preferences.version=1 +encoding//.settings/org.eclipse.core.resources.prefs=UTF-8 +encoding//.settings/org.eclipse.jdt.core.prefs=UTF-8 +encoding//.settings/org.eclipse.jdt.ui.prefs=UTF-8 +encoding//src/org/gecko/emf/util/mermaid/command/EcoreToMermaidCommandComponent.java=UTF-8 +encoding//src/test/component/Example.java=UTF-8 +encoding//test/test/component/ExampleTest.java=UTF-8 +encoding/bnd.bnd=UTF-8 +encoding/launch.bndrun=UTF-8 diff --git a/org.gecko.emf.util.mermaid.command/.settings/org.eclipse.jdt.core.prefs b/org.gecko.emf.util.mermaid.command/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..049e42fd --- /dev/null +++ b/org.gecko.emf.util.mermaid.command/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=11 diff --git a/org.gecko.emf.util.mermaid.command/.settings/org.eclipse.jdt.ui.prefs b/org.gecko.emf.util.mermaid.command/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..25b8c0de --- /dev/null +++ b/org.gecko.emf.util.mermaid.command/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,10 @@ +content_assist_proposals_background=255,255,255 +content_assist_proposals_foreground=0,0,0 +eclipse.preferences.version=1 +org.eclipse.jdt.ui.formatterprofiles.version=13 +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.text.code_templates_migrated=true +org.eclipse.jdt.ui.text.custom_code_templates= +spelling_locale_initialized=true +useAnnotationsPrefPage=true +useQuickDiffPrefPage=true diff --git a/org.gecko.emf.util.mermaid.command/bnd.bnd b/org.gecko.emf.util.mermaid.command/bnd.bnd new file mode 100644 index 00000000..56c01907 --- /dev/null +++ b/org.gecko.emf.util.mermaid.command/bnd.bnd @@ -0,0 +1,11 @@ +javac.source: 11 +javac.target: 11 + +-library: enable-emf + +Bundle-Version: 1.0.0.SNAPSHOT +Private-Package: org.gecko.emf.util.mermaid.command + +-includeresource.resources: \ + data=data/ +-buildpath: org.gecko.emf.util.mermaid;version=latest \ No newline at end of file diff --git a/org.gecko.emf.util.mermaid.command/data/3DPrinter.ecore b/org.gecko.emf.util.mermaid.command/data/3DPrinter.ecore new file mode 100644 index 00000000..8a3b68ef --- /dev/null +++ b/org.gecko.emf.util.mermaid.command/data/3DPrinter.ecore @@ -0,0 +1,139 @@ + + + + +
+ + + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.gecko.emf.util.mermaid.command/data/3DPrinter.md b/org.gecko.emf.util.mermaid.command/data/3DPrinter.md new file mode 100644 index 00000000..be880707 --- /dev/null +++ b/org.gecko.emf.util.mermaid.command/data/3DPrinter.md @@ -0,0 +1,26 @@ +```mermaid +classDiagram + class 3DPrinter { + 3DPrinter3dprinttypeValue 3dprinttype + EString alternateName + EString areaServed + EString dataProvider + EString dateCreated + EString dateModified + EString description + EString id + 3DPrinterIfValue if + EDoubleObject memorysize + EString n + EString name + EString owner + EDoubleObject printsizex + EDoubleObject printsizey + EDoubleObject printsizez + 3DPrinterRtValue rt + EString source + 3DPrinterTypeValue type + EBooleanObject wanconnected + +} +``` diff --git a/org.gecko.emf.util.mermaid.command/data/bsm.ecore b/org.gecko.emf.util.mermaid.command/data/bsm.ecore new file mode 100644 index 00000000..4cec7089 --- /dev/null +++ b/org.gecko.emf.util.mermaid.command/data/bsm.ecore @@ -0,0 +1,292 @@ + + + + +
+ + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + +
+ + + +
+ + + + +
+ + + + + +
+ + + +
+ + + + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + +
+ + + +
+ + + + +
+ + + + +
+ + + + + +
+ + + +
+ + + + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + + +
+ + + + + +
+ + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + + +
+ + + +
+ + + + + +
+ + + +
+ + + + + +
+ + + +
+ + + + + + + +
+ + + + + + + + + + +
+ + + + + diff --git a/org.gecko.emf.util.mermaid.command/data/bsm.md b/org.gecko.emf.util.mermaid.command/data/bsm.md new file mode 100644 index 00000000..5473ea21 --- /dev/null +++ b/org.gecko.emf.util.mermaid.command/data/bsm.md @@ -0,0 +1,112 @@ +```mermaid +classDiagram + class Plan { + EDate start + EDate ende + PlanTyp type + EDate stand +} + + Plan "1" --> "1..1" Traeger : traeger + + class PlanPosition { + String nummer + Integer order + EString titel + EString beschreibung + EDate start + EDate ende +} + + PlanPosition "1" --> "1..1" Plan : plan + PlanPosition "*" --> "0..-1" MassnahmeAnteil : massnahmeanteil + + class MassnahmeAnteil { + EDoubleObject anteil + EString beschreibung +} + + MassnahmeAnteil "1" --> "1..1" Massnahme : massnahme + + class StrukturObjekt { + EString uuid + EString bezeichnung + EString beschreibung + EString externe_id + EBoolean parkplatzBetroffen +} + + StrukturObjekt "1" --> "0..1" StrukturObjekt : parent + StrukturObjekt "1" --> "1..1" Traeger : traeger + StrukturObjekt "*" --> "1..-1" Zeitraum : zeitraum + + class Traeger { + EString title +} + + + class Zeitraum { + EDate erstellt + EDate start + EDate ende + ZeitraumTyp typ + EDate aufgehoben + EString hinweis + ZeitraumAenderungsTyp aenderungsTyp +} + + + class Massnahme { + PolygonGeom the_geom +} + + + Massnahme ..> StrukturObjekt + + class Freihalteflaeche { + PolygonGeom the_geom +} + + + Freihalteflaeche ..> StrukturObjekt + + class Umleitung { + LineGeom the_geom +} + + + Umleitung ..> StrukturObjekt + + class Asset { + EDate gewaehrleistungsDatum +} + + + class PlanTyp { + <> + WIRTSCHAFTSPLAN + INVESTPLAN +} + + class ZeitraumTyp { + <> + IDEE_TRAEGER + KOORDINIERT_BSM + BEAUFTRAGT + ZWANG + FREIGABE_STRASSE + IST + PLANUNG +} + + class ZeitraumAenderungsTyp { + <> + Witterung + Finanzielle Engpässe + Fehlplanung + Auschreibung + Personal Engpässe + NONE +} + +``` diff --git a/org.gecko.emf.util.mermaid.command/launch.bndrun b/org.gecko.emf.util.mermaid.command/launch.bndrun new file mode 100644 index 00000000..13f96519 --- /dev/null +++ b/org.gecko.emf.util.mermaid.command/launch.bndrun @@ -0,0 +1,48 @@ +-runprovidedcapabilities: ${native_capability} + +-runbundles: \ + com.google.guava;version='[30.1.0,30.1.1)',\ + com.google.guava.failureaccess;version='[1.0.1,1.0.2)',\ + org.apache.felix.gogo.command;version='[1.1.2,1.1.3)',\ + org.apache.felix.gogo.runtime;version='[1.1.4,1.1.5)',\ + org.apache.felix.gogo.shell;version='[1.1.4,1.1.5)',\ + org.apache.felix.scr;version='[2.1.30,2.1.31)',\ + org.eclipse.emf.common;version='[2.23.0,2.23.1)',\ + org.eclipse.emf.ecore;version='[2.25.0,2.25.1)',\ + org.eclipse.xtext.xbase.lib;version='[2.29.0,2.29.1)',\ + org.gecko.emf.util.mermaid;version=snapshot,\ + org.gecko.emf.util.mermaid.command;version=snapshot,\ + org.osgi.util.function;version='[1.1.0,1.1.1)',\ + org.osgi.util.promise;version='[1.2.0,1.2.1)',\ + com.fasterxml.jackson.core.jackson-annotations;version='[2.13.2,2.13.3)',\ + com.fasterxml.jackson.core.jackson-core;version='[2.13.2,2.13.3)',\ + com.fasterxml.jackson.core.jackson-databind;version='[2.13.2,2.13.3)',\ + com.fasterxml.jackson.dataformat.jackson-dataformat-properties;version='[2.13.2,2.13.3)',\ + com.fasterxml.jackson.dataformat.jackson-dataformat-yaml;version='[2.13.2,2.13.3)',\ + de.undercouch.bson4jackson;version='[2.13.1,2.13.2)',\ + org.apache.felix.configadmin;version='[1.9.22,1.9.23)',\ + org.apache.felix.converter;version='[1.0.18,1.0.19)',\ + org.eclipse.emf.ecore.xmi;version='[2.16.0,2.16.1)',\ + org.eclipse.emfcloud.emfjson-jackson;version='[2.1.0,2.1.1)',\ + org.gecko.emf.bson;version=snapshot,\ + org.gecko.emf.json;version=snapshot,\ + org.gecko.emf.osgi.api;version='[4.1.1,4.1.2)',\ + org.gecko.emf.osgi.component;version='[4.1.1,4.1.2)',\ + org.gecko.emf.pushstreams;version=snapshot,\ + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + org.osgi.util.pushstream;version='[1.0.1,1.0.2)',\ + org.yaml.snakeyaml;version='[1.30.0,1.30.1)' + +-runrequires: \ + bnd.identity;id='org.gecko.emf.util.mermaid.command',\ + bnd.identity;id='org.apache.felix.gogo.command',\ + bnd.identity;id='org.apache.felix.gogo.runtime',\ + bnd.identity;id='org.apache.felix.gogo.shell' + +-runproperties.properties: \ + base.path=${.} +-runfw: org.apache.felix.framework;version='[7.0.1,7.0.1]' +-runee: JavaSE-11 + +-resolve.effective: active + diff --git a/org.gecko.emf.util.mermaid.command/src/org/gecko/emf/util/mermaid/command/EcoreToMermaidCommandComponent.java b/org.gecko.emf.util.mermaid.command/src/org/gecko/emf/util/mermaid/command/EcoreToMermaidCommandComponent.java new file mode 100644 index 00000000..09d8a567 --- /dev/null +++ b/org.gecko.emf.util.mermaid.command/src/org/gecko/emf/util/mermaid/command/EcoreToMermaidCommandComponent.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2012 - 2018 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ +package org.gecko.emf.util.mermaid.command; + +import java.io.IOException; +import java.io.PrintWriter; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.gecko.emf.util.mermaid.MermaidCodeGen; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; + +@Component(service=EcoreToMermaidCommandComponent.class, property= { + "osgi.command.scope=ecoretomermaid", + "osgi.command.function=ecoreToMermaid" + }) +public class EcoreToMermaidCommandComponent { + + @Reference + ResourceSet resourceSet; + + private static final String BASE_PATH = System.getProperty("base.path"); + private static final String DATA_FOLDER = BASE_PATH + "/data/"; + + public void ecoreToMermaid(String ecoreFileName) { + Resource resource = resourceSet.createResource(URI.createFileURI(DATA_FOLDER + ecoreFileName)); + try { + resource.load(null); + if(resource.getContents().isEmpty()) { + System.err.println("Resource has no contents!"); + return; + } + EObject eObj = resource.getContents().get(0); + if(eObj instanceof EPackage) { + EPackage ePackage = (EPackage) eObj; + MermaidCodeGen mermaidCodeGen = new MermaidCodeGen(); + CharSequence cs = mermaidCodeGen.toMermaidClassDiagram(ePackage); + String outputFile = DATA_FOLDER + ecoreFileName.replace("ecore", "md"); + try(PrintWriter pw = new PrintWriter(outputFile)) { + pw.write(cs.toString()); + } + } + else { + System.err.println("Content is not an EClass!"); + return; + } + } catch(IOException e) { + System.err.println("IOException! " + e.getMessage()); + return; + } + } +} diff --git a/org.gecko.emf.util.mermaid.command/test/.keep b/org.gecko.emf.util.mermaid.command/test/.keep new file mode 100644 index 00000000..e69de29b diff --git a/org.gecko.emf.util.mermaid/.classpath b/org.gecko.emf.util.mermaid/.classpath new file mode 100644 index 00000000..504cdaa3 --- /dev/null +++ b/org.gecko.emf.util.mermaid/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/org.gecko.emf.util.mermaid/.gitignore b/org.gecko.emf.util.mermaid/.gitignore new file mode 100644 index 00000000..ae3c1726 --- /dev/null +++ b/org.gecko.emf.util.mermaid/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/org.gecko.emf.util.mermaid/.project b/org.gecko.emf.util.mermaid/.project new file mode 100644 index 00000000..3eab8373 --- /dev/null +++ b/org.gecko.emf.util.mermaid/.project @@ -0,0 +1,29 @@ + + + org.gecko.emf.util.mermaid + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + bndtools.core.bndbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + bndtools.core.bndnature + + diff --git a/org.gecko.emf.util.mermaid/bnd.bnd b/org.gecko.emf.util.mermaid/bnd.bnd new file mode 100644 index 00000000..edce4cd2 --- /dev/null +++ b/org.gecko.emf.util.mermaid/bnd.bnd @@ -0,0 +1,13 @@ +Bundle-Name: Xtend Generator for Mermaid +Bundle-Description: Xtend Generator for Mermaid +Bundle-Version: 1.0.0-SNAPSHOT + +src.xtend-gen=xtend-gen + +-buildpath: \ + org.eclipse.xtext.builder,\ + org.eclipse.xtext.xbase.lib + +-library: \ + enable-emf +Export-Package: org.gecko.emf.util.mermaid \ No newline at end of file diff --git a/org.gecko.emf.util.mermaid/src/org/gecko/emf/util/mermaid/MermaidCodeGen.xtend b/org.gecko.emf.util.mermaid/src/org/gecko/emf/util/mermaid/MermaidCodeGen.xtend new file mode 100644 index 00000000..7a16aa8c --- /dev/null +++ b/org.gecko.emf.util.mermaid/src/org/gecko/emf/util/mermaid/MermaidCodeGen.xtend @@ -0,0 +1,66 @@ +package org.gecko.emf.util.mermaid; + +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EEnum + +class MermaidCodeGen { + + def toMermaidClassDiagram(EPackage epackage) + ''' +```mermaid +classDiagram +«FOR eclassifier: epackage.EClassifiers» +«IF eclassifier instanceof EClass» +«" "»class «eclassifier.name» { +«toClassMembers(eclassifier as EClass)» +} +«"\n"» +«toClassReferences(eclassifier as EClass)» +«"\n"» +«IF !(eclassifier as EClass).ESuperTypes.isEmpty» +«toSuperTypes(eclassifier as EClass)» +«"\n"» +«ENDIF» +«ENDIF» +«ENDFOR» +«FOR eclassifier: epackage.EClassifiers» +«IF eclassifier instanceof EEnum» +«toEnumerator(eclassifier as EEnum)» +«"\n"» +«ENDIF» +«ENDFOR» +``` + ''' + + def toClassMembers(EClass eclass) + ''' +«FOR attribute: eclass.EAttributes» +«" "»«attribute.EType.name» «attribute.name» +«ENDFOR» + ''' + + def toClassReferences(EClass eclass) + ''' +«FOR ref: eclass.EReferences» +«" "»«eclass.name» «IF ref.isMany» «'\"*\"'»«ELSE»«'\"1\"'»«ENDIF»«' --> '» «'\"'»«ref.lowerBound»«'..'»«ref.upperBound»«'\"'» «ref.EType.name»«' : '»«ref.name» +«ENDFOR» + ''' + def toSuperTypes(EClass eclass) + ''' +«FOR parent: eclass.ESuperTypes» +«" "»«eclass.name» ..> «parent.name» +«ENDFOR» + ''' + + def toEnumerator(EEnum enumerator) + ''' +«" "»class «enumerator.name» { +«" <>"» +«FOR value: enumerator.ELiterals» +«" "»«value.name» +«ENDFOR» +} + ''' + +} \ No newline at end of file diff --git a/org.gecko.emf.util.mermaid/src/org/gecko/emf/util/mermaid/packageinfo b/org.gecko.emf.util.mermaid/src/org/gecko/emf/util/mermaid/packageinfo new file mode 100644 index 00000000..9ad81f6f --- /dev/null +++ b/org.gecko.emf.util.mermaid/src/org/gecko/emf/util/mermaid/packageinfo @@ -0,0 +1 @@ +version 1.0.0 diff --git a/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/.MermaidCodeGen.xtendbin b/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/.MermaidCodeGen.xtendbin new file mode 100644 index 0000000000000000000000000000000000000000..cf97379f5c28ee3e5a33c2c0d3528dae80179a96 GIT binary patch literal 3765 zcmZ{nWmFW}8iogkk{n==7Nkc)0SW1l?xDNk5JUIS(&2~-d+LD zUIG4DX2c#_&;t(W4{+npQBlQb0H+}-~A&|)ha z3kwmmiIzM(QJEeC8_HZuOL#Vtt}8a`xrI0$MwwT;6W(b9aw_@)u(=+n1t+Q(VBn z(V~}UiGLO{0i%v(weTTo{01v(xr{C0;%>9zkguhQ_E{%DSA>K)K`>8;H>{n3;;t$( z?O?81Iuk;!)~qm6sm;cv`WR!o_1)XZSgnr@u#|Ilr>fyEz|$<#_aE~zs9?nqmlqVR z`psmDYMPd&YJw3jCvr#U9~d^hH(MjvnVn~LatXYz8vN`f=d3DW&hyjhGVtH4VcJv4 z?i1c`-!k)Ky+C<($04#N-1E0C#)i$}HI7ivagrI-CUtN}#l#?rrdG1u^L_6;8GA(u zjH7}~3|5axw{RkNX?8SAY*U5EJ!!PFUHXv< z^+nBna@a0Y+PV0nZbNPhw{g;Up(8E*S=Y(fMAr)5rgFffO@2vo-`HwEvLwSMxA|PO zRT;`%E>^9hCXQZCnY#$j+DhP9=#3XjJ50BUF6e6ka@tssj6F6fm^Nz{j}~rE$Nxk7 zS*%_HtewKqukU0-;ZCzeAe(L@Nq0QOY0dy`WNG{X!CH_-P??Au5eUkwH{e*fro2F* zO4GZd%8q~;*XWD0=Be5`qfL75HguU`IiS0=yYC5zgb4p6M03KdxS3*f&v*|yBS=T3 z0W!gH`vsskU%*2J%>qwAi4m`iI{EzcpZc0oPu&;xlPFi`oA6W4!q#rpeJp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aHg*$c`{lS_~GH7CgqW{PQWj3WWSfKZI$G(j0b>3gzW*<}@zUNmyzQ<5$AU@eO z+~M-hx*%AAd0xkQk<}dG6b05UxAmfNa8{{yH5a5O*zS+}Qd<6<#K0l0L6FjZjI2pW zuqtLd6ov5BdHh0B%wSGzJZF9)t~~njoA@WAZz{fw^ZMVKBJqT4%gUgbB|Q+aK(o1M zGws(P(4z8IMF7jEBaLcNdijJ+wh!{$tH@Non2gtmSzWRRzTa5jO1#l@5Mp=mBxBvw zBfM_l-bzfhq*SYGXUOv}eK|v_K19m(O9S->6RGO^X2UR)BF0i3?#q@Xch-NteQC&d z3_+To{TuiuXUXO|d;oy!C-nax_+O#j-rwKb(aruB=laTck7h|7*;Z9d}ti0mb}_`IL9hCyOZdWcvv|`?wc4Za6c9p%E3R_zHGW6VUait=P$h?W=tAEba3O2>IfsG z5A-M9AEbyY>&5$$aJJ@t`PNoqYdYl!m$a6s^6I4)kf(K6D3o1!#;Cm`zI6fnHX&Ym zlyEKvB3IOYaWgTjEw+%X^MrA&;J{FG8NJn)TriWI`5{^P$D$9Kice>2m+eGz$u2LO!T`Na$#J{a(yR_}KM{YA|`^?T#@-#33J s@t48=N9dny{x7@z?+U;F>z{8oll_xleJw(wU-f}MN6XK3i{jVmUkNtd*8l(j literal 0 HcmV?d00001 diff --git a/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/.gitignore b/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/.gitignore new file mode 100644 index 00000000..b6815a06 --- /dev/null +++ b/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/.gitignore @@ -0,0 +1 @@ +/.MermaidCodeGen.java._trace diff --git a/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/MermaidCodeGen.java b/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/MermaidCodeGen.java new file mode 100644 index 00000000..0ac1a0f7 --- /dev/null +++ b/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/MermaidCodeGen.java @@ -0,0 +1,174 @@ +package org.gecko.emf.util.mermaid; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EEnumLiteral; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.xtend2.lib.StringConcatenation; + +@SuppressWarnings("all") +public class MermaidCodeGen { + public CharSequence toMermaidClassDiagram(final EPackage epackage) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append("```mermaid "); + _builder.newLine(); + _builder.append("classDiagram"); + _builder.newLine(); + { + EList _eClassifiers = epackage.getEClassifiers(); + for(final EClassifier eclassifier : _eClassifiers) { + { + if ((eclassifier instanceof EClass)) { + _builder.append(" "); + _builder.append("class "); + String _name = ((EClass)eclassifier).getName(); + _builder.append(_name); + _builder.append(" {"); + _builder.newLineIfNotEmpty(); + CharSequence _classMembers = this.toClassMembers(((EClass) eclassifier)); + _builder.append(_classMembers); + _builder.newLineIfNotEmpty(); + _builder.append("}"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + CharSequence _classReferences = this.toClassReferences(((EClass) eclassifier)); + _builder.append(_classReferences); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + { + boolean _isEmpty = ((EClass) eclassifier).getESuperTypes().isEmpty(); + boolean _not = (!_isEmpty); + if (_not) { + CharSequence _superTypes = this.toSuperTypes(((EClass) eclassifier)); + _builder.append(_superTypes); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } + } + } + } + } + { + EList _eClassifiers_1 = epackage.getEClassifiers(); + for(final EClassifier eclassifier_1 : _eClassifiers_1) { + { + if ((eclassifier_1 instanceof EEnum)) { + CharSequence _enumerator = this.toEnumerator(((EEnum) eclassifier_1)); + _builder.append(_enumerator); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } + } + } + _builder.append("```"); + _builder.newLine(); + return _builder; + } + + public CharSequence toClassMembers(final EClass eclass) { + StringConcatenation _builder = new StringConcatenation(); + { + EList _eAttributes = eclass.getEAttributes(); + for(final EAttribute attribute : _eAttributes) { + _builder.append(" "); + String _name = attribute.getEType().getName(); + _builder.append(_name); + _builder.append(" "); + String _name_1 = attribute.getName(); + _builder.append(_name_1); + _builder.newLineIfNotEmpty(); + } + } + return _builder; + } + + public CharSequence toClassReferences(final EClass eclass) { + StringConcatenation _builder = new StringConcatenation(); + { + EList _eReferences = eclass.getEReferences(); + for(final EReference ref : _eReferences) { + _builder.append(" "); + String _name = eclass.getName(); + _builder.append(_name); + _builder.append(" "); + { + boolean _isMany = ref.isMany(); + if (_isMany) { + _builder.append(" "); + _builder.append("\"*\""); + } else { + _builder.append("\"1\""); + } + } + _builder.append(" --> "); + _builder.append(" "); + _builder.append("\""); + int _lowerBound = ref.getLowerBound(); + _builder.append(_lowerBound); + _builder.append(".."); + int _upperBound = ref.getUpperBound(); + _builder.append(_upperBound); + _builder.append("\""); + _builder.append(" "); + String _name_1 = ref.getEType().getName(); + _builder.append(_name_1); + _builder.append(" : "); + String _name_2 = ref.getName(); + _builder.append(_name_2); + _builder.newLineIfNotEmpty(); + } + } + return _builder; + } + + public CharSequence toSuperTypes(final EClass eclass) { + StringConcatenation _builder = new StringConcatenation(); + { + EList _eSuperTypes = eclass.getESuperTypes(); + for(final EClass parent : _eSuperTypes) { + _builder.append(" "); + String _name = eclass.getName(); + _builder.append(_name); + _builder.append(" ..> "); + String _name_1 = parent.getName(); + _builder.append(_name_1); + _builder.newLineIfNotEmpty(); + } + } + return _builder; + } + + public CharSequence toEnumerator(final EEnum enumerator) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append(" "); + _builder.append("class "); + String _name = enumerator.getName(); + _builder.append(_name); + _builder.append(" {"); + _builder.newLineIfNotEmpty(); + _builder.append(" <>"); + _builder.newLineIfNotEmpty(); + { + EList _eLiterals = enumerator.getELiterals(); + for(final EEnumLiteral value : _eLiterals) { + _builder.append(" "); + String _name_1 = value.getName(); + _builder.append(_name_1); + _builder.newLineIfNotEmpty(); + } + } + _builder.append("}"); + _builder.newLine(); + return _builder; + } +} From 414f4a595dbcf599b24f5e8db599c77bef31b4b9 Mon Sep 17 00:00:00 2001 From: Ilenia Salvadori Date: Mon, 17 Oct 2022 16:29:54 +0200 Subject: [PATCH 07/21] refactored and added support for plantuml documentation Signed-off-by: Ilenia Salvadori --- .../.classpath | 0 .../.gitignore | 0 .../.project | 2 +- .../org.eclipse.core.resources.prefs | 10 + .../.settings/org.eclipse.jdt.core.prefs | 0 .../.settings/org.eclipse.jdt.ui.prefs | 0 .../bnd.bnd | 7 + .../apis/EcoreToDocumentationService.java | 75 +++++ .../generators/apis/package-info.java | 3 + .../test/.keep | 0 .../.classpath | 16 + .../.gitignore | 4 + .../.project | 23 ++ .../org.eclipse.core.resources.prefs | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 11 + .../.settings/org.eclipse.jdt.ui.prefs | 10 + .../bnd.bnd | 13 + .../launch.bndrun | 60 ++-- .../commands/EcoreToDocumentationCommand.java | 41 +++ .../test/.keep | 0 .../.classpath | 16 + .../.gitignore | 2 + .../.project | 23 ++ .../org.eclipse.core.resources.prefs | 8 + .../.settings/org.eclipse.jdt.core.prefs | 11 + .../.settings/org.eclipse.jdt.ui.prefs | 10 + .../bnd.bnd | 12 + .../component/EcoreToMermaidComponent.java | 103 ++++++ .../test/.keep | 0 .../.classpath | 0 .../.gitignore | 0 .../.project | 2 +- .../bnd.bnd | 2 +- .../generators/mermaid/MarkdownCodeGen.xtend | 130 ++++++++ .../generators/mermaid/MermaidCodeGen.xtend | 138 +++++++++ .../generators}/mermaid/packageinfo | 0 .../generators/mermaid/.gitignore | 6 + .../.classpath | 16 + .../.gitignore | 2 + .../.project | 23 ++ .../org.eclipse.core.resources.prefs | 8 + .../.settings/org.eclipse.jdt.core.prefs | 11 + .../.settings/org.eclipse.jdt.ui.prefs | 10 + .../bnd.bnd | 12 + .../component/EcoreToPlantumlComponent.java | 100 ++++++ .../test/.keep | 0 .../.classpath | 12 + .../.gitignore | 1 + .../.project | 29 ++ .../.settings/org.eclipse.jdt.core.prefs | 14 + .../bnd.bnd | 14 + .../generators/plantuml/PlantumlCodeGen.xtend | 133 ++++++++ .../generators/plantuml/packageinfo | 1 + .../generators/plantuml/.gitignore | 3 + org.gecko.emf.util.mermaid.command/bnd.bnd | 11 - .../data/3DPrinter.ecore | 139 --------- .../data/3DPrinter.md | 26 -- .../data/bsm.ecore | 292 ------------------ .../data/bsm.md | 112 ------- .../EcoreToMermaidCommandComponent.java | 65 ---- .../emf/util/mermaid/MermaidCodeGen.xtend | 66 ---- .../emf/util/mermaid/.MermaidCodeGen.xtendbin | Bin 3765 -> 0 bytes .../org/gecko/emf/util/mermaid/.gitignore | 1 - .../emf/util/mermaid/MermaidCodeGen.java | 174 ----------- 64 files changed, 1096 insertions(+), 919 deletions(-) rename {org.gecko.emf.util.mermaid.command => org.gecko.emf.util.documentation.generators.apis}/.classpath (100%) rename {org.gecko.emf.util.mermaid.command => org.gecko.emf.util.documentation.generators.apis}/.gitignore (100%) rename {org.gecko.emf.util.mermaid.command => org.gecko.emf.util.documentation.generators.apis}/.project (88%) create mode 100644 org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.core.resources.prefs rename {org.gecko.emf.util.mermaid.command => org.gecko.emf.util.documentation.generators.apis}/.settings/org.eclipse.jdt.core.prefs (100%) rename {org.gecko.emf.util.mermaid.command => org.gecko.emf.util.documentation.generators.apis}/.settings/org.eclipse.jdt.ui.prefs (100%) create mode 100644 org.gecko.emf.util.documentation.generators.apis/bnd.bnd create mode 100644 org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java create mode 100644 org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/package-info.java rename {org.gecko.emf.util.mermaid.command => org.gecko.emf.util.documentation.generators.apis}/test/.keep (100%) create mode 100644 org.gecko.emf.util.documentation.generators.commands/.classpath create mode 100644 org.gecko.emf.util.documentation.generators.commands/.gitignore create mode 100644 org.gecko.emf.util.documentation.generators.commands/.project rename {org.gecko.emf.util.mermaid.command => org.gecko.emf.util.documentation.generators.commands}/.settings/org.eclipse.core.resources.prefs (76%) create mode 100644 org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.jdt.ui.prefs create mode 100644 org.gecko.emf.util.documentation.generators.commands/bnd.bnd rename {org.gecko.emf.util.mermaid.command => org.gecko.emf.util.documentation.generators.commands}/launch.bndrun (70%) create mode 100644 org.gecko.emf.util.documentation.generators.commands/src/org/gecko/emf/util/documentation/generators/commands/EcoreToDocumentationCommand.java create mode 100644 org.gecko.emf.util.documentation.generators.commands/test/.keep create mode 100644 org.gecko.emf.util.documentation.generators.mermaid.component/.classpath create mode 100644 org.gecko.emf.util.documentation.generators.mermaid.component/.gitignore create mode 100644 org.gecko.emf.util.documentation.generators.mermaid.component/.project create mode 100644 org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.core.resources.prefs create mode 100644 org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.jdt.ui.prefs create mode 100644 org.gecko.emf.util.documentation.generators.mermaid.component/bnd.bnd create mode 100644 org.gecko.emf.util.documentation.generators.mermaid.component/src/org/gecko/emf/util/documentation/generators/mermaid/component/EcoreToMermaidComponent.java create mode 100644 org.gecko.emf.util.documentation.generators.mermaid.component/test/.keep rename {org.gecko.emf.util.mermaid => org.gecko.emf.util.documentation.generators.mermaid}/.classpath (100%) rename {org.gecko.emf.util.mermaid => org.gecko.emf.util.documentation.generators.mermaid}/.gitignore (100%) rename {org.gecko.emf.util.mermaid => org.gecko.emf.util.documentation.generators.mermaid}/.project (91%) rename {org.gecko.emf.util.mermaid => org.gecko.emf.util.documentation.generators.mermaid}/bnd.bnd (78%) create mode 100644 org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MarkdownCodeGen.xtend create mode 100644 org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidCodeGen.xtend rename {org.gecko.emf.util.mermaid/src/org/gecko/emf/util => org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators}/mermaid/packageinfo (100%) create mode 100644 org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.gitignore create mode 100644 org.gecko.emf.util.documentation.generators.plantuml.component/.classpath create mode 100644 org.gecko.emf.util.documentation.generators.plantuml.component/.gitignore create mode 100644 org.gecko.emf.util.documentation.generators.plantuml.component/.project create mode 100644 org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.core.resources.prefs create mode 100644 org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.ui.prefs create mode 100644 org.gecko.emf.util.documentation.generators.plantuml.component/bnd.bnd create mode 100644 org.gecko.emf.util.documentation.generators.plantuml.component/src/org/gecko/emf/util/documentation/generators/plantuml/component/EcoreToPlantumlComponent.java create mode 100644 org.gecko.emf.util.documentation.generators.plantuml.component/test/.keep create mode 100644 org.gecko.emf.util.documentation.generators.plantuml/.classpath create mode 100644 org.gecko.emf.util.documentation.generators.plantuml/.gitignore create mode 100644 org.gecko.emf.util.documentation.generators.plantuml/.project create mode 100644 org.gecko.emf.util.documentation.generators.plantuml/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.gecko.emf.util.documentation.generators.plantuml/bnd.bnd create mode 100644 org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlCodeGen.xtend create mode 100644 org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/packageinfo create mode 100644 org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.gitignore delete mode 100644 org.gecko.emf.util.mermaid.command/bnd.bnd delete mode 100644 org.gecko.emf.util.mermaid.command/data/3DPrinter.ecore delete mode 100644 org.gecko.emf.util.mermaid.command/data/3DPrinter.md delete mode 100644 org.gecko.emf.util.mermaid.command/data/bsm.ecore delete mode 100644 org.gecko.emf.util.mermaid.command/data/bsm.md delete mode 100644 org.gecko.emf.util.mermaid.command/src/org/gecko/emf/util/mermaid/command/EcoreToMermaidCommandComponent.java delete mode 100644 org.gecko.emf.util.mermaid/src/org/gecko/emf/util/mermaid/MermaidCodeGen.xtend delete mode 100644 org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/.MermaidCodeGen.xtendbin delete mode 100644 org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/.gitignore delete mode 100644 org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/MermaidCodeGen.java diff --git a/org.gecko.emf.util.mermaid.command/.classpath b/org.gecko.emf.util.documentation.generators.apis/.classpath similarity index 100% rename from org.gecko.emf.util.mermaid.command/.classpath rename to org.gecko.emf.util.documentation.generators.apis/.classpath diff --git a/org.gecko.emf.util.mermaid.command/.gitignore b/org.gecko.emf.util.documentation.generators.apis/.gitignore similarity index 100% rename from org.gecko.emf.util.mermaid.command/.gitignore rename to org.gecko.emf.util.documentation.generators.apis/.gitignore diff --git a/org.gecko.emf.util.mermaid.command/.project b/org.gecko.emf.util.documentation.generators.apis/.project similarity index 88% rename from org.gecko.emf.util.mermaid.command/.project rename to org.gecko.emf.util.documentation.generators.apis/.project index e42e15fd..2e8e4134 100644 --- a/org.gecko.emf.util.mermaid.command/.project +++ b/org.gecko.emf.util.documentation.generators.apis/.project @@ -1,6 +1,6 @@ - org.gecko.emf.util.mermaid.command + org.gecko.emf.util.documentation.generators.apis diff --git a/org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.core.resources.prefs b/org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..416633d8 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,10 @@ +eclipse.preferences.version=1 +encoding//.settings/org.eclipse.core.resources.prefs=UTF-8 +encoding//.settings/org.eclipse.jdt.core.prefs=UTF-8 +encoding//.settings/org.eclipse.jdt.ui.prefs=UTF-8 +encoding//src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java=UTF-8 +encoding//src/org/gecko/emf/util/documentation/generators/apis/package-info.java=UTF-8 +encoding//src/test/component/Example.java=UTF-8 +encoding//test/test/component/ExampleTest.java=UTF-8 +encoding/bnd.bnd=UTF-8 +encoding/launch.bndrun=UTF-8 diff --git a/org.gecko.emf.util.mermaid.command/.settings/org.eclipse.jdt.core.prefs b/org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from org.gecko.emf.util.mermaid.command/.settings/org.eclipse.jdt.core.prefs rename to org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.jdt.core.prefs diff --git a/org.gecko.emf.util.mermaid.command/.settings/org.eclipse.jdt.ui.prefs b/org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from org.gecko.emf.util.mermaid.command/.settings/org.eclipse.jdt.ui.prefs rename to org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.jdt.ui.prefs diff --git a/org.gecko.emf.util.documentation.generators.apis/bnd.bnd b/org.gecko.emf.util.documentation.generators.apis/bnd.bnd new file mode 100644 index 00000000..0f4159ff --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.apis/bnd.bnd @@ -0,0 +1,7 @@ +javac.source: 11 +javac.target: 11 + +-library: enable-emf + +Bundle-Version: 1.0.0.SNAPSHOT +Export-Package: org.gecko.emf.util.documentation.generators.apis \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java new file mode 100644 index 00000000..8881ad54 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2012 - 2018 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ +package org.gecko.emf.util.documentation.generators.apis; + +import java.io.IOException; +import java.io.PrintWriter; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Objects; +import java.util.logging.Level; +import java.util.logging.Logger; + +import org.osgi.annotation.versioning.ProviderType; + +@ProviderType +public abstract class EcoreToDocumentationService{ + + public static final String ECORE_FILE_EXTENSION = ".ecore"; + protected static final Logger LOGGER = Logger.getLogger(EcoreToDocumentationService.class.getName()); + + protected boolean canHandleFileFormat(String fileName) { + Objects.requireNonNull(fileName, "File name cannot be null!"); + if(fileName.endsWith(ECORE_FILE_EXTENSION)) { + return true; + } + return false; + } + + protected abstract String getOutputFileExtension(); + protected abstract String getOutputFolder(); + protected abstract void doGenerateDocumentation(Path ecoreFilePath); + + public void ecoreToDocumentation(String ecoreFilePath) { + Path path = Paths.get(ecoreFilePath); + if(Files.isDirectory(path)) { + try { + Files.list(path).filter(p -> Files.isRegularFile(p)).forEach(p -> doGenerateDocumentation(p)); + } catch (IOException e) { + LOGGER.log(Level.SEVERE, "IOException while getting files from folder " + ecoreFilePath + " " + e.getMessage()); + } + + } else if(Files.isRegularFile(path)) { + doGenerateDocumentation(path); + } + } + + + + protected void generateOutputFile(Path ecoreFilePath, CharSequence generatedCharSeq) { + Path parentFolder = Paths.get(ecoreFilePath.toString()).getParent(); + String outputFileName = ecoreFilePath.getFileName().toString().replace(ECORE_FILE_EXTENSION, getOutputFileExtension()); + Path outputPath = Paths.get(parentFolder.toString(), getOutputFolder(), outputFileName); + try { + Files.deleteIfExists(outputPath); + Files.createDirectories(outputPath.getParent()); + Files.createFile(outputPath); + try(PrintWriter pw = new PrintWriter(outputPath.toFile())) { + pw.write(generatedCharSeq.toString()); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/package-info.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/package-info.java new file mode 100644 index 00000000..85c57a69 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/package-info.java @@ -0,0 +1,3 @@ +@org.osgi.annotation.versioning.Version("1.0.0") +@org.osgi.annotation.bundle.Export +package org.gecko.emf.util.documentation.generators.apis; diff --git a/org.gecko.emf.util.mermaid.command/test/.keep b/org.gecko.emf.util.documentation.generators.apis/test/.keep similarity index 100% rename from org.gecko.emf.util.mermaid.command/test/.keep rename to org.gecko.emf.util.documentation.generators.apis/test/.keep diff --git a/org.gecko.emf.util.documentation.generators.commands/.classpath b/org.gecko.emf.util.documentation.generators.commands/.classpath new file mode 100644 index 00000000..1e6e6a74 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.commands/.classpath @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/org.gecko.emf.util.documentation.generators.commands/.gitignore b/org.gecko.emf.util.documentation.generators.commands/.gitignore new file mode 100644 index 00000000..fda4e4b2 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.commands/.gitignore @@ -0,0 +1,4 @@ +/bin/ +/bin_test/ +/data/ +/generated/ diff --git a/org.gecko.emf.util.documentation.generators.commands/.project b/org.gecko.emf.util.documentation.generators.commands/.project new file mode 100644 index 00000000..70b9f777 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.commands/.project @@ -0,0 +1,23 @@ + + + org.gecko.emf.util.documentation.generators.commands + + + + + + org.eclipse.jdt.core.javabuilder + + + + + bndtools.core.bndbuilder + + + + + + org.eclipse.jdt.core.javanature + bndtools.core.bndnature + + diff --git a/org.gecko.emf.util.mermaid.command/.settings/org.eclipse.core.resources.prefs b/org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.core.resources.prefs similarity index 76% rename from org.gecko.emf.util.mermaid.command/.settings/org.eclipse.core.resources.prefs rename to org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.core.resources.prefs index a28533c9..91c60f21 100644 --- a/org.gecko.emf.util.mermaid.command/.settings/org.eclipse.core.resources.prefs +++ b/org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.core.resources.prefs @@ -2,7 +2,7 @@ eclipse.preferences.version=1 encoding//.settings/org.eclipse.core.resources.prefs=UTF-8 encoding//.settings/org.eclipse.jdt.core.prefs=UTF-8 encoding//.settings/org.eclipse.jdt.ui.prefs=UTF-8 -encoding//src/org/gecko/emf/util/mermaid/command/EcoreToMermaidCommandComponent.java=UTF-8 +encoding//src/org/gecko/emf/util/documentation/generators/commands/EcoreToDocumentationCommand.java=UTF-8 encoding//src/test/component/Example.java=UTF-8 encoding//test/test/component/ExampleTest.java=UTF-8 encoding/bnd.bnd=UTF-8 diff --git a/org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.jdt.core.prefs b/org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..049e42fd --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=11 diff --git a/org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.jdt.ui.prefs b/org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..25b8c0de --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,10 @@ +content_assist_proposals_background=255,255,255 +content_assist_proposals_foreground=0,0,0 +eclipse.preferences.version=1 +org.eclipse.jdt.ui.formatterprofiles.version=13 +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.text.code_templates_migrated=true +org.eclipse.jdt.ui.text.custom_code_templates= +spelling_locale_initialized=true +useAnnotationsPrefPage=true +useQuickDiffPrefPage=true diff --git a/org.gecko.emf.util.documentation.generators.commands/bnd.bnd b/org.gecko.emf.util.documentation.generators.commands/bnd.bnd new file mode 100644 index 00000000..a39f5c77 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.commands/bnd.bnd @@ -0,0 +1,13 @@ +javac.source: 11 +javac.target: 11 + +-library: enable-emf + +Bundle-Version: 1.0.0.SNAPSHOT + +-includeresource.resources: \ + data=data/ +-buildpath: \ + org.gecko.emf.util.documentation.generators.apis;version=latest,\ + +Private-Package: org.gecko.emf.util.documentation.generators.commands diff --git a/org.gecko.emf.util.mermaid.command/launch.bndrun b/org.gecko.emf.util.documentation.generators.commands/launch.bndrun similarity index 70% rename from org.gecko.emf.util.mermaid.command/launch.bndrun rename to org.gecko.emf.util.documentation.generators.commands/launch.bndrun index 13f96519..0601b9e1 100644 --- a/org.gecko.emf.util.mermaid.command/launch.bndrun +++ b/org.gecko.emf.util.documentation.generators.commands/launch.bndrun @@ -1,48 +1,50 @@ --runprovidedcapabilities: ${native_capability} +-runrequires: \ + bnd.identity;id='org.gecko.emf.util.documentation.generators.commands',\ + bnd.identity;id='org.apache.felix.gogo.command',\ + bnd.identity;id='org.apache.felix.gogo.runtime',\ + bnd.identity;id='org.apache.felix.gogo.shell',\ + bnd.identity;id='org.gecko.emf.util.documentation.generators.mermaid.component',\ + bnd.identity;id='org.gecko.emf.util.documentation.generators.plantuml.component' + +-runproperties.properties: \ + base.path=${.} +-runfw: org.apache.felix.framework;version='[7.0.1,7.0.1]' +-runee: JavaSE-11 +-resolve.effective: active -runbundles: \ - com.google.guava;version='[30.1.0,30.1.1)',\ - com.google.guava.failureaccess;version='[1.0.1,1.0.2)',\ - org.apache.felix.gogo.command;version='[1.1.2,1.1.3)',\ - org.apache.felix.gogo.runtime;version='[1.1.4,1.1.5)',\ - org.apache.felix.gogo.shell;version='[1.1.4,1.1.5)',\ - org.apache.felix.scr;version='[2.1.30,2.1.31)',\ - org.eclipse.emf.common;version='[2.23.0,2.23.1)',\ - org.eclipse.emf.ecore;version='[2.25.0,2.25.1)',\ - org.eclipse.xtext.xbase.lib;version='[2.29.0,2.29.1)',\ - org.gecko.emf.util.mermaid;version=snapshot,\ - org.gecko.emf.util.mermaid.command;version=snapshot,\ - org.osgi.util.function;version='[1.1.0,1.1.1)',\ - org.osgi.util.promise;version='[1.2.0,1.2.1)',\ com.fasterxml.jackson.core.jackson-annotations;version='[2.13.2,2.13.3)',\ com.fasterxml.jackson.core.jackson-core;version='[2.13.2,2.13.3)',\ com.fasterxml.jackson.core.jackson-databind;version='[2.13.2,2.13.3)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-properties;version='[2.13.2,2.13.3)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-yaml;version='[2.13.2,2.13.3)',\ + com.google.guava;version='[30.1.0,30.1.1)',\ + com.google.guava.failureaccess;version='[1.0.1,1.0.2)',\ de.undercouch.bson4jackson;version='[2.13.1,2.13.2)',\ org.apache.felix.configadmin;version='[1.9.22,1.9.23)',\ org.apache.felix.converter;version='[1.0.18,1.0.19)',\ + org.apache.felix.gogo.command;version='[1.1.2,1.1.3)',\ + org.apache.felix.gogo.runtime;version='[1.1.4,1.1.5)',\ + org.apache.felix.gogo.shell;version='[1.1.4,1.1.5)',\ + org.apache.felix.scr;version='[2.1.30,2.1.31)',\ + org.eclipse.emf.common;version='[2.23.0,2.23.1)',\ + org.eclipse.emf.ecore;version='[2.25.0,2.25.1)',\ org.eclipse.emf.ecore.xmi;version='[2.16.0,2.16.1)',\ org.eclipse.emfcloud.emfjson-jackson;version='[2.1.0,2.1.1)',\ + org.eclipse.xtext.xbase.lib;version='[2.29.0,2.29.1)',\ org.gecko.emf.bson;version=snapshot,\ org.gecko.emf.json;version=snapshot,\ org.gecko.emf.osgi.api;version='[4.1.1,4.1.2)',\ org.gecko.emf.osgi.component;version='[4.1.1,4.1.2)',\ org.gecko.emf.pushstreams;version=snapshot,\ + org.gecko.emf.util.documentation.generators.apis;version=snapshot,\ + org.gecko.emf.util.documentation.generators.commands;version=snapshot,\ + org.gecko.emf.util.documentation.generators.mermaid;version=snapshot,\ + org.gecko.emf.util.documentation.generators.mermaid.component;version=snapshot,\ + org.gecko.emf.util.documentation.generators.plantuml;version=snapshot,\ + org.gecko.emf.util.documentation.generators.plantuml.component;version=snapshot,\ org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + org.osgi.util.function;version='[1.1.0,1.1.1)',\ + org.osgi.util.promise;version='[1.2.0,1.2.1)',\ org.osgi.util.pushstream;version='[1.0.1,1.0.2)',\ - org.yaml.snakeyaml;version='[1.30.0,1.30.1)' - --runrequires: \ - bnd.identity;id='org.gecko.emf.util.mermaid.command',\ - bnd.identity;id='org.apache.felix.gogo.command',\ - bnd.identity;id='org.apache.felix.gogo.runtime',\ - bnd.identity;id='org.apache.felix.gogo.shell' - --runproperties.properties: \ - base.path=${.} --runfw: org.apache.felix.framework;version='[7.0.1,7.0.1]' --runee: JavaSE-11 - --resolve.effective: active - + org.yaml.snakeyaml;version='[1.30.0,1.30.1)' \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.commands/src/org/gecko/emf/util/documentation/generators/commands/EcoreToDocumentationCommand.java b/org.gecko.emf.util.documentation.generators.commands/src/org/gecko/emf/util/documentation/generators/commands/EcoreToDocumentationCommand.java new file mode 100644 index 00000000..8b21ae72 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.commands/src/org/gecko/emf/util/documentation/generators/commands/EcoreToDocumentationCommand.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2012 - 2018 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ +package org.gecko.emf.util.documentation.generators.commands; + +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; + + + +@Component(name = "EcoreToDocumentationCommand", service=EcoreToDocumentationCommand.class, property= { + "osgi.command.scope=EcoreToDocumentation", + "osgi.command.function=ecoreToPlantuml", + "osgi.command.function=ecoreToMermaid" +}) +public class EcoreToDocumentationCommand { + + @Reference(target = "(component.name=EcoreToPlantumlComponent)") + EcoreToDocumentationService ecoreToPlantumlComponent; + + @Reference(target = "(component.name=EcoreToMermaidComponent)") + EcoreToDocumentationService ecoreToMermaidComponent; + + + public void ecoreToPlantuml(String ecoreFilePath) { + ecoreToPlantumlComponent.ecoreToDocumentation(ecoreFilePath); + } + + public void ecoreToMermaid(String ecoreFilePath) { + ecoreToMermaidComponent.ecoreToDocumentation(ecoreFilePath); + } +} diff --git a/org.gecko.emf.util.documentation.generators.commands/test/.keep b/org.gecko.emf.util.documentation.generators.commands/test/.keep new file mode 100644 index 00000000..e69de29b diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/.classpath b/org.gecko.emf.util.documentation.generators.mermaid.component/.classpath new file mode 100644 index 00000000..1e6e6a74 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.mermaid.component/.classpath @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/.gitignore b/org.gecko.emf.util.documentation.generators.mermaid.component/.gitignore new file mode 100644 index 00000000..7fdbdef7 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.mermaid.component/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/bin_test/ diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/.project b/org.gecko.emf.util.documentation.generators.mermaid.component/.project new file mode 100644 index 00000000..7d220a4f --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.mermaid.component/.project @@ -0,0 +1,23 @@ + + + org.gecko.emf.util.documentation.generators.mermaid.component + + + + + + org.eclipse.jdt.core.javabuilder + + + + + bndtools.core.bndbuilder + + + + + + org.eclipse.jdt.core.javanature + bndtools.core.bndnature + + diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.core.resources.prefs b/org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..299148a3 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +encoding//.settings/org.eclipse.core.resources.prefs=UTF-8 +encoding//.settings/org.eclipse.jdt.core.prefs=UTF-8 +encoding//.settings/org.eclipse.jdt.ui.prefs=UTF-8 +encoding//src/org/gecko/emf/util/documentation/generators/mermaid/component/EcoreToMermaidComponent.java=UTF-8 +encoding//src/test/component/Example.java=UTF-8 +encoding//test/test/component/ExampleTest.java=UTF-8 +encoding/bnd.bnd=UTF-8 diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.jdt.core.prefs b/org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..049e42fd --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=11 diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.jdt.ui.prefs b/org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..25b8c0de --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,10 @@ +content_assist_proposals_background=255,255,255 +content_assist_proposals_foreground=0,0,0 +eclipse.preferences.version=1 +org.eclipse.jdt.ui.formatterprofiles.version=13 +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.text.code_templates_migrated=true +org.eclipse.jdt.ui.text.custom_code_templates= +spelling_locale_initialized=true +useAnnotationsPrefPage=true +useQuickDiffPrefPage=true diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/bnd.bnd b/org.gecko.emf.util.documentation.generators.mermaid.component/bnd.bnd new file mode 100644 index 00000000..8c30a6df --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.mermaid.component/bnd.bnd @@ -0,0 +1,12 @@ +javac.source: 11 +javac.target: 11 + +-library: enable-emf + +Bundle-Version: 1.0.0.SNAPSHOT + +-buildpath: \ + org.gecko.emf.util.documentation.generators.apis;version=latest,\ + org.gecko.emf.util.documentation.generators.mermaid;version=latest + +Private-Package: org.gecko.emf.util.documentation.generators.mermaid.component \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/src/org/gecko/emf/util/documentation/generators/mermaid/component/EcoreToMermaidComponent.java b/org.gecko.emf.util.documentation.generators.mermaid.component/src/org/gecko/emf/util/documentation/generators/mermaid/component/EcoreToMermaidComponent.java new file mode 100644 index 00000000..81c44b43 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.mermaid.component/src/org/gecko/emf/util/documentation/generators/mermaid/component/EcoreToMermaidComponent.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2012 - 2018 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ +package org.gecko.emf.util.documentation.generators.mermaid.component; + +import java.io.IOException; +import java.nio.file.Path; +import java.util.logging.Level; +import java.util.logging.Logger; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService; +import org.gecko.emf.util.documentation.generators.mermaid.MarkdownCodeGen; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; + +@Component(name="EcoreToMermaidComponent", service=EcoreToDocumentationService.class) +public class EcoreToMermaidComponent extends EcoreToDocumentationService{ + + @Reference + ResourceSet resourceSet; + + private static final String MD_FILE_EXTENSION = ".md"; + private static final String MD_FOLDER_NAME = "md"; + private static final Logger LOGGER = Logger.getLogger(EcoreToMermaidComponent.class.getName()); + + public void ecoreToMermaid(String ecoreFilePath) { + super.ecoreToDocumentation(ecoreFilePath); + } + + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#doGenerateDocumentation(java.nio.file.Path) + */ + @Override + protected void doGenerateDocumentation(Path ecoreFilePath) { + if(!canHandleFileFormat(ecoreFilePath.getFileName().toString())) { + LOGGER.log(Level.WARNING, "Cannot handle file format for " + ecoreFilePath); + return; + } + LOGGER.fine("Processing file " + ecoreFilePath); + EPackage ePackage = extractEPackageFromEcore(ecoreFilePath); + MarkdownCodeGen markdownCodeGen = new MarkdownCodeGen(); + CharSequence cs = markdownCodeGen.generateMarkdownDoc(ePackage); + generateOutputFile(ecoreFilePath, cs); + } + + private EPackage extractEPackageFromEcore(Path ecoreFilePath) { + Resource resource = resourceSet.createResource(URI.createFileURI(ecoreFilePath.toString())); + try { + resource.load(null); + if(resource.getContents().isEmpty()) { + LOGGER.log(Level.SEVERE, "Resource has no contents!"); + return null; + } + EObject eObj = resource.getContents().get(0); + if(eObj instanceof EPackage) { + return(EPackage) eObj; + } + else { + LOGGER.log(Level.SEVERE, "Content is not an EPackage!"); + return null; + } + } catch(IOException e) { + LOGGER.log(Level.SEVERE, "IOException in file " + ecoreFilePath + " " + e.getMessage()); + return null; + } + } + + + + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#getOutputFileExtension() + */ + @Override + protected String getOutputFileExtension() { + return MD_FILE_EXTENSION; + } + + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#getOutputFolder() + */ + @Override + protected String getOutputFolder() { + return MD_FOLDER_NAME; + } + + +} diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/test/.keep b/org.gecko.emf.util.documentation.generators.mermaid.component/test/.keep new file mode 100644 index 00000000..e69de29b diff --git a/org.gecko.emf.util.mermaid/.classpath b/org.gecko.emf.util.documentation.generators.mermaid/.classpath similarity index 100% rename from org.gecko.emf.util.mermaid/.classpath rename to org.gecko.emf.util.documentation.generators.mermaid/.classpath diff --git a/org.gecko.emf.util.mermaid/.gitignore b/org.gecko.emf.util.documentation.generators.mermaid/.gitignore similarity index 100% rename from org.gecko.emf.util.mermaid/.gitignore rename to org.gecko.emf.util.documentation.generators.mermaid/.gitignore diff --git a/org.gecko.emf.util.mermaid/.project b/org.gecko.emf.util.documentation.generators.mermaid/.project similarity index 91% rename from org.gecko.emf.util.mermaid/.project rename to org.gecko.emf.util.documentation.generators.mermaid/.project index 3eab8373..43aa3897 100644 --- a/org.gecko.emf.util.mermaid/.project +++ b/org.gecko.emf.util.documentation.generators.mermaid/.project @@ -1,6 +1,6 @@ - org.gecko.emf.util.mermaid + org.gecko.emf.util.documentation.generators.mermaid diff --git a/org.gecko.emf.util.mermaid/bnd.bnd b/org.gecko.emf.util.documentation.generators.mermaid/bnd.bnd similarity index 78% rename from org.gecko.emf.util.mermaid/bnd.bnd rename to org.gecko.emf.util.documentation.generators.mermaid/bnd.bnd index edce4cd2..05cc8e6b 100644 --- a/org.gecko.emf.util.mermaid/bnd.bnd +++ b/org.gecko.emf.util.documentation.generators.mermaid/bnd.bnd @@ -10,4 +10,4 @@ src.xtend-gen=xtend-gen -library: \ enable-emf -Export-Package: org.gecko.emf.util.mermaid \ No newline at end of file +Export-Package: org.gecko.emf.util.documentation.generators.mermaid \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MarkdownCodeGen.xtend b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MarkdownCodeGen.xtend new file mode 100644 index 00000000..86cb0eef --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MarkdownCodeGen.xtend @@ -0,0 +1,130 @@ +package org.gecko.emf.util.documentation.generators.mermaid; + +import java.util.List +import org.eclipse.emf.common.util.EList +import org.eclipse.emf.common.util.EMap +import org.eclipse.emf.ecore.EAnnotation +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EClassifier +import org.eclipse.emf.ecore.EEnum +import org.eclipse.emf.ecore.EEnumLiteral +import org.eclipse.emf.ecore.EModelElement +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EStructuralFeature + +class MarkdownCodeGen { + + MermaidCodeGen mermaidCodeGen = new MermaidCodeGen(); + + def generateMarkdownDoc(EPackage epackage) + ''' +# «epackage.name» +«"\n"» +## Class Diagram +«"\n"» +«mermaidCodeGen.toMermaidClassDiagram(epackage)» +«"\n"» +«toEClassifierOverview(epackage.EClassifiers)» + ''' + + def toEClassifierOverview(EList eclassifiers) { +var List classes = eclassifiers.filter[ec | ec instanceof EClass].map[ec | ec as EClass].toList; +var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | ec as EEnum].toList; +''' +## Classes Overview +«"\n"» +«FOR eclass: classes» +«toClassOverview(eclass)» +«"\n"» +«"\n"» +«ENDFOR» +«"\n"» +## Enumerators Overview +«"\n"» +«FOR enumerator: enums» +«toEnumOverview(enumerator)» +«"\n"» +«"\n"» +«ENDFOR» +''' +} + + + def toEnumOverview(EEnum enumerator) + ''' +### «enumerator.name» +«"\n"» +#### Description +«"\n"» +«toModelElementDescription(enumerator)» +«"\n"» +#### Literals +«"\n"» +«toLiteralOverview(enumerator.ELiterals)» + ''' + + def toLiteralOverview(EList literals) + ''' +«IF literals.empty» +None. +«ELSE» +| Literal| Description| +| -----| -----------| +«FOR literal: literals» +|«literal.name»|«toModelElementDescription(literal)»| +«ENDFOR» +«ENDIF» + ''' + + def toClassOverview(EClass eclass) + ''' +### «eclass.name» +«"\n"» +#### Description +«"\n"» +«toModelElementDescription(eclass)» +«"\n"» +#### Class Diagram +«"\n"» +«mermaidCodeGen.startMermaidClassDiagram» +«mermaidCodeGen.toClassDiagram(eclass)» +«mermaidCodeGen.endMermaidClassDiagram» +«"\n"» +#### Fields +«"\n"» +«toClassStructuralFeaturesDescription(eclass.EAttributes)» +«"\n"» +#### References +«"\n"» +«toClassStructuralFeaturesDescription(eclass.EReferences)» +«"\n"» + ''' + + + def toClassStructuralFeaturesDescription(EList features) { + ''' +«IF features.empty» +None. +«ELSE» +| Name| Type| Bounds| Description| +| -----| ----| ------| -----------| +«FOR feature: features» +|«feature.name»|«feature.EType.name»|«feature.lowerBound»..«feature.upperBound»|«toModelElementDescription(feature)»| +«ENDFOR» +«ENDIF» + ''' + } + + + def String toModelElementDescription(EModelElement element) { + for(EAnnotation annotation : element.EAnnotations) { + var EMap details = annotation.details; + if(details.containsKey("documentation")) { + return details.get("documentation").trim; + } + + } + return "None." + } + +} \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidCodeGen.xtend b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidCodeGen.xtend new file mode 100644 index 00000000..b82c45b3 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidCodeGen.xtend @@ -0,0 +1,138 @@ +package org.gecko.emf.util.documentation.generators.mermaid; + +import java.util.List +import org.eclipse.emf.common.util.EList +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EClassifier +import org.eclipse.emf.ecore.EEnum +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EReference + +class MermaidCodeGen { + + def toMermaidClassDiagram(EPackage epackage) + ''' +«startMermaidClassDiagram()» +«toEClassifierDiagram(epackage.EClassifiers)» +«endMermaidClassDiagram()» + ''' + + def startMermaidClassDiagram() + ''' +```mermaid +classDiagram + ''' + + def endMermaidClassDiagram() + ''' +``` + ''' + + + def toEClassifierDiagram(EList eclassifiers) { +var List classes = eclassifiers.filter[ec | ec instanceof EClass].map[ec | ec as EClass].toList; +var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | ec as EEnum].toList; +''' +«FOR eclass: classes» +«toClassDiagram(eclass)» +«"\n"» +«"\n"» +«ENDFOR» +«FOR enumerator: enums» +«toEnumerator(enumerator)» +«"\n"» +«"\n"» +«ENDFOR» +''' +} + + + def toClassDiagram(EClass eclass) + ''' +«" "»class «eclass.name» { +«toClassMembers(eclass as EClass)» +} +«"\n"» +«toClassReferences(eclass as EClass)» +«"\n"» +«IF !(eclass as EClass).ESuperTypes.isEmpty» +«toSuperTypes(eclass as EClass)» +«"\n"» +«ENDIF» + ''' + + def toClassMembers(EClass eclass) + ''' +«FOR attribute: eclass.EAttributes» +«" "»«attribute.EType.name» «attribute.name» +«ENDFOR» + ''' + + def toClassReferences(EClass eclass) + ''' +«FOR ref: eclass.EReferences» +«toClassRef(eclass, ref)» +«ENDFOR» + ''' + + def toClassRef(EClass eclass, EReference ref) { + var multiplicity = extractMultiplicity(ref.lowerBound, ref.upperBound) + var refType = extractRefType(ref, eclass) + var isInRefModel = isInRefModel(ref, eclass) + ''' +«IF isInRefModel» +«" "»«eclass.name» «' .. '» «'\"'»«multiplicity»«'\"'» «refType»«' : '»«ref.name» +«ELSE» +«" "»«eclass.name» «' --> '» «'\"'»«multiplicity»«'\"'» «refType»«' : '»«ref.name» +«ENDIF» + ''' + } + + def String extractRefType(EReference ref, EClass containerClass) { + if(ref.EType.EPackage.name === containerClass.EPackage.name) { + return ref.EType.name + } else { +// TODO this should be the correct form when linking to a reference model (https://github.com/mermaid-js/mermaid/issues/1052) +// return ref.EType.EPackage.nsURI + "#//" + ref.EType.name; + return ref.EType.name + } + } + + def boolean isInRefModel(EReference ref, EClass containerClass) { + if(ref.EType.EPackage.name === containerClass.EPackage.name) { + return false + } else { + return true + } + } + + def String extractMultiplicity(int lowerBound, int upperBound) { + if(lowerBound == 0 && upperBound == -1) { + return "*" + } + else if(lowerBound == 1 && upperBound == -1) { + return "1..*" + } + return ((String.valueOf(lowerBound) + ".." + (String.valueOf(upperBound)))) + } + + + + def toSuperTypes(EClass eclass) + ''' +«FOR parent: eclass.ESuperTypes» +«" "»«eclass.name» ..> «parent.name» +«ENDFOR» + ''' + + def toEnumerator(EEnum enumerator) + ''' +«" "»class «enumerator.name» { +«" <>"» +«FOR value: enumerator.ELiterals» +«" "»«value.name» +«ENDFOR» +} + ''' + +} \ No newline at end of file diff --git a/org.gecko.emf.util.mermaid/src/org/gecko/emf/util/mermaid/packageinfo b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/packageinfo similarity index 100% rename from org.gecko.emf.util.mermaid/src/org/gecko/emf/util/mermaid/packageinfo rename to org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/packageinfo diff --git a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.gitignore b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.gitignore new file mode 100644 index 00000000..d939a34c --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.gitignore @@ -0,0 +1,6 @@ +/.MarkdownCodeGen.java._trace +/.MermaidCodeGen.java._trace +/.MarkdownCodeGen.xtendbin +/.MermaidCodeGen.xtendbin +/MarkdownCodeGen.java +/MermaidCodeGen.java diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/.classpath b/org.gecko.emf.util.documentation.generators.plantuml.component/.classpath new file mode 100644 index 00000000..1e6e6a74 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml.component/.classpath @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/.gitignore b/org.gecko.emf.util.documentation.generators.plantuml.component/.gitignore new file mode 100644 index 00000000..7fdbdef7 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml.component/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/bin_test/ diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/.project b/org.gecko.emf.util.documentation.generators.plantuml.component/.project new file mode 100644 index 00000000..e47c5e39 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml.component/.project @@ -0,0 +1,23 @@ + + + org.gecko.emf.util.documentation.generators.plantuml.component + + + + + + org.eclipse.jdt.core.javabuilder + + + + + bndtools.core.bndbuilder + + + + + + org.eclipse.jdt.core.javanature + bndtools.core.bndnature + + diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.core.resources.prefs b/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..67fd1986 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +encoding//.settings/org.eclipse.core.resources.prefs=UTF-8 +encoding//.settings/org.eclipse.jdt.core.prefs=UTF-8 +encoding//.settings/org.eclipse.jdt.ui.prefs=UTF-8 +encoding//src/org/gecko/emf/util/documentation/generators/plantuml/component/EcoreToPlantumlComponent.java=UTF-8 +encoding//src/test/component/Example.java=UTF-8 +encoding//test/test/component/ExampleTest.java=UTF-8 +encoding/bnd.bnd=UTF-8 diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.core.prefs b/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..049e42fd --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=11 diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.ui.prefs b/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..25b8c0de --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,10 @@ +content_assist_proposals_background=255,255,255 +content_assist_proposals_foreground=0,0,0 +eclipse.preferences.version=1 +org.eclipse.jdt.ui.formatterprofiles.version=13 +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.text.code_templates_migrated=true +org.eclipse.jdt.ui.text.custom_code_templates= +spelling_locale_initialized=true +useAnnotationsPrefPage=true +useQuickDiffPrefPage=true diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/bnd.bnd b/org.gecko.emf.util.documentation.generators.plantuml.component/bnd.bnd new file mode 100644 index 00000000..1d64ca8b --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml.component/bnd.bnd @@ -0,0 +1,12 @@ +javac.source: 11 +javac.target: 11 + +-library: enable-emf + +Bundle-Version: 1.0.0.SNAPSHOT +Private-Package: org.gecko.emf.util.documentation.generators.plantuml.component + + +-buildpath: \ + org.gecko.emf.util.documentation.generators.apis;version=latest,\ + org.gecko.emf.util.documentation.generators.plantuml;version=latest \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/src/org/gecko/emf/util/documentation/generators/plantuml/component/EcoreToPlantumlComponent.java b/org.gecko.emf.util.documentation.generators.plantuml.component/src/org/gecko/emf/util/documentation/generators/plantuml/component/EcoreToPlantumlComponent.java new file mode 100644 index 00000000..5fc627aa --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml.component/src/org/gecko/emf/util/documentation/generators/plantuml/component/EcoreToPlantumlComponent.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) 2012 - 2018 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ +package org.gecko.emf.util.documentation.generators.plantuml.component; + +import java.io.IOException; +import java.nio.file.Path; +import java.util.logging.Level; +import java.util.logging.Logger; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService; +import org.gecko.emf.util.documentation.generators.plantuml.PlantumlCodeGen; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; + + + +@Component(name = "EcoreToPlantumlComponent", service=EcoreToDocumentationService.class) +public class EcoreToPlantumlComponent extends EcoreToDocumentationService{ + + @Reference + ResourceSet resourceSet; + + private static final String PUML_FILE_EXTENSION = ".puml"; + private static final String PUML_FOLDER_NAME = "puml"; + private static final Logger LOGGER = Logger.getLogger(EcoreToPlantumlComponent.class.getName()); + + public void ecoreToPlantuml(String ecoreFilePath) { + super.ecoreToDocumentation(ecoreFilePath); + } + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.api.EcoreToDocumentationService#doGenerateDocumentation(java.nio.file.Path) + */ + @Override + protected void doGenerateDocumentation(Path ecoreFilePath) { + if(!canHandleFileFormat(ecoreFilePath.getFileName().toString())) { + LOGGER.log(Level.WARNING, "Cannot handle file format for " + ecoreFilePath); + return; + } + LOGGER.fine("Processing file " + ecoreFilePath); + EPackage ePackage = extractEPackageFromEcore(ecoreFilePath); + PlantumlCodeGen plantumlCodeGen = new PlantumlCodeGen(); + CharSequence cs = plantumlCodeGen.toPlantumlClassDiagram(ePackage); + generateOutputFile(ecoreFilePath, cs); + } + + private EPackage extractEPackageFromEcore(Path ecoreFilePath) { + Resource resource = resourceSet.createResource(URI.createFileURI(ecoreFilePath.toString())); + try { + resource.load(null); + if(resource.getContents().isEmpty()) { + LOGGER.log(Level.SEVERE, "Resource has no contents!"); + return null; + } + EObject eObj = resource.getContents().get(0); + if(eObj instanceof EPackage) { + return(EPackage) eObj; + } + else { + LOGGER.log(Level.SEVERE, "Content is not an EPackage!"); + return null; + } + } catch(IOException e) { + LOGGER.log(Level.SEVERE, "IOException in file " + ecoreFilePath + " " + e.getMessage()); + return null; + } + } + + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.api.EcoreToDocumentationService#getOutputFileExtension() + */ + @Override + protected String getOutputFileExtension() { + return PUML_FILE_EXTENSION; + } + + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.api.EcoreToDocumentationService#getOutputFolder() + */ + @Override + protected String getOutputFolder() { + return PUML_FOLDER_NAME; + } +} diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/test/.keep b/org.gecko.emf.util.documentation.generators.plantuml.component/test/.keep new file mode 100644 index 00000000..e69de29b diff --git a/org.gecko.emf.util.documentation.generators.plantuml/.classpath b/org.gecko.emf.util.documentation.generators.plantuml/.classpath new file mode 100644 index 00000000..e37cc369 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/org.gecko.emf.util.documentation.generators.plantuml/.gitignore b/org.gecko.emf.util.documentation.generators.plantuml/.gitignore new file mode 100644 index 00000000..ae3c1726 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/org.gecko.emf.util.documentation.generators.plantuml/.project b/org.gecko.emf.util.documentation.generators.plantuml/.project new file mode 100644 index 00000000..1cff4b35 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml/.project @@ -0,0 +1,29 @@ + + + org.gecko.emf.util.documentation.generators.plantuml + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + bndtools.core.bndbuilder + + + + + + org.eclipse.jdt.core.javanature + bndtools.core.bndnature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/org.gecko.emf.util.documentation.generators.plantuml/.settings/org.eclipse.jdt.core.prefs b/org.gecko.emf.util.documentation.generators.plantuml/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..f2525a8b --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,14 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=11 diff --git a/org.gecko.emf.util.documentation.generators.plantuml/bnd.bnd b/org.gecko.emf.util.documentation.generators.plantuml/bnd.bnd new file mode 100644 index 00000000..3c17b4b3 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml/bnd.bnd @@ -0,0 +1,14 @@ +Bundle-Name: Xtend Generator for Plantuml +Bundle-Description: Xtend Generator for Plantuml +Bundle-Version: 1.0.0-SNAPSHOT + +src.xtend-gen=xtend-gen + +-buildpath: \ + org.eclipse.xtext.builder,\ + org.eclipse.xtext.xbase.lib + +-library: \ + enable-emf + +Export-Package: org.gecko.emf.util.documentation.generators.plantuml diff --git a/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlCodeGen.xtend b/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlCodeGen.xtend new file mode 100644 index 00000000..b734d03a --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlCodeGen.xtend @@ -0,0 +1,133 @@ +package org.gecko.emf.util.documentation.generators.plantuml; + +import java.util.List +import org.eclipse.emf.common.util.EList +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EClassifier +import org.eclipse.emf.ecore.EEnum +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EReference + +class PlantumlCodeGen { + def toPlantumlClassDiagram(EPackage epackage) + ''' +«startPlantumlClassDiagram()» +«toEClassifierDiagram(epackage.EClassifiers)» +«endPlantumlClassDiagram()» + ''' + + def startPlantumlClassDiagram() + ''' +@startuml + ''' + + def endPlantumlClassDiagram() + ''' +@enduml + ''' + + + def toEClassifierDiagram(EList eclassifiers) { +var List classes = eclassifiers.filter[ec | ec instanceof EClass].map[ec | ec as EClass].toList; +var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | ec as EEnum].toList; +''' +«FOR eclass: classes» +«toClassDiagram(eclass)» +«"\n"» +«"\n"» +«ENDFOR» +«FOR enumerator: enums» +«toEnumerator(enumerator)» +«"\n"» +«"\n"» +«ENDFOR» +''' +} + + def toClassDiagram(EClass eclass) + ''' +«" "»class «eclass.name» { +«toClassMembers(eclass as EClass)» +} +«"\n"» +«toClassReferences(eclass as EClass)» +«"\n"» +«IF !(eclass as EClass).ESuperTypes.isEmpty» +«toSuperTypes(eclass as EClass)» +«"\n"» +«ENDIF» + ''' + + def toClassMembers(EClass eclass) + ''' +«FOR attribute: eclass.EAttributes» +«" "»«attribute.name» : «attribute.EType.name» +«ENDFOR» + ''' + + def toClassReferences(EClass eclass) + ''' +«FOR ref: eclass.EReferences» +«toClassRef(eclass, ref)» +«ENDFOR» + ''' + + def toClassRef(EClass eclass, EReference ref) { + var multiplicity = extractMultiplicity(ref.lowerBound, ref.upperBound) + var refType = extractRefType(ref, eclass) + var isInRefModel = isInRefModel(ref, eclass) + ''' +«IF isInRefModel» +«" "»«eclass.name» «' .. '» «'\"'»«multiplicity»«'\"'» «refType»«' : '»«ref.name» +«ELSE» +«" "»«eclass.name» «' --> '» «'\"'»«multiplicity»«'\"'» «refType»«' : '»«ref.name» +«ENDIF» + ''' + } + + def String extractRefType(EReference ref, EClass containerClass) { + if(ref.EType.EPackage.name === containerClass.EPackage.name) { + return ref.EType.name + } else { +// TODO this should be the correct form when linking to a reference model (https://github.com/mermaid-js/mermaid/issues/1052) +// return ref.EType.EPackage.nsURI + "#//" + ref.EType.name; + return ref.EType.name + } + } + + def boolean isInRefModel(EReference ref, EClass containerClass) { + if(ref.EType.EPackage.name === containerClass.EPackage.name) { + return false + } else { + return true + } + } + + def String extractMultiplicity(int lowerBound, int upperBound) { + if(lowerBound == 0 && upperBound == -1) { + return "*" + } + else if(lowerBound == 1 && upperBound == -1) { + return "1..*" + } + return ((String.valueOf(lowerBound) + ".." + (String.valueOf(upperBound)))) + } + + + + def toSuperTypes(EClass eclass) + ''' +«FOR parent: eclass.ESuperTypes» +«" "»«eclass.name» ..> «parent.name» +«ENDFOR» + ''' + + def toEnumerator(EEnum enumerator) + ''' +«" "»enum «enumerator.name» { +«FOR value: enumerator.ELiterals» +«" "»«value.name» +«ENDFOR» +} + ''' +} \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/packageinfo b/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/packageinfo new file mode 100644 index 00000000..9ad81f6f --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/packageinfo @@ -0,0 +1 @@ +version 1.0.0 diff --git a/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.gitignore b/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.gitignore new file mode 100644 index 00000000..a81ae4f4 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.gitignore @@ -0,0 +1,3 @@ +/.PlantumlCodeGen.java._trace +/.PlantumlCodeGen.xtendbin +/PlantumlCodeGen.java diff --git a/org.gecko.emf.util.mermaid.command/bnd.bnd b/org.gecko.emf.util.mermaid.command/bnd.bnd deleted file mode 100644 index 56c01907..00000000 --- a/org.gecko.emf.util.mermaid.command/bnd.bnd +++ /dev/null @@ -1,11 +0,0 @@ -javac.source: 11 -javac.target: 11 - --library: enable-emf - -Bundle-Version: 1.0.0.SNAPSHOT -Private-Package: org.gecko.emf.util.mermaid.command - --includeresource.resources: \ - data=data/ --buildpath: org.gecko.emf.util.mermaid;version=latest \ No newline at end of file diff --git a/org.gecko.emf.util.mermaid.command/data/3DPrinter.ecore b/org.gecko.emf.util.mermaid.command/data/3DPrinter.ecore deleted file mode 100644 index 8a3b68ef..00000000 --- a/org.gecko.emf.util.mermaid.command/data/3DPrinter.ecore +++ /dev/null @@ -1,139 +0,0 @@ - - - - -
- - - -
- - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - - -
- - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.gecko.emf.util.mermaid.command/data/3DPrinter.md b/org.gecko.emf.util.mermaid.command/data/3DPrinter.md deleted file mode 100644 index be880707..00000000 --- a/org.gecko.emf.util.mermaid.command/data/3DPrinter.md +++ /dev/null @@ -1,26 +0,0 @@ -```mermaid -classDiagram - class 3DPrinter { - 3DPrinter3dprinttypeValue 3dprinttype - EString alternateName - EString areaServed - EString dataProvider - EString dateCreated - EString dateModified - EString description - EString id - 3DPrinterIfValue if - EDoubleObject memorysize - EString n - EString name - EString owner - EDoubleObject printsizex - EDoubleObject printsizey - EDoubleObject printsizez - 3DPrinterRtValue rt - EString source - 3DPrinterTypeValue type - EBooleanObject wanconnected - -} -``` diff --git a/org.gecko.emf.util.mermaid.command/data/bsm.ecore b/org.gecko.emf.util.mermaid.command/data/bsm.ecore deleted file mode 100644 index 4cec7089..00000000 --- a/org.gecko.emf.util.mermaid.command/data/bsm.ecore +++ /dev/null @@ -1,292 +0,0 @@ - - - - -
- - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - - -
- - - -
- - - - -
- - - - - -
- - - -
- - - - -
- - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - - -
- - - -
- - - - -
- - - - -
- - - - - -
- - - -
- - - - -
- - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - - - -
- - - - - -
- - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - - -
- - - -
- - - - - -
- - - -
- - - - - -
- - - -
- - - - - - - -
- - - - - - - - - - -
- - - - - diff --git a/org.gecko.emf.util.mermaid.command/data/bsm.md b/org.gecko.emf.util.mermaid.command/data/bsm.md deleted file mode 100644 index 5473ea21..00000000 --- a/org.gecko.emf.util.mermaid.command/data/bsm.md +++ /dev/null @@ -1,112 +0,0 @@ -```mermaid -classDiagram - class Plan { - EDate start - EDate ende - PlanTyp type - EDate stand -} - - Plan "1" --> "1..1" Traeger : traeger - - class PlanPosition { - String nummer - Integer order - EString titel - EString beschreibung - EDate start - EDate ende -} - - PlanPosition "1" --> "1..1" Plan : plan - PlanPosition "*" --> "0..-1" MassnahmeAnteil : massnahmeanteil - - class MassnahmeAnteil { - EDoubleObject anteil - EString beschreibung -} - - MassnahmeAnteil "1" --> "1..1" Massnahme : massnahme - - class StrukturObjekt { - EString uuid - EString bezeichnung - EString beschreibung - EString externe_id - EBoolean parkplatzBetroffen -} - - StrukturObjekt "1" --> "0..1" StrukturObjekt : parent - StrukturObjekt "1" --> "1..1" Traeger : traeger - StrukturObjekt "*" --> "1..-1" Zeitraum : zeitraum - - class Traeger { - EString title -} - - - class Zeitraum { - EDate erstellt - EDate start - EDate ende - ZeitraumTyp typ - EDate aufgehoben - EString hinweis - ZeitraumAenderungsTyp aenderungsTyp -} - - - class Massnahme { - PolygonGeom the_geom -} - - - Massnahme ..> StrukturObjekt - - class Freihalteflaeche { - PolygonGeom the_geom -} - - - Freihalteflaeche ..> StrukturObjekt - - class Umleitung { - LineGeom the_geom -} - - - Umleitung ..> StrukturObjekt - - class Asset { - EDate gewaehrleistungsDatum -} - - - class PlanTyp { - <> - WIRTSCHAFTSPLAN - INVESTPLAN -} - - class ZeitraumTyp { - <> - IDEE_TRAEGER - KOORDINIERT_BSM - BEAUFTRAGT - ZWANG - FREIGABE_STRASSE - IST - PLANUNG -} - - class ZeitraumAenderungsTyp { - <> - Witterung - Finanzielle Engpässe - Fehlplanung - Auschreibung - Personal Engpässe - NONE -} - -``` diff --git a/org.gecko.emf.util.mermaid.command/src/org/gecko/emf/util/mermaid/command/EcoreToMermaidCommandComponent.java b/org.gecko.emf.util.mermaid.command/src/org/gecko/emf/util/mermaid/command/EcoreToMermaidCommandComponent.java deleted file mode 100644 index 09d8a567..00000000 --- a/org.gecko.emf.util.mermaid.command/src/org/gecko/emf/util/mermaid/command/EcoreToMermaidCommandComponent.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) 2012 - 2018 Data In Motion and others. - * All rights reserved. - * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v1.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Data In Motion - initial API and implementation - */ -package org.gecko.emf.util.mermaid.command; - -import java.io.IOException; -import java.io.PrintWriter; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.gecko.emf.util.mermaid.MermaidCodeGen; -import org.osgi.service.component.annotations.Component; -import org.osgi.service.component.annotations.Reference; - -@Component(service=EcoreToMermaidCommandComponent.class, property= { - "osgi.command.scope=ecoretomermaid", - "osgi.command.function=ecoreToMermaid" - }) -public class EcoreToMermaidCommandComponent { - - @Reference - ResourceSet resourceSet; - - private static final String BASE_PATH = System.getProperty("base.path"); - private static final String DATA_FOLDER = BASE_PATH + "/data/"; - - public void ecoreToMermaid(String ecoreFileName) { - Resource resource = resourceSet.createResource(URI.createFileURI(DATA_FOLDER + ecoreFileName)); - try { - resource.load(null); - if(resource.getContents().isEmpty()) { - System.err.println("Resource has no contents!"); - return; - } - EObject eObj = resource.getContents().get(0); - if(eObj instanceof EPackage) { - EPackage ePackage = (EPackage) eObj; - MermaidCodeGen mermaidCodeGen = new MermaidCodeGen(); - CharSequence cs = mermaidCodeGen.toMermaidClassDiagram(ePackage); - String outputFile = DATA_FOLDER + ecoreFileName.replace("ecore", "md"); - try(PrintWriter pw = new PrintWriter(outputFile)) { - pw.write(cs.toString()); - } - } - else { - System.err.println("Content is not an EClass!"); - return; - } - } catch(IOException e) { - System.err.println("IOException! " + e.getMessage()); - return; - } - } -} diff --git a/org.gecko.emf.util.mermaid/src/org/gecko/emf/util/mermaid/MermaidCodeGen.xtend b/org.gecko.emf.util.mermaid/src/org/gecko/emf/util/mermaid/MermaidCodeGen.xtend deleted file mode 100644 index 7a16aa8c..00000000 --- a/org.gecko.emf.util.mermaid/src/org/gecko/emf/util/mermaid/MermaidCodeGen.xtend +++ /dev/null @@ -1,66 +0,0 @@ -package org.gecko.emf.util.mermaid; - -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.EEnum - -class MermaidCodeGen { - - def toMermaidClassDiagram(EPackage epackage) - ''' -```mermaid -classDiagram -«FOR eclassifier: epackage.EClassifiers» -«IF eclassifier instanceof EClass» -«" "»class «eclassifier.name» { -«toClassMembers(eclassifier as EClass)» -} -«"\n"» -«toClassReferences(eclassifier as EClass)» -«"\n"» -«IF !(eclassifier as EClass).ESuperTypes.isEmpty» -«toSuperTypes(eclassifier as EClass)» -«"\n"» -«ENDIF» -«ENDIF» -«ENDFOR» -«FOR eclassifier: epackage.EClassifiers» -«IF eclassifier instanceof EEnum» -«toEnumerator(eclassifier as EEnum)» -«"\n"» -«ENDIF» -«ENDFOR» -``` - ''' - - def toClassMembers(EClass eclass) - ''' -«FOR attribute: eclass.EAttributes» -«" "»«attribute.EType.name» «attribute.name» -«ENDFOR» - ''' - - def toClassReferences(EClass eclass) - ''' -«FOR ref: eclass.EReferences» -«" "»«eclass.name» «IF ref.isMany» «'\"*\"'»«ELSE»«'\"1\"'»«ENDIF»«' --> '» «'\"'»«ref.lowerBound»«'..'»«ref.upperBound»«'\"'» «ref.EType.name»«' : '»«ref.name» -«ENDFOR» - ''' - def toSuperTypes(EClass eclass) - ''' -«FOR parent: eclass.ESuperTypes» -«" "»«eclass.name» ..> «parent.name» -«ENDFOR» - ''' - - def toEnumerator(EEnum enumerator) - ''' -«" "»class «enumerator.name» { -«" <>"» -«FOR value: enumerator.ELiterals» -«" "»«value.name» -«ENDFOR» -} - ''' - -} \ No newline at end of file diff --git a/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/.MermaidCodeGen.xtendbin b/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/.MermaidCodeGen.xtendbin deleted file mode 100644 index cf97379f5c28ee3e5a33c2c0d3528d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F7jEBaLcNdijJ+wh!{$tH@Non2gtmSzWRRzTa5jO1#l@5Mp=mBxBvw zBfM_l-bzfhq*SYGXUOv}eK|v_K19m(O9S->6RGO^X2UR)BF0i3?#q@Xch-NteQC&d z3_+To{TuiuXUXO|d;oy!C-nax_+O#j-rwKb(aruB=laTck7h|7*;Z9d}ti0mb}_`IL9hCyOZdWcvv|`?wc4Za6c9p%E3R_zHGW6VUait=P$h?W=tAEba3O2>IfsG z5A-M9AEbyY>&5$$aJJ@t`PNoqYdYl!m$a6s^6I4)kf(K6D3o1!#;Cm`zI6fnHX&Ym zlyEKvB3IOYaWgTjEw+%X^MrA&;J{FG8NJn)TriWI`5{^P$D$9Kice>2m+eGz$u2LO!T`Na$#J{a(yR_}KM{YA|`^?T#@-#33J s@t48=N9dny{x7@z?+U;F>z{8oll_xleJw(wU-f}MN6XK3i{jVmUkNtd*8l(j diff --git a/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/.gitignore b/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/.gitignore deleted file mode 100644 index b6815a06..00000000 --- a/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/.MermaidCodeGen.java._trace diff --git a/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/MermaidCodeGen.java b/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/MermaidCodeGen.java deleted file mode 100644 index 0ac1a0f7..00000000 --- a/org.gecko.emf.util.mermaid/xtend-gen/org/gecko/emf/util/mermaid/MermaidCodeGen.java +++ /dev/null @@ -1,174 +0,0 @@ -package org.gecko.emf.util.mermaid; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EClassifier; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EEnumLiteral; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.xtend2.lib.StringConcatenation; - -@SuppressWarnings("all") -public class MermaidCodeGen { - public CharSequence toMermaidClassDiagram(final EPackage epackage) { - StringConcatenation _builder = new StringConcatenation(); - _builder.append("```mermaid "); - _builder.newLine(); - _builder.append("classDiagram"); - _builder.newLine(); - { - EList _eClassifiers = epackage.getEClassifiers(); - for(final EClassifier eclassifier : _eClassifiers) { - { - if ((eclassifier instanceof EClass)) { - _builder.append(" "); - _builder.append("class "); - String _name = ((EClass)eclassifier).getName(); - _builder.append(_name); - _builder.append(" {"); - _builder.newLineIfNotEmpty(); - CharSequence _classMembers = this.toClassMembers(((EClass) eclassifier)); - _builder.append(_classMembers); - _builder.newLineIfNotEmpty(); - _builder.append("}"); - _builder.newLine(); - _builder.append("\n"); - _builder.newLineIfNotEmpty(); - CharSequence _classReferences = this.toClassReferences(((EClass) eclassifier)); - _builder.append(_classReferences); - _builder.newLineIfNotEmpty(); - _builder.append("\n"); - _builder.newLineIfNotEmpty(); - { - boolean _isEmpty = ((EClass) eclassifier).getESuperTypes().isEmpty(); - boolean _not = (!_isEmpty); - if (_not) { - CharSequence _superTypes = this.toSuperTypes(((EClass) eclassifier)); - _builder.append(_superTypes); - _builder.newLineIfNotEmpty(); - _builder.append("\n"); - _builder.newLineIfNotEmpty(); - } - } - } - } - } - } - { - EList _eClassifiers_1 = epackage.getEClassifiers(); - for(final EClassifier eclassifier_1 : _eClassifiers_1) { - { - if ((eclassifier_1 instanceof EEnum)) { - CharSequence _enumerator = this.toEnumerator(((EEnum) eclassifier_1)); - _builder.append(_enumerator); - _builder.newLineIfNotEmpty(); - _builder.append("\n"); - _builder.newLineIfNotEmpty(); - } - } - } - } - _builder.append("```"); - _builder.newLine(); - return _builder; - } - - public CharSequence toClassMembers(final EClass eclass) { - StringConcatenation _builder = new StringConcatenation(); - { - EList _eAttributes = eclass.getEAttributes(); - for(final EAttribute attribute : _eAttributes) { - _builder.append(" "); - String _name = attribute.getEType().getName(); - _builder.append(_name); - _builder.append(" "); - String _name_1 = attribute.getName(); - _builder.append(_name_1); - _builder.newLineIfNotEmpty(); - } - } - return _builder; - } - - public CharSequence toClassReferences(final EClass eclass) { - StringConcatenation _builder = new StringConcatenation(); - { - EList _eReferences = eclass.getEReferences(); - for(final EReference ref : _eReferences) { - _builder.append(" "); - String _name = eclass.getName(); - _builder.append(_name); - _builder.append(" "); - { - boolean _isMany = ref.isMany(); - if (_isMany) { - _builder.append(" "); - _builder.append("\"*\""); - } else { - _builder.append("\"1\""); - } - } - _builder.append(" --> "); - _builder.append(" "); - _builder.append("\""); - int _lowerBound = ref.getLowerBound(); - _builder.append(_lowerBound); - _builder.append(".."); - int _upperBound = ref.getUpperBound(); - _builder.append(_upperBound); - _builder.append("\""); - _builder.append(" "); - String _name_1 = ref.getEType().getName(); - _builder.append(_name_1); - _builder.append(" : "); - String _name_2 = ref.getName(); - _builder.append(_name_2); - _builder.newLineIfNotEmpty(); - } - } - return _builder; - } - - public CharSequence toSuperTypes(final EClass eclass) { - StringConcatenation _builder = new StringConcatenation(); - { - EList _eSuperTypes = eclass.getESuperTypes(); - for(final EClass parent : _eSuperTypes) { - _builder.append(" "); - String _name = eclass.getName(); - _builder.append(_name); - _builder.append(" ..> "); - String _name_1 = parent.getName(); - _builder.append(_name_1); - _builder.newLineIfNotEmpty(); - } - } - return _builder; - } - - public CharSequence toEnumerator(final EEnum enumerator) { - StringConcatenation _builder = new StringConcatenation(); - _builder.append(" "); - _builder.append("class "); - String _name = enumerator.getName(); - _builder.append(_name); - _builder.append(" {"); - _builder.newLineIfNotEmpty(); - _builder.append(" <>"); - _builder.newLineIfNotEmpty(); - { - EList _eLiterals = enumerator.getELiterals(); - for(final EEnumLiteral value : _eLiterals) { - _builder.append(" "); - String _name_1 = value.getName(); - _builder.append(_name_1); - _builder.newLineIfNotEmpty(); - } - } - _builder.append("}"); - _builder.newLine(); - return _builder; - } -} From e4c85b9d4d4caf18c122547ebf229e026a809e9a Mon Sep 17 00:00:00 2001 From: Ilenia Salvadori Date: Tue, 18 Oct 2022 16:47:57 +0200 Subject: [PATCH 08/21] refactored documentation code generator Signed-off-by: Ilenia Salvadori --- .../EcoreToClassDiagramCodeGenerator.java | 27 ++ .../apis/EcoreToDocumentationConstants.java | 24 ++ .../apis/EcoreToDocumentationService.java | 30 +- .../launch.bndrun | 9 +- .../commands/EcoreToDocumentationCommand.java | 20 +- .../.classpath | 0 .../.gitignore | 0 .../.project | 2 +- .../org.eclipse.core.resources.prefs | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 0 .../.settings/org.eclipse.jdt.ui.prefs | 0 .../bnd.bnd | 4 +- .../component/EcoreToMarkdownComponent.java | 36 ++- .../test/.keep | 0 .../.classpath | 8 +- .../.gitignore | 1 + .../.project | 8 +- .../.settings/org.eclipse.jdt.core.prefs | 3 + .../bnd.bnd | 17 + .../markdown}/MarkdownCodeGen.xtend | 38 ++- .../markdown/.MarkdownCodeGen.xtendbin | Bin 0 -> 6736 bytes .../generators/markdown/.gitignore | 1 + .../generators/markdown/MarkdownCodeGen.java | 297 ++++++++++++++++++ .../org.eclipse.core.resources.prefs | 8 - .../bnd.bnd | 3 +- .../generators/mermaid/MermaidCodeGen.xtend | 38 ++- .../.gitignore | 2 - .../.settings/org.eclipse.jdt.ui.prefs | 10 - .../bnd.bnd | 12 - .../component/EcoreToPlantumlComponent.java | 100 ------ .../test/.keep | 0 .../bnd.bnd | 3 +- .../generators/plantuml/PlantumlCodeGen.xtend | 97 +++++- 33 files changed, 569 insertions(+), 231 deletions(-) create mode 100644 org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java create mode 100644 org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationConstants.java rename {org.gecko.emf.util.documentation.generators.mermaid.component => org.gecko.emf.util.documentation.generators.markdown.component}/.classpath (100%) rename {org.gecko.emf.util.documentation.generators.mermaid.component => org.gecko.emf.util.documentation.generators.markdown.component}/.gitignore (100%) rename {org.gecko.emf.util.documentation.generators.plantuml.component => org.gecko.emf.util.documentation.generators.markdown.component}/.project (88%) rename {org.gecko.emf.util.documentation.generators.plantuml.component => org.gecko.emf.util.documentation.generators.markdown.component}/.settings/org.eclipse.core.resources.prefs (73%) rename {org.gecko.emf.util.documentation.generators.mermaid.component => org.gecko.emf.util.documentation.generators.markdown.component}/.settings/org.eclipse.jdt.core.prefs (100%) rename {org.gecko.emf.util.documentation.generators.mermaid.component => org.gecko.emf.util.documentation.generators.markdown.component}/.settings/org.eclipse.jdt.ui.prefs (100%) rename {org.gecko.emf.util.documentation.generators.mermaid.component => org.gecko.emf.util.documentation.generators.markdown.component}/bnd.bnd (53%) rename org.gecko.emf.util.documentation.generators.mermaid.component/src/org/gecko/emf/util/documentation/generators/mermaid/component/EcoreToMermaidComponent.java => org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java (71%) rename {org.gecko.emf.util.documentation.generators.mermaid.component => org.gecko.emf.util.documentation.generators.markdown.component}/test/.keep (100%) rename {org.gecko.emf.util.documentation.generators.plantuml.component => org.gecko.emf.util.documentation.generators.markdown}/.classpath (66%) create mode 100644 org.gecko.emf.util.documentation.generators.markdown/.gitignore rename {org.gecko.emf.util.documentation.generators.mermaid.component => org.gecko.emf.util.documentation.generators.markdown}/.project (66%) rename {org.gecko.emf.util.documentation.generators.plantuml.component => org.gecko.emf.util.documentation.generators.markdown}/.settings/org.eclipse.jdt.core.prefs (76%) create mode 100644 org.gecko.emf.util.documentation.generators.markdown/bnd.bnd rename {org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid => org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown}/MarkdownCodeGen.xtend (68%) create mode 100644 org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin create mode 100644 org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.gitignore create mode 100644 org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.java delete mode 100644 org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.gecko.emf.util.documentation.generators.plantuml.component/.gitignore delete mode 100644 org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.ui.prefs delete mode 100644 org.gecko.emf.util.documentation.generators.plantuml.component/bnd.bnd delete mode 100644 org.gecko.emf.util.documentation.generators.plantuml.component/src/org/gecko/emf/util/documentation/generators/plantuml/component/EcoreToPlantumlComponent.java delete mode 100644 org.gecko.emf.util.documentation.generators.plantuml.component/test/.keep diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java new file mode 100644 index 00000000..8a580502 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2012 - 2022 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ +package org.gecko.emf.util.documentation.generators.apis; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * @author ilenia + * @since Oct 18, 2022 + */ +public interface EcoreToClassDiagramCodeGenerator { + + CharSequence generateClassDiagram(EPackage ePackage); + + CharSequence generateClassDiagram(EClass eClass); +} diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationConstants.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationConstants.java new file mode 100644 index 00000000..65ff3c48 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationConstants.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2012 - 2022 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ +package org.gecko.emf.util.documentation.generators.apis; + +/** + * + * @author ilenia + * @since Oct 18, 2022 + */ +public enum EcoreToDocumentationConstants { + + CLASS_DIAGRAM_GEN_MERMAID_OPTION , CLASS_DIAGRAM_GEN_PLANTUML_OPTION, ONLY_MARKDOWN_DOCS; + + +} diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java index 8881ad54..0398aed5 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java @@ -23,43 +23,41 @@ import org.osgi.annotation.versioning.ProviderType; @ProviderType -public abstract class EcoreToDocumentationService{ +public interface EcoreToDocumentationService{ public static final String ECORE_FILE_EXTENSION = ".ecore"; - protected static final Logger LOGGER = Logger.getLogger(EcoreToDocumentationService.class.getName()); + public static final Logger LOGGER = Logger.getLogger(EcoreToDocumentationService.class.getName()); - protected boolean canHandleFileFormat(String fileName) { + String getOutputFileExtension(); + String getOutputFolder(EcoreToDocumentationConstants mode); + void doGenerateDocumentation(Path ecoreFilePath, EcoreToDocumentationConstants mode); + + default boolean canHandleFileFormat(String fileName) { Objects.requireNonNull(fileName, "File name cannot be null!"); if(fileName.endsWith(ECORE_FILE_EXTENSION)) { return true; } return false; - } - - protected abstract String getOutputFileExtension(); - protected abstract String getOutputFolder(); - protected abstract void doGenerateDocumentation(Path ecoreFilePath); + } - public void ecoreToDocumentation(String ecoreFilePath) { + default void ecoreToDocumentation(String ecoreFilePath, EcoreToDocumentationConstants mode) { Path path = Paths.get(ecoreFilePath); if(Files.isDirectory(path)) { try { - Files.list(path).filter(p -> Files.isRegularFile(p)).forEach(p -> doGenerateDocumentation(p)); + Files.list(path).filter(p -> Files.isRegularFile(p)).forEach(p -> doGenerateDocumentation(p, mode)); } catch (IOException e) { LOGGER.log(Level.SEVERE, "IOException while getting files from folder " + ecoreFilePath + " " + e.getMessage()); } } else if(Files.isRegularFile(path)) { - doGenerateDocumentation(path); + doGenerateDocumentation(path, mode); } } - - - protected void generateOutputFile(Path ecoreFilePath, CharSequence generatedCharSeq) { - Path parentFolder = Paths.get(ecoreFilePath.toString()).getParent(); + default void generateOutputFile(Path ecoreFilePath, CharSequence generatedCharSeq, EcoreToDocumentationConstants mode) { + Path parentFolder = Paths.get(ecoreFilePath.toString()).getParent().getParent(); String outputFileName = ecoreFilePath.getFileName().toString().replace(ECORE_FILE_EXTENSION, getOutputFileExtension()); - Path outputPath = Paths.get(parentFolder.toString(), getOutputFolder(), outputFileName); + Path outputPath = Paths.get(parentFolder.toString(), getOutputFolder(mode), outputFileName); try { Files.deleteIfExists(outputPath); Files.createDirectories(outputPath.getParent()); diff --git a/org.gecko.emf.util.documentation.generators.commands/launch.bndrun b/org.gecko.emf.util.documentation.generators.commands/launch.bndrun index 0601b9e1..528abb79 100644 --- a/org.gecko.emf.util.documentation.generators.commands/launch.bndrun +++ b/org.gecko.emf.util.documentation.generators.commands/launch.bndrun @@ -3,8 +3,7 @@ bnd.identity;id='org.apache.felix.gogo.command',\ bnd.identity;id='org.apache.felix.gogo.runtime',\ bnd.identity;id='org.apache.felix.gogo.shell',\ - bnd.identity;id='org.gecko.emf.util.documentation.generators.mermaid.component',\ - bnd.identity;id='org.gecko.emf.util.documentation.generators.plantuml.component' + bnd.identity;id='org.gecko.emf.util.documentation.generators.markdown.component' -runproperties.properties: \ base.path=${.} @@ -40,11 +39,11 @@ org.gecko.emf.util.documentation.generators.apis;version=snapshot,\ org.gecko.emf.util.documentation.generators.commands;version=snapshot,\ org.gecko.emf.util.documentation.generators.mermaid;version=snapshot,\ - org.gecko.emf.util.documentation.generators.mermaid.component;version=snapshot,\ org.gecko.emf.util.documentation.generators.plantuml;version=snapshot,\ - org.gecko.emf.util.documentation.generators.plantuml.component;version=snapshot,\ org.osgi.service.cm;version='[1.6.0,1.6.1)',\ org.osgi.util.function;version='[1.1.0,1.1.1)',\ org.osgi.util.promise;version='[1.2.0,1.2.1)',\ org.osgi.util.pushstream;version='[1.0.1,1.0.2)',\ - org.yaml.snakeyaml;version='[1.30.0,1.30.1)' \ No newline at end of file + org.yaml.snakeyaml;version='[1.30.0,1.30.1)',\ + org.gecko.emf.util.documentation.generators.markdown;version=snapshot,\ + org.gecko.emf.util.documentation.generators.markdown.component;version=snapshot \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.commands/src/org/gecko/emf/util/documentation/generators/commands/EcoreToDocumentationCommand.java b/org.gecko.emf.util.documentation.generators.commands/src/org/gecko/emf/util/documentation/generators/commands/EcoreToDocumentationCommand.java index 8b21ae72..1170bcfb 100644 --- a/org.gecko.emf.util.documentation.generators.commands/src/org/gecko/emf/util/documentation/generators/commands/EcoreToDocumentationCommand.java +++ b/org.gecko.emf.util.documentation.generators.commands/src/org/gecko/emf/util/documentation/generators/commands/EcoreToDocumentationCommand.java @@ -11,6 +11,7 @@ */ package org.gecko.emf.util.documentation.generators.commands; +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationConstants; import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; @@ -20,22 +21,23 @@ @Component(name = "EcoreToDocumentationCommand", service=EcoreToDocumentationCommand.class, property= { "osgi.command.scope=EcoreToDocumentation", "osgi.command.function=ecoreToPlantuml", - "osgi.command.function=ecoreToMermaid" + "osgi.command.function=ecoreToMermaid", + "osgi.command.function=ecoreToPlainMd" }) public class EcoreToDocumentationCommand { - @Reference(target = "(component.name=EcoreToPlantumlComponent)") - EcoreToDocumentationService ecoreToPlantumlComponent; - - @Reference(target = "(component.name=EcoreToMermaidComponent)") - EcoreToDocumentationService ecoreToMermaidComponent; - + @Reference(target = "(component.name=EcoreToMarkdownComponent)") + EcoreToDocumentationService ecoreToMarkdownComponent; public void ecoreToPlantuml(String ecoreFilePath) { - ecoreToPlantumlComponent.ecoreToDocumentation(ecoreFilePath); + ecoreToMarkdownComponent.ecoreToDocumentation(ecoreFilePath, EcoreToDocumentationConstants.CLASS_DIAGRAM_GEN_PLANTUML_OPTION); } public void ecoreToMermaid(String ecoreFilePath) { - ecoreToMermaidComponent.ecoreToDocumentation(ecoreFilePath); + ecoreToMarkdownComponent.ecoreToDocumentation(ecoreFilePath, EcoreToDocumentationConstants.CLASS_DIAGRAM_GEN_MERMAID_OPTION); + } + + public void ecoreToPlainMd(String ecoreFilePath) { + ecoreToMarkdownComponent.ecoreToDocumentation(ecoreFilePath, EcoreToDocumentationConstants.ONLY_MARKDOWN_DOCS); } } diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/.classpath b/org.gecko.emf.util.documentation.generators.markdown.component/.classpath similarity index 100% rename from org.gecko.emf.util.documentation.generators.mermaid.component/.classpath rename to org.gecko.emf.util.documentation.generators.markdown.component/.classpath diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/.gitignore b/org.gecko.emf.util.documentation.generators.markdown.component/.gitignore similarity index 100% rename from org.gecko.emf.util.documentation.generators.mermaid.component/.gitignore rename to org.gecko.emf.util.documentation.generators.markdown.component/.gitignore diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/.project b/org.gecko.emf.util.documentation.generators.markdown.component/.project similarity index 88% rename from org.gecko.emf.util.documentation.generators.plantuml.component/.project rename to org.gecko.emf.util.documentation.generators.markdown.component/.project index e47c5e39..ce09e1ea 100644 --- a/org.gecko.emf.util.documentation.generators.plantuml.component/.project +++ b/org.gecko.emf.util.documentation.generators.markdown.component/.project @@ -1,6 +1,6 @@ - org.gecko.emf.util.documentation.generators.plantuml.component + org.gecko.emf.util.documentation.generators.markdown.component diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.core.resources.prefs b/org.gecko.emf.util.documentation.generators.markdown.component/.settings/org.eclipse.core.resources.prefs similarity index 73% rename from org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.core.resources.prefs rename to org.gecko.emf.util.documentation.generators.markdown.component/.settings/org.eclipse.core.resources.prefs index 67fd1986..6580a3cc 100644 --- a/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.core.resources.prefs +++ b/org.gecko.emf.util.documentation.generators.markdown.component/.settings/org.eclipse.core.resources.prefs @@ -2,7 +2,7 @@ eclipse.preferences.version=1 encoding//.settings/org.eclipse.core.resources.prefs=UTF-8 encoding//.settings/org.eclipse.jdt.core.prefs=UTF-8 encoding//.settings/org.eclipse.jdt.ui.prefs=UTF-8 -encoding//src/org/gecko/emf/util/documentation/generators/plantuml/component/EcoreToPlantumlComponent.java=UTF-8 +encoding//src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java=UTF-8 encoding//src/test/component/Example.java=UTF-8 encoding//test/test/component/ExampleTest.java=UTF-8 encoding/bnd.bnd=UTF-8 diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.jdt.core.prefs b/org.gecko.emf.util.documentation.generators.markdown.component/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.jdt.core.prefs rename to org.gecko.emf.util.documentation.generators.markdown.component/.settings/org.eclipse.jdt.core.prefs diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.jdt.ui.prefs b/org.gecko.emf.util.documentation.generators.markdown.component/.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.jdt.ui.prefs rename to org.gecko.emf.util.documentation.generators.markdown.component/.settings/org.eclipse.jdt.ui.prefs diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/bnd.bnd b/org.gecko.emf.util.documentation.generators.markdown.component/bnd.bnd similarity index 53% rename from org.gecko.emf.util.documentation.generators.mermaid.component/bnd.bnd rename to org.gecko.emf.util.documentation.generators.markdown.component/bnd.bnd index 8c30a6df..cafca32b 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid.component/bnd.bnd +++ b/org.gecko.emf.util.documentation.generators.markdown.component/bnd.bnd @@ -7,6 +7,6 @@ Bundle-Version: 1.0.0.SNAPSHOT -buildpath: \ org.gecko.emf.util.documentation.generators.apis;version=latest,\ - org.gecko.emf.util.documentation.generators.mermaid;version=latest + org.gecko.emf.util.documentation.generators.markdown;version=latest -Private-Package: org.gecko.emf.util.documentation.generators.mermaid.component \ No newline at end of file +Private-Package: org.gecko.emf.util.documentation.generators.markdown.component \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/src/org/gecko/emf/util/documentation/generators/mermaid/component/EcoreToMermaidComponent.java b/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java similarity index 71% rename from org.gecko.emf.util.documentation.generators.mermaid.component/src/org/gecko/emf/util/documentation/generators/mermaid/component/EcoreToMermaidComponent.java rename to org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java index 81c44b43..227633f3 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid.component/src/org/gecko/emf/util/documentation/generators/mermaid/component/EcoreToMermaidComponent.java +++ b/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java @@ -9,7 +9,7 @@ * Contributors: * Data In Motion - initial API and implementation */ -package org.gecko.emf.util.documentation.generators.mermaid.component; +package org.gecko.emf.util.documentation.generators.markdown.component; import java.io.IOException; import java.nio.file.Path; @@ -21,31 +21,28 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationConstants; import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService; -import org.gecko.emf.util.documentation.generators.mermaid.MarkdownCodeGen; +import org.gecko.emf.util.documentation.generators.markdown.MarkdownCodeGen; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; -@Component(name="EcoreToMermaidComponent", service=EcoreToDocumentationService.class) -public class EcoreToMermaidComponent extends EcoreToDocumentationService{ +@Component(name="EcoreToMarkdownComponent", service=EcoreToDocumentationService.class) +public class EcoreToMarkdownComponent implements EcoreToDocumentationService{ @Reference ResourceSet resourceSet; private static final String MD_FILE_EXTENSION = ".md"; - private static final String MD_FOLDER_NAME = "md"; - private static final Logger LOGGER = Logger.getLogger(EcoreToMermaidComponent.class.getName()); - - public void ecoreToMermaid(String ecoreFilePath) { - super.ecoreToDocumentation(ecoreFilePath); - } + private String MD_FOLDER_NAME = "md"; + private static final Logger LOGGER = Logger.getLogger(EcoreToMarkdownComponent.class.getName()); /* * (non-Javadoc) * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#doGenerateDocumentation(java.nio.file.Path) */ @Override - protected void doGenerateDocumentation(Path ecoreFilePath) { + public void doGenerateDocumentation(Path ecoreFilePath, EcoreToDocumentationConstants mode) { if(!canHandleFileFormat(ecoreFilePath.getFileName().toString())) { LOGGER.log(Level.WARNING, "Cannot handle file format for " + ecoreFilePath); return; @@ -53,8 +50,8 @@ protected void doGenerateDocumentation(Path ecoreFilePath) { LOGGER.fine("Processing file " + ecoreFilePath); EPackage ePackage = extractEPackageFromEcore(ecoreFilePath); MarkdownCodeGen markdownCodeGen = new MarkdownCodeGen(); - CharSequence cs = markdownCodeGen.generateMarkdownDoc(ePackage); - generateOutputFile(ecoreFilePath, cs); + CharSequence cs = markdownCodeGen.generateMarkdownDoc(ePackage, mode); + generateOutputFile(ecoreFilePath, cs, mode); } private EPackage extractEPackageFromEcore(Path ecoreFilePath) { @@ -86,7 +83,7 @@ private EPackage extractEPackageFromEcore(Path ecoreFilePath) { * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#getOutputFileExtension() */ @Override - protected String getOutputFileExtension() { + public String getOutputFileExtension() { return MD_FILE_EXTENSION; } @@ -95,8 +92,15 @@ protected String getOutputFileExtension() { * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#getOutputFolder() */ @Override - protected String getOutputFolder() { - return MD_FOLDER_NAME; + public String getOutputFolder(EcoreToDocumentationConstants mode) { + switch(mode) { + case CLASS_DIAGRAM_GEN_MERMAID_OPTION: + return MD_FOLDER_NAME + "_mermaid"; + case CLASS_DIAGRAM_GEN_PLANTUML_OPTION: + return MD_FOLDER_NAME + "_plantuml"; + default: + return MD_FOLDER_NAME; + } } diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/test/.keep b/org.gecko.emf.util.documentation.generators.markdown.component/test/.keep similarity index 100% rename from org.gecko.emf.util.documentation.generators.mermaid.component/test/.keep rename to org.gecko.emf.util.documentation.generators.markdown.component/test/.keep diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/.classpath b/org.gecko.emf.util.documentation.generators.markdown/.classpath similarity index 66% rename from org.gecko.emf.util.documentation.generators.plantuml.component/.classpath rename to org.gecko.emf.util.documentation.generators.markdown/.classpath index 1e6e6a74..e37cc369 100644 --- a/org.gecko.emf.util.documentation.generators.plantuml.component/.classpath +++ b/org.gecko.emf.util.documentation.generators.markdown/.classpath @@ -5,12 +5,8 @@ + + - - - - - - diff --git a/org.gecko.emf.util.documentation.generators.markdown/.gitignore b/org.gecko.emf.util.documentation.generators.markdown/.gitignore new file mode 100644 index 00000000..ae3c1726 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.markdown/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/.project b/org.gecko.emf.util.documentation.generators.markdown/.project similarity index 66% rename from org.gecko.emf.util.documentation.generators.mermaid.component/.project rename to org.gecko.emf.util.documentation.generators.markdown/.project index 7d220a4f..b3e04704 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid.component/.project +++ b/org.gecko.emf.util.documentation.generators.markdown/.project @@ -1,10 +1,15 @@ - org.gecko.emf.util.documentation.generators.mermaid.component + org.gecko.emf.util.documentation.generators.markdown + + org.eclipse.xtext.ui.shared.xtextBuilder + + + org.eclipse.jdt.core.javabuilder @@ -18,6 +23,7 @@ org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature bndtools.core.bndnature diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.core.prefs b/org.gecko.emf.util.documentation.generators.markdown/.settings/org.eclipse.jdt.core.prefs similarity index 76% rename from org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.core.prefs rename to org.gecko.emf.util.documentation.generators.markdown/.settings/org.eclipse.jdt.core.prefs index 049e42fd..f2525a8b 100644 --- a/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.core.prefs +++ b/org.gecko.emf.util.documentation.generators.markdown/.settings/org.eclipse.jdt.core.prefs @@ -7,5 +7,8 @@ org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.source=11 diff --git a/org.gecko.emf.util.documentation.generators.markdown/bnd.bnd b/org.gecko.emf.util.documentation.generators.markdown/bnd.bnd new file mode 100644 index 00000000..939e114c --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.markdown/bnd.bnd @@ -0,0 +1,17 @@ +Bundle-Name: Xtend Generator for Markdown +Bundle-Description: Xtend Generator for Markdown +Bundle-Version: 1.0.0-SNAPSHOT + +src.xtend-gen=xtend-gen + +-buildpath: \ + org.eclipse.xtext.builder,\ + org.eclipse.xtext.xbase.lib,\ + org.gecko.emf.util.documentation.generators.mermaid;version=latest,\ + org.gecko.emf.util.documentation.generators.plantuml;version=latest,\ + org.gecko.emf.util.documentation.generators.apis;version=latest + +-library: \ + enable-emf + +Export-Package: org.gecko.emf.util.documentation.generators.markdown \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MarkdownCodeGen.xtend b/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend similarity index 68% rename from org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MarkdownCodeGen.xtend rename to org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend index 86cb0eef..079db522 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MarkdownCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend @@ -1,4 +1,4 @@ -package org.gecko.emf.util.documentation.generators.mermaid; +package org.gecko.emf.util.documentation.generators.markdown; import java.util.List import org.eclipse.emf.common.util.EList @@ -11,21 +11,41 @@ import org.eclipse.emf.ecore.EEnumLiteral import org.eclipse.emf.ecore.EModelElement import org.eclipse.emf.ecore.EPackage import org.eclipse.emf.ecore.EStructuralFeature +import org.gecko.emf.util.documentation.generators.apis.EcoreToClassDiagramCodeGenerator +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationConstants +import org.gecko.emf.util.documentation.generators.mermaid.MermaidCodeGen +import org.gecko.emf.util.documentation.generators.plantuml.PlantumlCodeGen class MarkdownCodeGen { - MermaidCodeGen mermaidCodeGen = new MermaidCodeGen(); + EcoreToClassDiagramCodeGenerator classDiagramCodeGen; + String diagramStartSyntax; + String diagramEndSyntax = "```"; - def generateMarkdownDoc(EPackage epackage) - ''' + def generateMarkdownDoc(EPackage epackage, EcoreToDocumentationConstants mode) { + if(EcoreToDocumentationConstants.CLASS_DIAGRAM_GEN_MERMAID_OPTION.equals(mode)) { + classDiagramCodeGen = new MermaidCodeGen(); + diagramStartSyntax = "```mermaid"; + } + else if(EcoreToDocumentationConstants.CLASS_DIAGRAM_GEN_PLANTUML_OPTION.equals(mode)) { + classDiagramCodeGen = new PlantumlCodeGen(); + diagramStartSyntax = "```plantuml"; + } + ''' # «epackage.name» «"\n"» +«IF classDiagramCodeGen !== null» ## Class Diagram «"\n"» -«mermaidCodeGen.toMermaidClassDiagram(epackage)» +«diagramStartSyntax» +«classDiagramCodeGen.generateClassDiagram(epackage)» +«diagramEndSyntax» «"\n"» +«ENDIF» «toEClassifierOverview(epackage.EClassifiers)» ''' + } + def toEClassifierOverview(EList eclassifiers) { var List classes = eclassifiers.filter[ec | ec instanceof EClass].map[ec | ec as EClass].toList; @@ -84,12 +104,14 @@ None. «"\n"» «toModelElementDescription(eclass)» «"\n"» +«IF classDiagramCodeGen !== null» #### Class Diagram «"\n"» -«mermaidCodeGen.startMermaidClassDiagram» -«mermaidCodeGen.toClassDiagram(eclass)» -«mermaidCodeGen.endMermaidClassDiagram» +«diagramStartSyntax» +«classDiagramCodeGen.generateClassDiagram(eclass)» +«diagramEndSyntax» «"\n"» +«ENDIF» #### Fields «"\n"» «toClassStructuralFeaturesDescription(eclass.EAttributes)» diff --git a/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin new file mode 100644 index 0000000000000000000000000000000000000000..39ab75b914ccd79c50fde54a36b96bd332111fad GIT binary patch literal 6736 zcmaKRRag|B0sL&wl1!_c9mq(g~-bT`rs(h`ESz|f(<(8KvW zH^1+kf2@76_rBQges9)#*0Ww64Gc_jG+bORH%auW&*43u=B8q->B@@^WEM>RSaYq(4u1OiQaVlcFp78A|Y<-Al zZqjJz`6hy_=4mpiFmRr~XK@*o5_?Cm;w$jdjRa^&{L`>~liag(cm+l`PO@8qfM7hV z%AhjMFLJyfeV(0bh>)PSjd^*o)hY$i3uH^n9ZxYeIC`=rSwPPi`{${0)5EWaLqq7V zRn8ALR$0-6xOaXWAH#*Iz7uGx3;L zw+C0L{mKGVn{H(7X}Or~jZ6C#rY^8x{XWG)1^37Wsu|x8m&c{Mxr~!e!8Rn(Wc2U8 zA|y8h{Q7xMWu)=cs4?;AUdrFTuV#O}pzaq~>1upb?(az@!VYE|p+={HkF}==xlw4F z5+Jc$w8?fgdjf?$CPB*-yKEqE-5#)SjbxGXzUj(GL-l)eXk!&~Rc5XU5Yo$^S58Wz zo}pLO8jGD@8m;z{V5~xPCCAWzWrg}Zyh;}{L25z1zdSy4o*3KK6_L|W#E^p{y=cD| zfo4UG+uWmrUMK5!*tRrRsxE>)a%^fiWv9QJ!Q|#3?Yax~Q0*Q%>1DN=NI%X!95}Z$ zwt!EGV@M$;1+E+}LzlLW_bA<%V^4oK-_* zdTwn81n&m<{Ol$nt!24c@ITr3?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1cXp`#5 zU>e}&YE2~+fECdJq)}Fi1&PPl*d?=44Sa>lr%+5N{;4R)8j4;c!YLcBy^%1h#OAkW zHr~uG(zt$qcu}+Dv-W6{n>e9Wc{p`xVn}W8I#iqY=U355(zZ+Kfu9+R zuR3)$61|uCy_TDnHW@S@4kjPuWJ4rT*Dlfonzj55l~i08;oQsmN1-MSZ4E|Zagd#? zA!oS{3AI@aDv&`d+4)*}z&>6}u8I5%;n*e7I)R_6uD_#R zEkUbTnd3@T0Gy%F^(Ku+56+tAqzC6rqtS!2q?zi$InpHc;B0AudT@6GzsCxLEq?F3 zI`R1ViNuJdrfwXpxZ4OD0*R?X|MTVVh^ft4mLb2IoME|y?p5g3Z-w&Jt@H#{x55J+ zh43iy`5$^K6qO{WJj6;&F0r!+g3oVRCZDp9YtG5K(C(=!+;MjXV*F(V( zZjk0kS&G!fu~cUDpc!ShW3PLT4E#zT$Zp_cF5s!_e|XxC)%bNY+B<@9BgFwO5P0qy ztSAOwn==YJ$4TBNS~4#XPe)2e-7pk8$S+e^aqf5CcinW4QfRgqS8zb^e5mSs`J7^v z&C^pr{TJ1u?3L)?j(!lR?(>@gGU>Qj*ro}Sl#fRzHd7Jk9|>g)^R zTyBQ2Ov6Ik>z^$pZ7=i*ul24CL0NoyPUKZO&GgoX*g~_5jHbb_I#`R%d2H^&+o4g* zE4<8f;+)2*0-V9S+jY_29e`eStE(m4tpo$&_Xxjv!pNT}5ps5JTU<45N zH-zpAL2=Glqp8sR!Pkr%IMiJv*DTSQ02QHoTn|9M)CL716@ZQ!gym`zz~DjC&(R|m z%@-OZc!ajr<3VwzLD(Mp27I0FZ~p-JZ eclassifiers) { + CharSequence _xblockexpression = null; + { + final Function1 _function = (EClassifier ec) -> { + return Boolean.valueOf((ec instanceof EClass)); + }; + final Function1 _function_1 = (EClassifier ec) -> { + return ((EClass) ec); + }; + List classes = IterableExtensions.toList(IterableExtensions.map(IterableExtensions.filter(eclassifiers, _function), _function_1)); + final Function1 _function_2 = (EClassifier ec) -> { + return Boolean.valueOf((ec instanceof EEnum)); + }; + final Function1 _function_3 = (EClassifier ec) -> { + return ((EEnum) ec); + }; + List enums = IterableExtensions.toList(IterableExtensions.map(IterableExtensions.filter(eclassifiers, _function_2), _function_3)); + StringConcatenation _builder = new StringConcatenation(); + _builder.append("## Classes Overview"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + { + for(final EClass eclass : classes) { + CharSequence _classOverview = this.toClassOverview(eclass); + _builder.append(_classOverview); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("## Enumerators Overview"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + { + for(final EEnum enumerator : enums) { + CharSequence _enumOverview = this.toEnumOverview(enumerator); + _builder.append(_enumOverview); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } + _xblockexpression = _builder; + } + return _xblockexpression; + } + + public CharSequence toEnumOverview(final EEnum enumerator) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append("### "); + String _name = enumerator.getName(); + _builder.append(_name); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("#### Description"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + String _modelElementDescription = this.toModelElementDescription(enumerator); + _builder.append(_modelElementDescription); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("#### Literals"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + CharSequence _literalOverview = this.toLiteralOverview(enumerator.getELiterals()); + _builder.append(_literalOverview); + _builder.newLineIfNotEmpty(); + return _builder; + } + + public CharSequence toLiteralOverview(final EList literals) { + StringConcatenation _builder = new StringConcatenation(); + { + boolean _isEmpty = literals.isEmpty(); + if (_isEmpty) { + _builder.append("None."); + _builder.newLine(); + } else { + _builder.append("| Literal| Description|"); + _builder.newLine(); + _builder.append("| -----| -----------|"); + _builder.newLine(); + { + for(final EEnumLiteral literal : literals) { + _builder.append("|"); + String _name = literal.getName(); + _builder.append(_name); + _builder.append("|"); + String _modelElementDescription = this.toModelElementDescription(literal); + _builder.append(_modelElementDescription); + _builder.append("|"); + _builder.newLineIfNotEmpty(); + } + } + } + } + return _builder; + } + + public CharSequence toClassOverview(final EClass eclass) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append("### "); + String _name = eclass.getName(); + _builder.append(_name); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("#### Description"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + String _modelElementDescription = this.toModelElementDescription(eclass); + _builder.append(_modelElementDescription); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + { + if ((this.classDiagramCodeGen != null)) { + _builder.append("#### Class Diagram"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append(this.diagramStartSyntax); + _builder.newLineIfNotEmpty(); + CharSequence _generateClassDiagram = this.classDiagramCodeGen.generateClassDiagram(eclass); + _builder.append(_generateClassDiagram); + _builder.newLineIfNotEmpty(); + _builder.append(this.diagramEndSyntax); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } + _builder.append("#### Fields"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + CharSequence _classStructuralFeaturesDescription = this.toClassStructuralFeaturesDescription(eclass.getEAttributes()); + _builder.append(_classStructuralFeaturesDescription); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("#### References"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + CharSequence _classStructuralFeaturesDescription_1 = this.toClassStructuralFeaturesDescription(eclass.getEReferences()); + _builder.append(_classStructuralFeaturesDescription_1); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + return _builder; + } + + public CharSequence toClassStructuralFeaturesDescription(final EList features) { + StringConcatenation _builder = new StringConcatenation(); + { + boolean _isEmpty = features.isEmpty(); + if (_isEmpty) { + _builder.append("None."); + _builder.newLine(); + } else { + _builder.append("| Name| Type| Bounds| Description|"); + _builder.newLine(); + _builder.append("| -----| ----| ------| -----------|"); + _builder.newLine(); + { + for(final T feature : features) { + _builder.append("|"); + String _name = feature.getName(); + _builder.append(_name); + _builder.append("|"); + String _name_1 = feature.getEType().getName(); + _builder.append(_name_1); + _builder.append("|"); + int _lowerBound = feature.getLowerBound(); + _builder.append(_lowerBound); + _builder.append(".."); + int _upperBound = feature.getUpperBound(); + _builder.append(_upperBound); + _builder.append("|"); + String _modelElementDescription = this.toModelElementDescription(feature); + _builder.append(_modelElementDescription); + _builder.append("|"); + _builder.newLineIfNotEmpty(); + } + } + } + } + return _builder; + } + + public String toModelElementDescription(final EModelElement element) { + EList _eAnnotations = element.getEAnnotations(); + for (final EAnnotation annotation : _eAnnotations) { + { + EMap details = annotation.getDetails(); + boolean _containsKey = details.containsKey("documentation"); + if (_containsKey) { + return details.get("documentation").trim(); + } + } + } + return "None."; + } +} diff --git a/org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.core.resources.prefs b/org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 299148a3..00000000 --- a/org.gecko.emf.util.documentation.generators.mermaid.component/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,8 +0,0 @@ -eclipse.preferences.version=1 -encoding//.settings/org.eclipse.core.resources.prefs=UTF-8 -encoding//.settings/org.eclipse.jdt.core.prefs=UTF-8 -encoding//.settings/org.eclipse.jdt.ui.prefs=UTF-8 -encoding//src/org/gecko/emf/util/documentation/generators/mermaid/component/EcoreToMermaidComponent.java=UTF-8 -encoding//src/test/component/Example.java=UTF-8 -encoding//test/test/component/ExampleTest.java=UTF-8 -encoding/bnd.bnd=UTF-8 diff --git a/org.gecko.emf.util.documentation.generators.mermaid/bnd.bnd b/org.gecko.emf.util.documentation.generators.mermaid/bnd.bnd index 05cc8e6b..f3e5686e 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid/bnd.bnd +++ b/org.gecko.emf.util.documentation.generators.mermaid/bnd.bnd @@ -6,7 +6,8 @@ src.xtend-gen=xtend-gen -buildpath: \ org.eclipse.xtext.builder,\ - org.eclipse.xtext.xbase.lib + org.eclipse.xtext.xbase.lib,\ + org.gecko.emf.util.documentation.generators.apis;version=latest -library: \ enable-emf diff --git a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidCodeGen.xtend b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidCodeGen.xtend index b82c45b3..cb6815ec 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidCodeGen.xtend @@ -7,28 +7,21 @@ import org.eclipse.emf.ecore.EClassifier import org.eclipse.emf.ecore.EEnum import org.eclipse.emf.ecore.EPackage import org.eclipse.emf.ecore.EReference +import org.gecko.emf.util.documentation.generators.apis.EcoreToClassDiagramCodeGenerator -class MermaidCodeGen { +class MermaidCodeGen implements EcoreToClassDiagramCodeGenerator{ def toMermaidClassDiagram(EPackage epackage) ''' «startMermaidClassDiagram()» «toEClassifierDiagram(epackage.EClassifiers)» -«endMermaidClassDiagram()» ''' def startMermaidClassDiagram() ''' -```mermaid classDiagram ''' - def endMermaidClassDiagram() - ''' -``` - ''' - - def toEClassifierDiagram(EList eclassifiers) { var List classes = eclassifiers.filter[ec | ec instanceof EClass].map[ec | ec as EClass].toList; var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | ec as EEnum].toList; @@ -50,13 +43,18 @@ var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | e def toClassDiagram(EClass eclass) ''' «" "»class «eclass.name» { -«toClassMembers(eclass as EClass)» +«IF eclass.isInterface» +«" <>"» +«ELSEIF eclass.isAbstract» +«" <>"» +«ENDIF» +«toClassMembers(eclass)» } «"\n"» -«toClassReferences(eclass as EClass)» +«toClassReferences(eclass)» «"\n"» -«IF !(eclass as EClass).ESuperTypes.isEmpty» -«toSuperTypes(eclass as EClass)» +«IF !eclass.ESuperTypes.isEmpty» +«toSuperTypes(eclass)» «"\n"» «ENDIF» ''' @@ -81,7 +79,7 @@ var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | e var isInRefModel = isInRefModel(ref, eclass) ''' «IF isInRefModel» -«" "»«eclass.name» «' .. '» «'\"'»«multiplicity»«'\"'» «refType»«' : '»«ref.name» +«" "»«eclass.name» «' ..> '» «'\"'»«multiplicity»«'\"'» «refType»«' : '»«ref.name» «ELSE» «" "»«eclass.name» «' --> '» «'\"'»«multiplicity»«'\"'» «refType»«' : '»«ref.name» «ENDIF» @@ -134,5 +132,15 @@ var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | e «ENDFOR» } ''' - + + override generateClassDiagram(EPackage ePackage) { + toMermaidClassDiagram(ePackage); + } + + override generateClassDiagram(EClass eClass) { + ''' +«startMermaidClassDiagram()» +«toClassDiagram(eClass)» + ''' + } } \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/.gitignore b/org.gecko.emf.util.documentation.generators.plantuml.component/.gitignore deleted file mode 100644 index 7fdbdef7..00000000 --- a/org.gecko.emf.util.documentation.generators.plantuml.component/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/bin/ -/bin_test/ diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.ui.prefs b/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 25b8c0de..00000000 --- a/org.gecko.emf.util.documentation.generators.plantuml.component/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,10 +0,0 @@ -content_assist_proposals_background=255,255,255 -content_assist_proposals_foreground=0,0,0 -eclipse.preferences.version=1 -org.eclipse.jdt.ui.formatterprofiles.version=13 -org.eclipse.jdt.ui.javadoc=true -org.eclipse.jdt.ui.text.code_templates_migrated=true -org.eclipse.jdt.ui.text.custom_code_templates= -spelling_locale_initialized=true -useAnnotationsPrefPage=true -useQuickDiffPrefPage=true diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/bnd.bnd b/org.gecko.emf.util.documentation.generators.plantuml.component/bnd.bnd deleted file mode 100644 index 1d64ca8b..00000000 --- a/org.gecko.emf.util.documentation.generators.plantuml.component/bnd.bnd +++ /dev/null @@ -1,12 +0,0 @@ -javac.source: 11 -javac.target: 11 - --library: enable-emf - -Bundle-Version: 1.0.0.SNAPSHOT -Private-Package: org.gecko.emf.util.documentation.generators.plantuml.component - - --buildpath: \ - org.gecko.emf.util.documentation.generators.apis;version=latest,\ - org.gecko.emf.util.documentation.generators.plantuml;version=latest \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/src/org/gecko/emf/util/documentation/generators/plantuml/component/EcoreToPlantumlComponent.java b/org.gecko.emf.util.documentation.generators.plantuml.component/src/org/gecko/emf/util/documentation/generators/plantuml/component/EcoreToPlantumlComponent.java deleted file mode 100644 index 5fc627aa..00000000 --- a/org.gecko.emf.util.documentation.generators.plantuml.component/src/org/gecko/emf/util/documentation/generators/plantuml/component/EcoreToPlantumlComponent.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright (c) 2012 - 2018 Data In Motion and others. - * All rights reserved. - * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v1.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Data In Motion - initial API and implementation - */ -package org.gecko.emf.util.documentation.generators.plantuml.component; - -import java.io.IOException; -import java.nio.file.Path; -import java.util.logging.Level; -import java.util.logging.Logger; - -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService; -import org.gecko.emf.util.documentation.generators.plantuml.PlantumlCodeGen; -import org.osgi.service.component.annotations.Component; -import org.osgi.service.component.annotations.Reference; - - - -@Component(name = "EcoreToPlantumlComponent", service=EcoreToDocumentationService.class) -public class EcoreToPlantumlComponent extends EcoreToDocumentationService{ - - @Reference - ResourceSet resourceSet; - - private static final String PUML_FILE_EXTENSION = ".puml"; - private static final String PUML_FOLDER_NAME = "puml"; - private static final Logger LOGGER = Logger.getLogger(EcoreToPlantumlComponent.class.getName()); - - public void ecoreToPlantuml(String ecoreFilePath) { - super.ecoreToDocumentation(ecoreFilePath); - } - /* - * (non-Javadoc) - * @see org.gecko.emf.util.documentation.generators.apis.api.EcoreToDocumentationService#doGenerateDocumentation(java.nio.file.Path) - */ - @Override - protected void doGenerateDocumentation(Path ecoreFilePath) { - if(!canHandleFileFormat(ecoreFilePath.getFileName().toString())) { - LOGGER.log(Level.WARNING, "Cannot handle file format for " + ecoreFilePath); - return; - } - LOGGER.fine("Processing file " + ecoreFilePath); - EPackage ePackage = extractEPackageFromEcore(ecoreFilePath); - PlantumlCodeGen plantumlCodeGen = new PlantumlCodeGen(); - CharSequence cs = plantumlCodeGen.toPlantumlClassDiagram(ePackage); - generateOutputFile(ecoreFilePath, cs); - } - - private EPackage extractEPackageFromEcore(Path ecoreFilePath) { - Resource resource = resourceSet.createResource(URI.createFileURI(ecoreFilePath.toString())); - try { - resource.load(null); - if(resource.getContents().isEmpty()) { - LOGGER.log(Level.SEVERE, "Resource has no contents!"); - return null; - } - EObject eObj = resource.getContents().get(0); - if(eObj instanceof EPackage) { - return(EPackage) eObj; - } - else { - LOGGER.log(Level.SEVERE, "Content is not an EPackage!"); - return null; - } - } catch(IOException e) { - LOGGER.log(Level.SEVERE, "IOException in file " + ecoreFilePath + " " + e.getMessage()); - return null; - } - } - - /* - * (non-Javadoc) - * @see org.gecko.emf.util.documentation.generators.apis.api.EcoreToDocumentationService#getOutputFileExtension() - */ - @Override - protected String getOutputFileExtension() { - return PUML_FILE_EXTENSION; - } - - /* - * (non-Javadoc) - * @see org.gecko.emf.util.documentation.generators.apis.api.EcoreToDocumentationService#getOutputFolder() - */ - @Override - protected String getOutputFolder() { - return PUML_FOLDER_NAME; - } -} diff --git a/org.gecko.emf.util.documentation.generators.plantuml.component/test/.keep b/org.gecko.emf.util.documentation.generators.plantuml.component/test/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/org.gecko.emf.util.documentation.generators.plantuml/bnd.bnd b/org.gecko.emf.util.documentation.generators.plantuml/bnd.bnd index 3c17b4b3..ad7ce709 100644 --- a/org.gecko.emf.util.documentation.generators.plantuml/bnd.bnd +++ b/org.gecko.emf.util.documentation.generators.plantuml/bnd.bnd @@ -6,7 +6,8 @@ src.xtend-gen=xtend-gen -buildpath: \ org.eclipse.xtext.builder,\ - org.eclipse.xtext.xbase.lib + org.eclipse.xtext.xbase.lib,\ + org.gecko.emf.util.documentation.generators.apis;version=latest -library: \ enable-emf diff --git a/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlCodeGen.xtend b/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlCodeGen.xtend index b734d03a..2e4964bf 100644 --- a/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlCodeGen.xtend @@ -2,13 +2,17 @@ package org.gecko.emf.util.documentation.generators.plantuml; import java.util.List import org.eclipse.emf.common.util.EList +import org.eclipse.emf.common.util.EMap +import org.eclipse.emf.ecore.EAnnotation import org.eclipse.emf.ecore.EClass import org.eclipse.emf.ecore.EClassifier import org.eclipse.emf.ecore.EEnum +import org.eclipse.emf.ecore.EModelElement import org.eclipse.emf.ecore.EPackage import org.eclipse.emf.ecore.EReference +import org.gecko.emf.util.documentation.generators.apis.EcoreToClassDiagramCodeGenerator -class PlantumlCodeGen { +class PlantumlCodeGen implements EcoreToClassDiagramCodeGenerator{ def toPlantumlClassDiagram(EPackage epackage) ''' «startPlantumlClassDiagram()» @@ -46,14 +50,22 @@ var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | e def toClassDiagram(EClass eclass) ''' +«IF eclass.isInterface» +«" "»interface «eclass.name» { +«ELSEIF eclass.isAbstract» +«" "»abstract class «eclass.name» { +«ELSE» «" "»class «eclass.name» { -«toClassMembers(eclass as EClass)» +«ENDIF» +«toClassMembers(eclass)» } «"\n"» -«toClassReferences(eclass as EClass)» +«toOnTopDescription(eclass)» +«"\n"» +«toClassReferences(eclass)» «"\n"» -«IF !(eclass as EClass).ESuperTypes.isEmpty» -«toSuperTypes(eclass as EClass)» +«IF !eclass.ESuperTypes.isEmpty» +«toSuperTypes(eclass)» «"\n"» «ENDIF» ''' @@ -74,26 +86,25 @@ var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | e def toClassRef(EClass eclass, EReference ref) { var multiplicity = extractMultiplicity(ref.lowerBound, ref.upperBound) - var refType = extractRefType(ref, eclass) var isInRefModel = isInRefModel(ref, eclass) ''' «IF isInRefModel» -«" "»«eclass.name» «' .. '» «'\"'»«multiplicity»«'\"'» «refType»«' : '»«ref.name» +«createRefPackage(ref)» +«"\n"» +«" "»«eclass.name» «' ..> '» «'\"'»«multiplicity»«'\"'» «ref.EType.name»«' : '»«ref.name» «ELSE» -«" "»«eclass.name» «' --> '» «'\"'»«multiplicity»«'\"'» «refType»«' : '»«ref.name» +«" "»«eclass.name» «' --> '» «'\"'»«multiplicity»«'\"'» «ref.EType.name»«' : '»«ref.name» «ENDIF» +«"\n"» ''' } - def String extractRefType(EReference ref, EClass containerClass) { - if(ref.EType.EPackage.name === containerClass.EPackage.name) { - return ref.EType.name - } else { -// TODO this should be the correct form when linking to a reference model (https://github.com/mermaid-js/mermaid/issues/1052) -// return ref.EType.EPackage.nsURI + "#//" + ref.EType.name; - return ref.EType.name - } - } + def createRefPackage(EReference ref) + ''' +«" "»package "«ref.EType.EPackage.nsURI»" #DDDDDD { +«" "»«ref.EType.name» : «ref.name» +} + ''' def boolean isInRefModel(EReference ref, EClass containerClass) { if(ref.EType.EPackage.name === containerClass.EPackage.name) { @@ -129,5 +140,57 @@ var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | e «" "»«value.name» «ENDFOR» } +«"\n"» +«toOnTopDescription(enumerator)» +«"\n"» ''' + + def toOnTopDescription(EClassifier eclassifier) { + var description = toModelElementDescription(eclassifier) + if(description !== "None.") { + ''' +note top of «eclassifier.name» +«" "»«description» +end note + ''' + } + } + + def String toModelElementDescription(EModelElement element) { + for(EAnnotation annotation : element.EAnnotations) { + var EMap details = annotation.details; + if(details.containsKey("documentation")) { + var descr = details.get("documentation").replace("\n", "").trim; + if(descr.length > 30) { + var splitStr = descr.split(" "); + var counter = 0; + descr = ""; + for(sp : splitStr) { + counter += sp.length; + descr += " " + sp; + if(counter > 30) { + descr += " \n"; + counter = 0; + } + } + } + return descr.trim; + } + + } + return "None." + } + + override generateClassDiagram(EPackage ePackage) { + toPlantumlClassDiagram(ePackage) + } + + override generateClassDiagram(EClass eClass) { + ''' +«startPlantumlClassDiagram()» +«toClassDiagram(eClass)» +«endPlantumlClassDiagram()» + ''' + } + } \ No newline at end of file From a368b7ab9c126c2026e20a4833197d97f1dbc405 Mon Sep 17 00:00:00 2001 From: Ilenia Salvadori Date: Tue, 1 Nov 2022 10:26:17 +0100 Subject: [PATCH 09/21] html and md model doc generator with mermaid/plantuml class diagrams Signed-off-by: Ilenia Salvadori --- .../org.eclipse.core.resources.prefs | 1 + .../bnd.bnd | 2 +- .../EcoreToClassDiagramCodeGenerator.java | 3 + .../EcoreToDocumentationCodeGenerator.java | 28 ++ ....java => EcoreToDocumentationOptions.java} | 10 +- .../apis/EcoreToDocumentationService.java | 68 ++- .../apis/EcoreToDocumentationServiceOld.java | 75 ++++ .../.gitignore | 4 - .../launch.bndrun | 49 --- .../commands/EcoreToDocumentationCommand.java | 43 -- .../.classpath | 0 .../.gitignore | 2 + .../.project | 2 +- .../org.eclipse.core.resources.prefs | 3 +- .../.settings/org.eclipse.jdt.core.prefs | 0 .../.settings/org.eclipse.jdt.ui.prefs | 0 .../bnd.bnd | 5 +- .../html/component/EcoreToHtmlComponent.java | 103 +++++ .../test/.keep | 0 .../.classpath | 12 + .../.gitignore | 1 + .../.project | 29 ++ .../.settings/org.eclipse.jdt.core.prefs | 14 + .../bnd.bnd | 16 + .../generators/html/HtmlCodeGen.xtend | 203 +++++++++ .../generators/html/.HtmlCodeGen.xtendbin | Bin 0 -> 8426 bytes .../documentation/generators/html/.gitignore | 1 + .../generators/html/HtmlCodeGen.java | 389 +++++++++++++++++ .../org.eclipse.core.resources.prefs | 1 - .../component/EcoreToMarkdownComponent.java | 131 +++--- .../bnd.bnd | 1 - .../generators/markdown/MarkdownCodeGen.xtend | 45 +- .../markdown/.MarkdownCodeGen.xtendbin | Bin 6736 -> 7340 bytes .../generators/markdown/.gitignore | 2 + .../generators/markdown/MarkdownCodeGen.java | 80 +++- .../bnd.bnd | 1 - ...xtend => MermaidClassDiagramCodeGen.xtend} | 2 +- .../.MermaidClassDiagramCodeGen.xtendbin | Bin 0 -> 6621 bytes .../generators/mermaid/.gitignore | 1 + .../mermaid/MermaidClassDiagramCodeGen.java | 299 +++++++++++++ .../bnd.bnd | 1 - ...tend => PlantumlClassDiagramCodeGen.xtend} | 6 +- .../.PlantumlClassDiagramCodeGen.xtendbin | Bin 0 -> 7722 bytes .../generators/plantuml/.gitignore | 1 + .../plantuml/PlantumlClassDiagramCodeGen.java | 403 ++++++++++++++++++ 45 files changed, 1782 insertions(+), 255 deletions(-) create mode 100644 org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java rename org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/{EcoreToDocumentationConstants.java => EcoreToDocumentationOptions.java} (67%) create mode 100644 org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationServiceOld.java delete mode 100644 org.gecko.emf.util.documentation.generators.commands/.gitignore delete mode 100644 org.gecko.emf.util.documentation.generators.commands/launch.bndrun delete mode 100644 org.gecko.emf.util.documentation.generators.commands/src/org/gecko/emf/util/documentation/generators/commands/EcoreToDocumentationCommand.java rename {org.gecko.emf.util.documentation.generators.commands => org.gecko.emf.util.documentation.generators.html.component}/.classpath (100%) create mode 100644 org.gecko.emf.util.documentation.generators.html.component/.gitignore rename {org.gecko.emf.util.documentation.generators.commands => org.gecko.emf.util.documentation.generators.html.component}/.project (87%) rename {org.gecko.emf.util.documentation.generators.commands => org.gecko.emf.util.documentation.generators.html.component}/.settings/org.eclipse.core.resources.prefs (70%) rename {org.gecko.emf.util.documentation.generators.commands => org.gecko.emf.util.documentation.generators.html.component}/.settings/org.eclipse.jdt.core.prefs (100%) rename {org.gecko.emf.util.documentation.generators.commands => org.gecko.emf.util.documentation.generators.html.component}/.settings/org.eclipse.jdt.ui.prefs (100%) rename {org.gecko.emf.util.documentation.generators.commands => org.gecko.emf.util.documentation.generators.html.component}/bnd.bnd (54%) create mode 100644 org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java rename {org.gecko.emf.util.documentation.generators.commands => org.gecko.emf.util.documentation.generators.html.component}/test/.keep (100%) create mode 100644 org.gecko.emf.util.documentation.generators.html/.classpath create mode 100644 org.gecko.emf.util.documentation.generators.html/.gitignore create mode 100644 org.gecko.emf.util.documentation.generators.html/.project create mode 100644 org.gecko.emf.util.documentation.generators.html/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.gecko.emf.util.documentation.generators.html/bnd.bnd create mode 100644 org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend create mode 100644 org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.HtmlCodeGen.xtendbin create mode 100644 org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.gitignore create mode 100644 org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java rename org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/{MermaidCodeGen.xtend => MermaidClassDiagramCodeGen.xtend} (97%) create mode 100644 org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.MermaidClassDiagramCodeGen.xtendbin create mode 100644 org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java rename org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/{PlantumlCodeGen.xtend => PlantumlClassDiagramCodeGen.xtend} (97%) create mode 100644 org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.PlantumlClassDiagramCodeGen.xtendbin create mode 100644 org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.java diff --git a/org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.core.resources.prefs b/org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.core.resources.prefs index 416633d8..cccce420 100644 --- a/org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.core.resources.prefs +++ b/org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.core.resources.prefs @@ -3,6 +3,7 @@ encoding//.settings/org.eclipse.core.resources.prefs=UTF-8 encoding//.settings/org.eclipse.jdt.core.prefs=UTF-8 encoding//.settings/org.eclipse.jdt.ui.prefs=UTF-8 encoding//src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java=UTF-8 +encoding//src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationServiceOld.java=UTF-8 encoding//src/org/gecko/emf/util/documentation/generators/apis/package-info.java=UTF-8 encoding//src/test/component/Example.java=UTF-8 encoding//test/test/component/ExampleTest.java=UTF-8 diff --git a/org.gecko.emf.util.documentation.generators.apis/bnd.bnd b/org.gecko.emf.util.documentation.generators.apis/bnd.bnd index 0f4159ff..612b3c3a 100644 --- a/org.gecko.emf.util.documentation.generators.apis/bnd.bnd +++ b/org.gecko.emf.util.documentation.generators.apis/bnd.bnd @@ -4,4 +4,4 @@ javac.target: 11 -library: enable-emf Bundle-Version: 1.0.0.SNAPSHOT -Export-Package: org.gecko.emf.util.documentation.generators.apis \ No newline at end of file +Export-Package: org.gecko.emf.util.documentation.generators.apis diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java index 8a580502..6af32f8f 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java @@ -24,4 +24,7 @@ public interface EcoreToClassDiagramCodeGenerator { CharSequence generateClassDiagram(EPackage ePackage); CharSequence generateClassDiagram(EClass eClass); + +// TODO + } diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java new file mode 100644 index 00000000..b2f85bd0 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2012 - 2022 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ +package org.gecko.emf.util.documentation.generators.apis; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * @author ilenia + * @since Oct 19, 2022 + */ +public interface EcoreToDocumentationCodeGenerator { + + CharSequence generateDocumentation(EPackage ePackage, EcoreToDocumentationOptions docGenOption); + + CharSequence generateDocumentation(EClass eClass, EcoreToDocumentationOptions docGenOption); + +} diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationConstants.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java similarity index 67% rename from org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationConstants.java rename to org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java index 65ff3c48..5d8d2e35 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationConstants.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java @@ -16,9 +16,13 @@ * @author ilenia * @since Oct 18, 2022 */ -public enum EcoreToDocumentationConstants { +public enum EcoreToDocumentationOptions { - CLASS_DIAGRAM_GEN_MERMAID_OPTION , CLASS_DIAGRAM_GEN_PLANTUML_OPTION, ONLY_MARKDOWN_DOCS; - + MARKDOWN_WITH_MERMAID_CLASS_DIAGRAM, + MARKDOWN_WITH_PLANTUML_CLASS_DIAGRAM, + HTML_WITH_MERMAID_CLASS_DIAGRAM, + HTML_WITH_PLANTUML_CLASS_DIAGRAM, + ONLY_MARKDOWN_CLASS_OVERVIEW, + ONLY_HTML_CLASS_OVERVIEW; } diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java index 0398aed5..aa5078f9 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java @@ -11,63 +11,47 @@ */ package org.gecko.emf.util.documentation.generators.apis; +import java.io.File; +import java.io.FileWriter; import java.io.IOException; +import java.io.OutputStream; import java.io.PrintWriter; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.Objects; -import java.util.logging.Level; -import java.util.logging.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; import org.osgi.annotation.versioning.ProviderType; @ProviderType public interface EcoreToDocumentationService{ - public static final String ECORE_FILE_EXTENSION = ".ecore"; - public static final Logger LOGGER = Logger.getLogger(EcoreToDocumentationService.class.getName()); - + boolean canHandleMediaType(String mediaType); String getOutputFileExtension(); - String getOutputFolder(EcoreToDocumentationConstants mode); - void doGenerateDocumentation(Path ecoreFilePath, EcoreToDocumentationConstants mode); - - default boolean canHandleFileFormat(String fileName) { - Objects.requireNonNull(fileName, "File name cannot be null!"); - if(fileName.endsWith(ECORE_FILE_EXTENSION)) { - return true; - } - return false; - } + String getOutputFolder(EcoreToDocumentationOptions mode); + OutputStream doGenerateDocumentation(EPackage ePackage, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException; + OutputStream doGenerateDocumentation(EClass eClass, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException; + + default File generateOutputFile(EPackage ePackage, CharSequence generatedDoc, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException { + String outputFileName = ePackage.getName().concat(getOutputFileExtension()); + return doCreateOutputFile(outputFileName, generatedDoc, mode, outputFolderRoot); + } - default void ecoreToDocumentation(String ecoreFilePath, EcoreToDocumentationConstants mode) { - Path path = Paths.get(ecoreFilePath); - if(Files.isDirectory(path)) { - try { - Files.list(path).filter(p -> Files.isRegularFile(p)).forEach(p -> doGenerateDocumentation(p, mode)); - } catch (IOException e) { - LOGGER.log(Level.SEVERE, "IOException while getting files from folder " + ecoreFilePath + " " + e.getMessage()); - } - - } else if(Files.isRegularFile(path)) { - doGenerateDocumentation(path, mode); - } + default File generateOutputFile(EClass eClass, CharSequence generatedDoc, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException { + String outputFileName = eClass.getEPackage().getName().concat("_").concat(eClass.getName()).concat(getOutputFileExtension()); + return doCreateOutputFile(outputFileName, generatedDoc, mode, outputFolderRoot); } - default void generateOutputFile(Path ecoreFilePath, CharSequence generatedCharSeq, EcoreToDocumentationConstants mode) { - Path parentFolder = Paths.get(ecoreFilePath.toString()).getParent().getParent(); - String outputFileName = ecoreFilePath.getFileName().toString().replace(ECORE_FILE_EXTENSION, getOutputFileExtension()); - Path outputPath = Paths.get(parentFolder.toString(), getOutputFolder(mode), outputFileName); - try { - Files.deleteIfExists(outputPath); - Files.createDirectories(outputPath.getParent()); - Files.createFile(outputPath); - try(PrintWriter pw = new PrintWriter(outputPath.toFile())) { - pw.write(generatedCharSeq.toString()); - } - } catch (IOException e) { - e.printStackTrace(); - } + default File doCreateOutputFile(String outputFileName, CharSequence generatedDoc, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException { + Path outputPath = Paths.get(outputFolderRoot, getOutputFolder(mode), outputFileName); + Files.deleteIfExists(outputPath); + Files.createDirectories(outputPath.getParent()); + File outputFile = Files.createFile(outputPath).toFile(); + try(PrintWriter pw = new PrintWriter(new FileWriter(outputFile))) { + pw.write(generatedDoc.toString()); + } + return outputFile; } } diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationServiceOld.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationServiceOld.java new file mode 100644 index 00000000..2f70f331 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationServiceOld.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2012 - 2018 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ +package org.gecko.emf.util.documentation.generators.apis; + +import java.io.IOException; +import java.io.PrintWriter; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Objects; +import java.util.logging.Level; +import java.util.logging.Logger; + +import org.osgi.annotation.versioning.ProviderType; + +@ProviderType +public interface EcoreToDocumentationServiceOld{ + +// TODO as input we get already an EPackage or an EClass and it returns an OutputStream + + public static final String ECORE_FILE_EXTENSION = ".ecore"; + public static final Logger LOGGER = Logger.getLogger(EcoreToDocumentationServiceOld.class.getName()); + + String getOutputFileExtension(); + String getOutputFolder(EcoreToDocumentationOptions mode); + void doGenerateDocumentation(Path ecoreFilePath, EcoreToDocumentationOptions mode); + + default boolean canHandleFileFormat(String fileName) { + Objects.requireNonNull(fileName, "File name cannot be null!"); + if(fileName.endsWith(ECORE_FILE_EXTENSION)) { + return true; + } + return false; + } + + default void ecoreToDocumentation(String ecoreFilePath, EcoreToDocumentationOptions mode) { + Path path = Paths.get(ecoreFilePath); + if(Files.isDirectory(path)) { + try { + Files.list(path).filter(p -> Files.isRegularFile(p)).forEach(p -> doGenerateDocumentation(p, mode)); + } catch (IOException e) { + LOGGER.log(Level.SEVERE, "IOException while getting files from folder " + ecoreFilePath + " " + e.getMessage()); + } + + } else if(Files.isRegularFile(path)) { + doGenerateDocumentation(path, mode); + } + } + + default void generateOutputFile(Path ecoreFilePath, CharSequence generatedCharSeq, EcoreToDocumentationOptions mode) { + Path parentFolder = Paths.get(ecoreFilePath.toString()).getParent().getParent(); + String outputFileName = ecoreFilePath.getFileName().toString().replace(ECORE_FILE_EXTENSION, getOutputFileExtension()); + Path outputPath = Paths.get(parentFolder.toString(), getOutputFolder(mode), outputFileName); + try { + Files.deleteIfExists(outputPath); + Files.createDirectories(outputPath.getParent()); + Files.createFile(outputPath); + try(PrintWriter pw = new PrintWriter(outputPath.toFile())) { + pw.write(generatedCharSeq.toString()); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/org.gecko.emf.util.documentation.generators.commands/.gitignore b/org.gecko.emf.util.documentation.generators.commands/.gitignore deleted file mode 100644 index fda4e4b2..00000000 --- a/org.gecko.emf.util.documentation.generators.commands/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/bin/ -/bin_test/ -/data/ -/generated/ diff --git a/org.gecko.emf.util.documentation.generators.commands/launch.bndrun b/org.gecko.emf.util.documentation.generators.commands/launch.bndrun deleted file mode 100644 index 528abb79..00000000 --- a/org.gecko.emf.util.documentation.generators.commands/launch.bndrun +++ /dev/null @@ -1,49 +0,0 @@ --runrequires: \ - bnd.identity;id='org.gecko.emf.util.documentation.generators.commands',\ - bnd.identity;id='org.apache.felix.gogo.command',\ - bnd.identity;id='org.apache.felix.gogo.runtime',\ - bnd.identity;id='org.apache.felix.gogo.shell',\ - bnd.identity;id='org.gecko.emf.util.documentation.generators.markdown.component' - --runproperties.properties: \ - base.path=${.} --runfw: org.apache.felix.framework;version='[7.0.1,7.0.1]' --runee: JavaSE-11 - --resolve.effective: active --runbundles: \ - com.fasterxml.jackson.core.jackson-annotations;version='[2.13.2,2.13.3)',\ - com.fasterxml.jackson.core.jackson-core;version='[2.13.2,2.13.3)',\ - com.fasterxml.jackson.core.jackson-databind;version='[2.13.2,2.13.3)',\ - com.fasterxml.jackson.dataformat.jackson-dataformat-properties;version='[2.13.2,2.13.3)',\ - com.fasterxml.jackson.dataformat.jackson-dataformat-yaml;version='[2.13.2,2.13.3)',\ - com.google.guava;version='[30.1.0,30.1.1)',\ - com.google.guava.failureaccess;version='[1.0.1,1.0.2)',\ - de.undercouch.bson4jackson;version='[2.13.1,2.13.2)',\ - org.apache.felix.configadmin;version='[1.9.22,1.9.23)',\ - org.apache.felix.converter;version='[1.0.18,1.0.19)',\ - org.apache.felix.gogo.command;version='[1.1.2,1.1.3)',\ - org.apache.felix.gogo.runtime;version='[1.1.4,1.1.5)',\ - org.apache.felix.gogo.shell;version='[1.1.4,1.1.5)',\ - org.apache.felix.scr;version='[2.1.30,2.1.31)',\ - org.eclipse.emf.common;version='[2.23.0,2.23.1)',\ - org.eclipse.emf.ecore;version='[2.25.0,2.25.1)',\ - org.eclipse.emf.ecore.xmi;version='[2.16.0,2.16.1)',\ - org.eclipse.emfcloud.emfjson-jackson;version='[2.1.0,2.1.1)',\ - org.eclipse.xtext.xbase.lib;version='[2.29.0,2.29.1)',\ - org.gecko.emf.bson;version=snapshot,\ - org.gecko.emf.json;version=snapshot,\ - org.gecko.emf.osgi.api;version='[4.1.1,4.1.2)',\ - org.gecko.emf.osgi.component;version='[4.1.1,4.1.2)',\ - org.gecko.emf.pushstreams;version=snapshot,\ - org.gecko.emf.util.documentation.generators.apis;version=snapshot,\ - org.gecko.emf.util.documentation.generators.commands;version=snapshot,\ - org.gecko.emf.util.documentation.generators.mermaid;version=snapshot,\ - org.gecko.emf.util.documentation.generators.plantuml;version=snapshot,\ - org.osgi.service.cm;version='[1.6.0,1.6.1)',\ - org.osgi.util.function;version='[1.1.0,1.1.1)',\ - org.osgi.util.promise;version='[1.2.0,1.2.1)',\ - org.osgi.util.pushstream;version='[1.0.1,1.0.2)',\ - org.yaml.snakeyaml;version='[1.30.0,1.30.1)',\ - org.gecko.emf.util.documentation.generators.markdown;version=snapshot,\ - org.gecko.emf.util.documentation.generators.markdown.component;version=snapshot \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.commands/src/org/gecko/emf/util/documentation/generators/commands/EcoreToDocumentationCommand.java b/org.gecko.emf.util.documentation.generators.commands/src/org/gecko/emf/util/documentation/generators/commands/EcoreToDocumentationCommand.java deleted file mode 100644 index 1170bcfb..00000000 --- a/org.gecko.emf.util.documentation.generators.commands/src/org/gecko/emf/util/documentation/generators/commands/EcoreToDocumentationCommand.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) 2012 - 2018 Data In Motion and others. - * All rights reserved. - * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v1.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Data In Motion - initial API and implementation - */ -package org.gecko.emf.util.documentation.generators.commands; - -import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationConstants; -import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService; -import org.osgi.service.component.annotations.Component; -import org.osgi.service.component.annotations.Reference; - - - -@Component(name = "EcoreToDocumentationCommand", service=EcoreToDocumentationCommand.class, property= { - "osgi.command.scope=EcoreToDocumentation", - "osgi.command.function=ecoreToPlantuml", - "osgi.command.function=ecoreToMermaid", - "osgi.command.function=ecoreToPlainMd" -}) -public class EcoreToDocumentationCommand { - - @Reference(target = "(component.name=EcoreToMarkdownComponent)") - EcoreToDocumentationService ecoreToMarkdownComponent; - - public void ecoreToPlantuml(String ecoreFilePath) { - ecoreToMarkdownComponent.ecoreToDocumentation(ecoreFilePath, EcoreToDocumentationConstants.CLASS_DIAGRAM_GEN_PLANTUML_OPTION); - } - - public void ecoreToMermaid(String ecoreFilePath) { - ecoreToMarkdownComponent.ecoreToDocumentation(ecoreFilePath, EcoreToDocumentationConstants.CLASS_DIAGRAM_GEN_MERMAID_OPTION); - } - - public void ecoreToPlainMd(String ecoreFilePath) { - ecoreToMarkdownComponent.ecoreToDocumentation(ecoreFilePath, EcoreToDocumentationConstants.ONLY_MARKDOWN_DOCS); - } -} diff --git a/org.gecko.emf.util.documentation.generators.commands/.classpath b/org.gecko.emf.util.documentation.generators.html.component/.classpath similarity index 100% rename from org.gecko.emf.util.documentation.generators.commands/.classpath rename to org.gecko.emf.util.documentation.generators.html.component/.classpath diff --git a/org.gecko.emf.util.documentation.generators.html.component/.gitignore b/org.gecko.emf.util.documentation.generators.html.component/.gitignore new file mode 100644 index 00000000..7fdbdef7 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.html.component/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/bin_test/ diff --git a/org.gecko.emf.util.documentation.generators.commands/.project b/org.gecko.emf.util.documentation.generators.html.component/.project similarity index 87% rename from org.gecko.emf.util.documentation.generators.commands/.project rename to org.gecko.emf.util.documentation.generators.html.component/.project index 70b9f777..067e37c1 100644 --- a/org.gecko.emf.util.documentation.generators.commands/.project +++ b/org.gecko.emf.util.documentation.generators.html.component/.project @@ -1,6 +1,6 @@ - org.gecko.emf.util.documentation.generators.commands + org.gecko.emf.util.documentation.generators.html.component diff --git a/org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.core.resources.prefs b/org.gecko.emf.util.documentation.generators.html.component/.settings/org.eclipse.core.resources.prefs similarity index 70% rename from org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.core.resources.prefs rename to org.gecko.emf.util.documentation.generators.html.component/.settings/org.eclipse.core.resources.prefs index 91c60f21..03f9b4a8 100644 --- a/org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.core.resources.prefs +++ b/org.gecko.emf.util.documentation.generators.html.component/.settings/org.eclipse.core.resources.prefs @@ -2,8 +2,7 @@ eclipse.preferences.version=1 encoding//.settings/org.eclipse.core.resources.prefs=UTF-8 encoding//.settings/org.eclipse.jdt.core.prefs=UTF-8 encoding//.settings/org.eclipse.jdt.ui.prefs=UTF-8 -encoding//src/org/gecko/emf/util/documentation/generators/commands/EcoreToDocumentationCommand.java=UTF-8 +encoding//src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java=UTF-8 encoding//src/test/component/Example.java=UTF-8 encoding//test/test/component/ExampleTest.java=UTF-8 encoding/bnd.bnd=UTF-8 -encoding/launch.bndrun=UTF-8 diff --git a/org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.jdt.core.prefs b/org.gecko.emf.util.documentation.generators.html.component/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.jdt.core.prefs rename to org.gecko.emf.util.documentation.generators.html.component/.settings/org.eclipse.jdt.core.prefs diff --git a/org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.jdt.ui.prefs b/org.gecko.emf.util.documentation.generators.html.component/.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from org.gecko.emf.util.documentation.generators.commands/.settings/org.eclipse.jdt.ui.prefs rename to org.gecko.emf.util.documentation.generators.html.component/.settings/org.eclipse.jdt.ui.prefs diff --git a/org.gecko.emf.util.documentation.generators.commands/bnd.bnd b/org.gecko.emf.util.documentation.generators.html.component/bnd.bnd similarity index 54% rename from org.gecko.emf.util.documentation.generators.commands/bnd.bnd rename to org.gecko.emf.util.documentation.generators.html.component/bnd.bnd index a39f5c77..8ad584dc 100644 --- a/org.gecko.emf.util.documentation.generators.commands/bnd.bnd +++ b/org.gecko.emf.util.documentation.generators.html.component/bnd.bnd @@ -5,9 +5,8 @@ javac.target: 11 Bundle-Version: 1.0.0.SNAPSHOT --includeresource.resources: \ - data=data/ -buildpath: \ org.gecko.emf.util.documentation.generators.apis;version=latest,\ + org.gecko.emf.util.documentation.generators.html;version=latest -Private-Package: org.gecko.emf.util.documentation.generators.commands +Private-Package: org.gecko.emf.util.documentation.generators.html.component diff --git a/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java b/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java new file mode 100644 index 00000000..6be20ec1 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2012 - 2018 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ +package org.gecko.emf.util.documentation.generators.html.component; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationCodeGenerator; +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions; +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService; +import org.gecko.emf.util.documentation.generators.html.HtmlCodeGen; +import org.osgi.service.component.annotations.Component; + +@Component(name="EcoreToHtmlComponent", service=EcoreToDocumentationService.class) +public class EcoreToHtmlComponent implements EcoreToDocumentationService { + + private static final String HTML_FILE_EXTENSION = ".html"; + private static final String HTML_OUTPUT_FOLDER = "html"; + private static final String HTML_WITH_MERMAID_OUTPUT_FOLDER = "html_mermaid"; + private static final String HTML_MEDIA_TYPE = "text/html"; + + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#canHandleMediaType(java.lang.String) + */ + @Override + public boolean canHandleMediaType(String mediaType) { + if(HTML_MEDIA_TYPE.equals(mediaType)) { + return true; + } + return false; + } + + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#getOutputFileExtension() + */ + @Override + public String getOutputFileExtension() { + return HTML_FILE_EXTENSION; + } + + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#getOutputFolder(org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions) + */ + @Override + public String getOutputFolder(EcoreToDocumentationOptions mode) { + switch(mode) { + case HTML_WITH_MERMAID_CLASS_DIAGRAM: + return HTML_WITH_MERMAID_OUTPUT_FOLDER; + case ONLY_HTML_CLASS_OVERVIEW: default: + return HTML_OUTPUT_FOLDER; + } + } + + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#doGenerateDocumentation(org.eclipse.emf.ecore.EPackage, org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions, java.lang.String) + */ + @Override + public OutputStream doGenerateDocumentation(EPackage ePackage, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException { + EcoreToDocumentationCodeGenerator mdCodeGenerator = new HtmlCodeGen(); + CharSequence cs = mdCodeGenerator.generateDocumentation(ePackage, mode); + File outputFile = generateOutputFile(ePackage, cs, mode, outputFolderRoot); + try(InputStream is = new FileInputStream(outputFile); OutputStream os = new ByteArrayOutputStream();) { + os.write(is.readAllBytes()); + return os; + } + } + + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#doGenerateDocumentation(org.eclipse.emf.ecore.EClass, org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions, java.lang.String) + */ + @Override + public OutputStream doGenerateDocumentation(EClass eClass, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException { + EcoreToDocumentationCodeGenerator mdCodeGenerator = new HtmlCodeGen(); + CharSequence cs = mdCodeGenerator.generateDocumentation(eClass, mode); + File outputFile = generateOutputFile(eClass, cs, mode, outputFolderRoot); + try(InputStream is = new FileInputStream(outputFile); OutputStream os = new ByteArrayOutputStream();) { + os.write(is.readAllBytes()); + return os; + } + } + + +} diff --git a/org.gecko.emf.util.documentation.generators.commands/test/.keep b/org.gecko.emf.util.documentation.generators.html.component/test/.keep similarity index 100% rename from org.gecko.emf.util.documentation.generators.commands/test/.keep rename to org.gecko.emf.util.documentation.generators.html.component/test/.keep diff --git a/org.gecko.emf.util.documentation.generators.html/.classpath b/org.gecko.emf.util.documentation.generators.html/.classpath new file mode 100644 index 00000000..e37cc369 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.html/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/org.gecko.emf.util.documentation.generators.html/.gitignore b/org.gecko.emf.util.documentation.generators.html/.gitignore new file mode 100644 index 00000000..ae3c1726 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.html/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/org.gecko.emf.util.documentation.generators.html/.project b/org.gecko.emf.util.documentation.generators.html/.project new file mode 100644 index 00000000..1be1216b --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.html/.project @@ -0,0 +1,29 @@ + + + org.gecko.emf.util.documentation.generators.html + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + bndtools.core.bndbuilder + + + + + + org.eclipse.jdt.core.javanature + bndtools.core.bndnature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/org.gecko.emf.util.documentation.generators.html/.settings/org.eclipse.jdt.core.prefs b/org.gecko.emf.util.documentation.generators.html/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..f2525a8b --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.html/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,14 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=11 diff --git a/org.gecko.emf.util.documentation.generators.html/bnd.bnd b/org.gecko.emf.util.documentation.generators.html/bnd.bnd new file mode 100644 index 00000000..d953a2ad --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.html/bnd.bnd @@ -0,0 +1,16 @@ +Bundle-Name: Xtend Generator for Html +Bundle-Description: Xtend Generator for Html +Bundle-Version: 1.0.0-SNAPSHOT + +src.xtend-gen=xtend-gen + +-buildpath: \ + org.eclipse.xtext.xbase.lib,\ + org.gecko.emf.util.documentation.generators.mermaid;version=latest,\ + org.gecko.emf.util.documentation.generators.plantuml;version=latest,\ + org.gecko.emf.util.documentation.generators.apis;version=latest + +-library: \ + enable-emf + +Export-Package: org.gecko.emf.util.documentation.generators.html \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend b/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend new file mode 100644 index 00000000..aca2dc21 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend @@ -0,0 +1,203 @@ +package org.gecko.emf.util.documentation.generators.html; + +import java.util.List +import org.eclipse.emf.common.util.EList +import org.eclipse.emf.common.util.EMap +import org.eclipse.emf.ecore.EAnnotation +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EClassifier +import org.eclipse.emf.ecore.EEnum +import org.eclipse.emf.ecore.EEnumLiteral +import org.eclipse.emf.ecore.EModelElement +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EStructuralFeature +import org.gecko.emf.util.documentation.generators.apis.EcoreToClassDiagramCodeGenerator +import org.gecko.emf.util.documentation.generators.mermaid.MermaidClassDiagramCodeGen +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationCodeGenerator + +class HtmlCodeGen implements EcoreToDocumentationCodeGenerator { + + EcoreToClassDiagramCodeGenerator classDiagramCodeGen; + String docStart = "\n"+ + "\t\n"+ + "\t\t\n" + + "\t\t\n" + + "\t\n" + + "\t"; + String docEnd = "\t\n"; + String diagramStartSyntax = ""; + String diagramEndSyntax = ""; + String mdBlockStart = "\t\t"; + String mdBlockEnd = "\t\t"; + + def generateHtmlDoc(EPackage epackage, EcoreToDocumentationOptions mode) { + if(EcoreToDocumentationOptions.HTML_WITH_MERMAID_CLASS_DIAGRAM.equals(mode)) { + classDiagramCodeGen = new MermaidClassDiagramCodeGen(); + diagramStartSyntax = "\t\t\t
"; + diagramEndSyntax = "\t\t\t
"; + } + ''' +«docStart» +«mdBlockStart» +# Package: «epackage.name» +«"\n"» +«mdBlockEnd» +«IF classDiagramCodeGen !== null» +«mdBlockStart» +## Class Diagram +«"\n"» +«mdBlockEnd» +«diagramStartSyntax» +«classDiagramCodeGen.generateClassDiagram(epackage).toString().replace("<","<").replace(">", ">")» +«diagramEndSyntax» +«"\n"» +«ENDIF» +«toEClassifierOverview(epackage.EClassifiers)» +«docEnd» + ''' + } + + + def toEClassifierOverview(EList eclassifiers) { +var List classes = eclassifiers.filter[ec | ec instanceof EClass].map[ec | ec as EClass].toList; +var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | ec as EEnum].toList; +''' +«IF !classes.isEmpty» +«mdBlockStart» +## Classes Overview +«"\n"» +«mdBlockEnd» +«FOR eclass: classes» +«toClassOverview(eclass)» +«"\n"» +«"\n"» +«ENDFOR» +«"\n"» +«ENDIF» +«mdBlockStart» +## Enumerators Overview +«"\n"» +«mdBlockEnd» +«IF enums.empty» +«mdBlockStart» +None. +«"\n"» +«mdBlockEnd» +«ELSE» +«FOR enumerator: enums» +«toEnumOverview(enumerator)» +«"\n"» +«"\n"» +«ENDFOR» +«ENDIF» +''' +} + + + def toEnumOverview(EEnum enumerator) + ''' +«mdBlockStart» +### Enumerator: «enumerator.name» +«"\n"» +#### Description +«"\n"» +«toModelElementDescription(enumerator)» +«"\n"» +#### Literals +«"\n"» +«toLiteralOverview(enumerator.ELiterals)» +«mdBlockEnd» + ''' + + def toLiteralOverview(EList literals) + ''' +«IF literals.empty» +None. +«ELSE» +| Literal| Description| +| -----| -----------| +«FOR literal: literals» +|«literal.name»|«toModelElementDescription(literal)»| +«ENDFOR» +«ENDIF» + ''' + + def toClassOverview(EClass eclass) + ''' +«mdBlockStart» +### Class: «eclass.name» +«"\n"» +#### Description +«"\n"» +«toModelElementDescription(eclass)» +«"\n"» +«mdBlockEnd» +«IF classDiagramCodeGen !== null» +«mdBlockStart» +#### Class Diagram +«"\n"» +«mdBlockEnd» +«diagramStartSyntax» +«classDiagramCodeGen.generateClassDiagram(eclass)» +«diagramEndSyntax» +«"\n"» +«ENDIF» +«mdBlockStart» +#### Fields +«"\n"» +«toClassStructuralFeaturesDescription(eclass.EAttributes)» +«"\n"» +#### References +«"\n"» +«toClassStructuralFeaturesDescription(eclass.EReferences)» +«"\n"» +«mdBlockEnd» + ''' + + + def toClassStructuralFeaturesDescription(EList features) { + ''' +«IF features.empty» +None. +«ELSE» +| Name| Type| Bounds| Description| +| -----| ----| ------| -----------| +«FOR feature: features» +|«feature.name»|«feature.EType.name»|«feature.lowerBound»..«feature.upperBound»|«toModelElementDescription(feature)»| +«ENDFOR» +«ENDIF» + ''' + } + + + def String toModelElementDescription(EModelElement element) { + for(EAnnotation annotation : element.EAnnotations) { + var EMap details = annotation.details; + if(details.containsKey("documentation")) { + return details.get("documentation").trim; + } + + } + return "None." + } + + override generateDocumentation(EPackage ePackage, EcoreToDocumentationOptions docGenOption) { + generateHtmlDoc(ePackage, docGenOption); + } + + override generateDocumentation(EClass eClass, EcoreToDocumentationOptions docGenOption) { + if(EcoreToDocumentationOptions.HTML_WITH_MERMAID_CLASS_DIAGRAM.equals(docGenOption)) { + classDiagramCodeGen = new MermaidClassDiagramCodeGen(); + diagramStartSyntax = "
"; + diagramEndSyntax = "
"; + } + ''' +«docStart» +«toClassOverview(eClass)» +«docEnd» + ''' + + } + +} \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.HtmlCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.HtmlCodeGen.xtendbin new file mode 100644 index 0000000000000000000000000000000000000000..42ebb444598918ee3233f6005e3910af7e610d69 GIT binary patch literal 8426 zcmaKSRa6{G)9v7cL$JY}5ZooW1b26L3GN;ScXtTE2Pe3OK?1=cc!ImT4sg$T`oHgA z_ulGtXHSnI0~BAa zpDhclv)M)IK?l8C6?F_zoaf0+-VeCIvyHW)<`w{HsXO)TEK zZ4Dky91hv5xOL9uuLZPen)pxVboiV(rRW7wo(BX5c2(ziOy&#jirMb1t=7P-cp7O| zNC^wyM^;S=-=cP7E*c3~iz)rIxWMwx+etQB{#liZg zM0(w+k?Xt?XAwK0M%1|e^&pT-AkIeI8GB+6TMwz)$=0<}-ZThp?^&Y+uR=WJeMAVo zt&vccu#?bd!`&ifWd%*m?-0H=I|a?_Nd*->Jw~`SrK?@RYaI7_F?OUhO87_feo zFbwy5^I0IGl0Raptc3r8@QPuM#j*m{jAZcvm+icrsZ{^YPw`-~ov1cmx)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)VDFp~s` z5)&A+B#vw(?VXS9zvkwRqRxc)ML%S`*iIGn1&*$ex%qgpC?uPz=AcWf%;728ied~Z zg{UWFuBNjtV_9%Fo_G06I>(C0s>AA-dw5eQkXB;45Wd~`#z_6?2TwyJV9P(m+inpJ zo*B;NDDfFz?a*DMbX(0UmpGCWoVzilmLsby2Bi69d`ZijFcpU)Bb?%|_*kq-TVpXv zmqFXkOTYMHnfPKyh6P+oDxFG7ElR*nJG90*JSC zROl%4o!_UiDmp(kw9q41RXJ}&#MiR!8W_u5uT9>ADYGP1ne4AcU3*4bAln5;P5jNN zooR)3u*zRKS>|Of#9Sqiuj;28vO|mfOS^?@;oCR?-@nbK+p`&iJoc7iSGaIdnPGlD zBfSUqLHg}yH)wI~`TdIS1XER{nmO5p_7)dBd^ud4y)qdw#P)dGBqg>k@hMfD7l8s9 zv!Gs^RQDyX|eXixb3;K&ZKB%8$owHbRXsR z=?4O$Zc!nZ?*l+2Zx$5n#FX#>i`!S|c_S_dc`AuDAcz>n#g;OV#uOMbQZs!XXLsQf zdHE&?_Q6{lsy>(S#WwdnV#itg(x3uj(@(qL1IK~SKea3QB5pnd&!v3XH`T$_;Cosa zV3QM!jUyU;5f1)|8=QSX4JJa}#}!q2078>+MPo1CZCV1wBpw8yW8gMg7@axFW(9B& zS5*E1ADViB1=a=f{;Oi*JeI~CcxLg|N3(0VG^yG>nOQ7K=v z%|&2e;)Oocg$9Pa*@hb&chLpxlX?gOuhRxnY+?gdX#>M9WPu@a4|rfP1{g84=v|@2 zg9p@<28Og*kNX;X@d?~V4I_uHzbpLo5C9dUfgx-v0^g(`(4bkUrk@`650D?&|HU`) zl*gBHL;zr#@?U&|gU1K_Pk+FF>X3gC?!WCny9NID%Kt>oe|5_LSkphc=KrQz{&$A| fJlB8kElT>|SgWRpg#2%QgnvfsKQjf@ztR5zS3~X= literal 0 HcmV?d00001 diff --git a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.gitignore b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.gitignore new file mode 100644 index 00000000..e9ce2dc3 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.gitignore @@ -0,0 +1 @@ +/.HtmlCodeGen.java._trace diff --git a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java new file mode 100644 index 00000000..4a17a0b1 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java @@ -0,0 +1,389 @@ +package org.gecko.emf.util.documentation.generators.html; + +import java.util.List; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.EMap; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EEnumLiteral; +import org.eclipse.emf.ecore.EModelElement; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.xtend2.lib.StringConcatenation; +import org.eclipse.xtext.xbase.lib.Functions.Function1; +import org.eclipse.xtext.xbase.lib.IterableExtensions; +import org.gecko.emf.util.documentation.generators.apis.EcoreToClassDiagramCodeGenerator; +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationCodeGenerator; +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions; +import org.gecko.emf.util.documentation.generators.mermaid.MermaidClassDiagramCodeGen; + +@SuppressWarnings("all") +public class HtmlCodeGen implements EcoreToDocumentationCodeGenerator { + private EcoreToClassDiagramCodeGenerator classDiagramCodeGen; + + private String docStart = ((((("\n" + + "\t\n") + + "\t\t\n") + + "\t\t\n") + + "\t\n") + + "\t"); + + private String docEnd = "\t\n"; + + private String diagramStartSyntax = ""; + + private String diagramEndSyntax = ""; + + private String mdBlockStart = "\t\t"; + + private String mdBlockEnd = "\t\t"; + + public CharSequence generateHtmlDoc(final EPackage epackage, final EcoreToDocumentationOptions mode) { + CharSequence _xblockexpression = null; + { + boolean _equals = EcoreToDocumentationOptions.HTML_WITH_MERMAID_CLASS_DIAGRAM.equals(mode); + if (_equals) { + MermaidClassDiagramCodeGen _mermaidClassDiagramCodeGen = new MermaidClassDiagramCodeGen(); + this.classDiagramCodeGen = _mermaidClassDiagramCodeGen; + this.diagramStartSyntax = "\t\t\t
"; + this.diagramEndSyntax = "\t\t\t
"; + } + StringConcatenation _builder = new StringConcatenation(); + _builder.append(this.docStart); + _builder.newLineIfNotEmpty(); + _builder.append(this.mdBlockStart); + _builder.newLineIfNotEmpty(); + _builder.append("# Package: "); + String _name = epackage.getName(); + _builder.append(_name); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append(this.mdBlockEnd); + _builder.newLineIfNotEmpty(); + { + if ((this.classDiagramCodeGen != null)) { + _builder.append(this.mdBlockStart); + _builder.newLineIfNotEmpty(); + _builder.append("## Class Diagram"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append(this.mdBlockEnd); + _builder.newLineIfNotEmpty(); + _builder.append(this.diagramStartSyntax); + _builder.newLineIfNotEmpty(); + String _replace = this.classDiagramCodeGen.generateClassDiagram(epackage).toString().replace("<", "<").replace(">", ">"); + _builder.append(_replace); + _builder.newLineIfNotEmpty(); + _builder.append(this.diagramEndSyntax); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } + CharSequence _eClassifierOverview = this.toEClassifierOverview(epackage.getEClassifiers()); + _builder.append(_eClassifierOverview); + _builder.newLineIfNotEmpty(); + _builder.append(this.docEnd); + _builder.newLineIfNotEmpty(); + _xblockexpression = _builder; + } + return _xblockexpression; + } + + public CharSequence toEClassifierOverview(final EList eclassifiers) { + CharSequence _xblockexpression = null; + { + final Function1 _function = (EClassifier ec) -> { + return Boolean.valueOf((ec instanceof EClass)); + }; + final Function1 _function_1 = (EClassifier ec) -> { + return ((EClass) ec); + }; + List classes = IterableExtensions.toList(IterableExtensions.map(IterableExtensions.filter(eclassifiers, _function), _function_1)); + final Function1 _function_2 = (EClassifier ec) -> { + return Boolean.valueOf((ec instanceof EEnum)); + }; + final Function1 _function_3 = (EClassifier ec) -> { + return ((EEnum) ec); + }; + List enums = IterableExtensions.toList(IterableExtensions.map(IterableExtensions.filter(eclassifiers, _function_2), _function_3)); + StringConcatenation _builder = new StringConcatenation(); + { + boolean _isEmpty = classes.isEmpty(); + boolean _not = (!_isEmpty); + if (_not) { + _builder.append(this.mdBlockStart); + _builder.newLineIfNotEmpty(); + _builder.append("## Classes Overview"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append(this.mdBlockEnd); + _builder.newLineIfNotEmpty(); + { + for(final EClass eclass : classes) { + CharSequence _classOverview = this.toClassOverview(eclass); + _builder.append(_classOverview); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } + _builder.append(this.mdBlockStart); + _builder.newLineIfNotEmpty(); + _builder.append("## Enumerators Overview"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append(this.mdBlockEnd); + _builder.newLineIfNotEmpty(); + { + boolean _isEmpty_1 = enums.isEmpty(); + if (_isEmpty_1) { + _builder.append(this.mdBlockStart); + _builder.newLineIfNotEmpty(); + _builder.append("None."); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append(this.mdBlockEnd); + _builder.newLineIfNotEmpty(); + } else { + { + for(final EEnum enumerator : enums) { + CharSequence _enumOverview = this.toEnumOverview(enumerator); + _builder.append(_enumOverview); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } + } + } + _xblockexpression = _builder; + } + return _xblockexpression; + } + + public CharSequence toEnumOverview(final EEnum enumerator) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append(this.mdBlockStart); + _builder.newLineIfNotEmpty(); + _builder.append("### Enumerator: "); + String _name = enumerator.getName(); + _builder.append(_name); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("#### Description"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + String _modelElementDescription = this.toModelElementDescription(enumerator); + _builder.append(_modelElementDescription); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("#### Literals"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + CharSequence _literalOverview = this.toLiteralOverview(enumerator.getELiterals()); + _builder.append(_literalOverview); + _builder.newLineIfNotEmpty(); + _builder.append(this.mdBlockEnd); + _builder.newLineIfNotEmpty(); + return _builder; + } + + public CharSequence toLiteralOverview(final EList literals) { + StringConcatenation _builder = new StringConcatenation(); + { + boolean _isEmpty = literals.isEmpty(); + if (_isEmpty) { + _builder.append("None."); + _builder.newLine(); + } else { + _builder.append("| Literal| Description|"); + _builder.newLine(); + _builder.append("| -----| -----------|"); + _builder.newLine(); + { + for(final EEnumLiteral literal : literals) { + _builder.append("|"); + String _name = literal.getName(); + _builder.append(_name); + _builder.append("|"); + String _modelElementDescription = this.toModelElementDescription(literal); + _builder.append(_modelElementDescription); + _builder.append("|"); + _builder.newLineIfNotEmpty(); + } + } + } + } + return _builder; + } + + public CharSequence toClassOverview(final EClass eclass) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append(this.mdBlockStart); + _builder.newLineIfNotEmpty(); + _builder.append("### Class: "); + String _name = eclass.getName(); + _builder.append(_name); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("#### Description"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + String _modelElementDescription = this.toModelElementDescription(eclass); + _builder.append(_modelElementDescription); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append(this.mdBlockEnd); + _builder.newLineIfNotEmpty(); + { + if ((this.classDiagramCodeGen != null)) { + _builder.append(this.mdBlockStart); + _builder.newLineIfNotEmpty(); + _builder.append("#### Class Diagram"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append(this.mdBlockEnd); + _builder.newLineIfNotEmpty(); + _builder.append(this.diagramStartSyntax); + _builder.newLineIfNotEmpty(); + CharSequence _generateClassDiagram = this.classDiagramCodeGen.generateClassDiagram(eclass); + _builder.append(_generateClassDiagram); + _builder.newLineIfNotEmpty(); + _builder.append(this.diagramEndSyntax); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } + _builder.append(this.mdBlockStart); + _builder.newLineIfNotEmpty(); + _builder.append("#### Fields"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + CharSequence _classStructuralFeaturesDescription = this.toClassStructuralFeaturesDescription(eclass.getEAttributes()); + _builder.append(_classStructuralFeaturesDescription); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("#### References"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + CharSequence _classStructuralFeaturesDescription_1 = this.toClassStructuralFeaturesDescription(eclass.getEReferences()); + _builder.append(_classStructuralFeaturesDescription_1); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append(this.mdBlockEnd); + _builder.newLineIfNotEmpty(); + return _builder; + } + + public CharSequence toClassStructuralFeaturesDescription(final EList features) { + StringConcatenation _builder = new StringConcatenation(); + { + boolean _isEmpty = features.isEmpty(); + if (_isEmpty) { + _builder.append("None."); + _builder.newLine(); + } else { + _builder.append("| Name| Type| Bounds| Description|"); + _builder.newLine(); + _builder.append("| -----| ----| ------| -----------|"); + _builder.newLine(); + { + for(final T feature : features) { + _builder.append("|"); + String _name = feature.getName(); + _builder.append(_name); + _builder.append("|"); + String _name_1 = feature.getEType().getName(); + _builder.append(_name_1); + _builder.append("|"); + int _lowerBound = feature.getLowerBound(); + _builder.append(_lowerBound); + _builder.append(".."); + int _upperBound = feature.getUpperBound(); + _builder.append(_upperBound); + _builder.append("|"); + String _modelElementDescription = this.toModelElementDescription(feature); + _builder.append(_modelElementDescription); + _builder.append("|"); + _builder.newLineIfNotEmpty(); + } + } + } + } + return _builder; + } + + public String toModelElementDescription(final EModelElement element) { + EList _eAnnotations = element.getEAnnotations(); + for (final EAnnotation annotation : _eAnnotations) { + { + EMap details = annotation.getDetails(); + boolean _containsKey = details.containsKey("documentation"); + if (_containsKey) { + return details.get("documentation").trim(); + } + } + } + return "None."; + } + + @Override + public CharSequence generateDocumentation(final EPackage ePackage, final EcoreToDocumentationOptions docGenOption) { + return this.generateHtmlDoc(ePackage, docGenOption); + } + + @Override + public CharSequence generateDocumentation(final EClass eClass, final EcoreToDocumentationOptions docGenOption) { + CharSequence _xblockexpression = null; + { + boolean _equals = EcoreToDocumentationOptions.HTML_WITH_MERMAID_CLASS_DIAGRAM.equals(docGenOption); + if (_equals) { + MermaidClassDiagramCodeGen _mermaidClassDiagramCodeGen = new MermaidClassDiagramCodeGen(); + this.classDiagramCodeGen = _mermaidClassDiagramCodeGen; + this.diagramStartSyntax = "
"; + this.diagramEndSyntax = "
"; + } + StringConcatenation _builder = new StringConcatenation(); + _builder.append(this.docStart); + _builder.newLineIfNotEmpty(); + CharSequence _classOverview = this.toClassOverview(eClass); + _builder.append(_classOverview); + _builder.newLineIfNotEmpty(); + _builder.append(this.docEnd); + _builder.newLineIfNotEmpty(); + _xblockexpression = _builder; + } + return _xblockexpression; + } +} diff --git a/org.gecko.emf.util.documentation.generators.markdown.component/.settings/org.eclipse.core.resources.prefs b/org.gecko.emf.util.documentation.generators.markdown.component/.settings/org.eclipse.core.resources.prefs index 6580a3cc..74deb3b7 100644 --- a/org.gecko.emf.util.documentation.generators.markdown.component/.settings/org.eclipse.core.resources.prefs +++ b/org.gecko.emf.util.documentation.generators.markdown.component/.settings/org.eclipse.core.resources.prefs @@ -2,7 +2,6 @@ eclipse.preferences.version=1 encoding//.settings/org.eclipse.core.resources.prefs=UTF-8 encoding//.settings/org.eclipse.jdt.core.prefs=UTF-8 encoding//.settings/org.eclipse.jdt.ui.prefs=UTF-8 -encoding//src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java=UTF-8 encoding//src/test/component/Example.java=UTF-8 encoding//test/test/component/ExampleTest.java=UTF-8 encoding/bnd.bnd=UTF-8 diff --git a/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java b/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java index 227633f3..27bc2c5d 100644 --- a/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java +++ b/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2012 - 2018 Data In Motion and others. + * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * * This program and the accompanying materials are made available under the terms of the @@ -11,97 +11,102 @@ */ package org.gecko.emf.util.documentation.generators.markdown.component; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; import java.io.IOException; -import java.nio.file.Path; -import java.util.logging.Level; -import java.util.logging.Logger; +import java.io.InputStream; +import java.io.OutputStream; -import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.ResourceSet; -import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationConstants; +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationCodeGenerator; +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions; import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService; import org.gecko.emf.util.documentation.generators.markdown.MarkdownCodeGen; import org.osgi.service.component.annotations.Component; -import org.osgi.service.component.annotations.Reference; +/** + * + * @author ilenia + * @since Oct 19, 2022 + */ @Component(name="EcoreToMarkdownComponent", service=EcoreToDocumentationService.class) -public class EcoreToMarkdownComponent implements EcoreToDocumentationService{ - - @Reference - ResourceSet resourceSet; - +public class EcoreToMarkdownComponent implements EcoreToDocumentationService { + private static final String MD_FILE_EXTENSION = ".md"; - private String MD_FOLDER_NAME = "md"; - private static final Logger LOGGER = Logger.getLogger(EcoreToMarkdownComponent.class.getName()); + private static final String MD_OUTPUT_FOLDER = "md"; + private static final String MD_WITH_MERMAID_OUTPUT_FOLDER = "md_mermaid"; + private static final String MD_WITH_PLANTUML_OUTPUT_FOLDER = "md_plantuml"; + private static final String MD_MEDIA_TYPE = "text/markdown"; + /* * (non-Javadoc) - * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#doGenerateDocumentation(java.nio.file.Path) + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#getOutputFileExtension() */ @Override - public void doGenerateDocumentation(Path ecoreFilePath, EcoreToDocumentationConstants mode) { - if(!canHandleFileFormat(ecoreFilePath.getFileName().toString())) { - LOGGER.log(Level.WARNING, "Cannot handle file format for " + ecoreFilePath); - return; - } - LOGGER.fine("Processing file " + ecoreFilePath); - EPackage ePackage = extractEPackageFromEcore(ecoreFilePath); - MarkdownCodeGen markdownCodeGen = new MarkdownCodeGen(); - CharSequence cs = markdownCodeGen.generateMarkdownDoc(ePackage, mode); - generateOutputFile(ecoreFilePath, cs, mode); + public String getOutputFileExtension() { + return MD_FILE_EXTENSION; } - private EPackage extractEPackageFromEcore(Path ecoreFilePath) { - Resource resource = resourceSet.createResource(URI.createFileURI(ecoreFilePath.toString())); - try { - resource.load(null); - if(resource.getContents().isEmpty()) { - LOGGER.log(Level.SEVERE, "Resource has no contents!"); - return null; - } - EObject eObj = resource.getContents().get(0); - if(eObj instanceof EPackage) { - return(EPackage) eObj; - } - else { - LOGGER.log(Level.SEVERE, "Content is not an EPackage!"); - return null; - } - } catch(IOException e) { - LOGGER.log(Level.SEVERE, "IOException in file " + ecoreFilePath + " " + e.getMessage()); - return null; - } + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#getOutputFolder(org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions) + */ + @Override + public String getOutputFolder(EcoreToDocumentationOptions mode) { + switch(mode) { + case MARKDOWN_WITH_MERMAID_CLASS_DIAGRAM: + return MD_WITH_MERMAID_OUTPUT_FOLDER; + case MARKDOWN_WITH_PLANTUML_CLASS_DIAGRAM: + return MD_WITH_PLANTUML_OUTPUT_FOLDER; + case ONLY_MARKDOWN_CLASS_OVERVIEW: default: + return MD_OUTPUT_FOLDER; + } } - - /* * (non-Javadoc) - * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#getOutputFileExtension() + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#doGenerateDocumentation(org.eclipse.emf.ecore.EPackage, org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions, java.lang.String) */ @Override - public String getOutputFileExtension() { - return MD_FILE_EXTENSION; + public OutputStream doGenerateDocumentation(EPackage ePackage, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException { + EcoreToDocumentationCodeGenerator mdCodeGenerator = new MarkdownCodeGen(); + CharSequence cs = mdCodeGenerator.generateDocumentation(ePackage, mode); + File outputFile = generateOutputFile(ePackage, cs, mode, outputFolderRoot); + try(InputStream is = new FileInputStream(outputFile); OutputStream os = new ByteArrayOutputStream();) { + os.write(is.readAllBytes()); + return os; + } } /* * (non-Javadoc) - * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#getOutputFolder() + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#doGenerateDocumentation(org.eclipse.emf.ecore.EClass, org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions, java.lang.String) */ @Override - public String getOutputFolder(EcoreToDocumentationConstants mode) { - switch(mode) { - case CLASS_DIAGRAM_GEN_MERMAID_OPTION: - return MD_FOLDER_NAME + "_mermaid"; - case CLASS_DIAGRAM_GEN_PLANTUML_OPTION: - return MD_FOLDER_NAME + "_plantuml"; - default: - return MD_FOLDER_NAME; - } + public OutputStream doGenerateDocumentation(EClass eClass, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException{ + EcoreToDocumentationCodeGenerator mdCodeGenerator = new MarkdownCodeGen(); + CharSequence cs = mdCodeGenerator.generateDocumentation(eClass, mode); + File outputFile = generateOutputFile(eClass, cs, mode, outputFolderRoot); + try(InputStream is = new FileInputStream(outputFile); OutputStream os = new ByteArrayOutputStream();) { + os.write(is.readAllBytes()); + return os; + } } + + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#canHandleMediaType(java.lang.String) + */ + @Override + public boolean canHandleMediaType(String mediaType) { + if(MD_MEDIA_TYPE.equals(mediaType)) { + return true; + } + return false; + } } diff --git a/org.gecko.emf.util.documentation.generators.markdown/bnd.bnd b/org.gecko.emf.util.documentation.generators.markdown/bnd.bnd index 939e114c..1a6b2386 100644 --- a/org.gecko.emf.util.documentation.generators.markdown/bnd.bnd +++ b/org.gecko.emf.util.documentation.generators.markdown/bnd.bnd @@ -5,7 +5,6 @@ Bundle-Version: 1.0.0-SNAPSHOT src.xtend-gen=xtend-gen -buildpath: \ - org.eclipse.xtext.builder,\ org.eclipse.xtext.xbase.lib,\ org.gecko.emf.util.documentation.generators.mermaid;version=latest,\ org.gecko.emf.util.documentation.generators.plantuml;version=latest,\ diff --git a/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend b/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend index 079db522..0b0403ab 100644 --- a/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend @@ -12,27 +12,28 @@ import org.eclipse.emf.ecore.EModelElement import org.eclipse.emf.ecore.EPackage import org.eclipse.emf.ecore.EStructuralFeature import org.gecko.emf.util.documentation.generators.apis.EcoreToClassDiagramCodeGenerator -import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationConstants -import org.gecko.emf.util.documentation.generators.mermaid.MermaidCodeGen -import org.gecko.emf.util.documentation.generators.plantuml.PlantumlCodeGen +import org.gecko.emf.util.documentation.generators.mermaid.MermaidClassDiagramCodeGen +import org.gecko.emf.util.documentation.generators.plantuml.PlantumlClassDiagramCodeGen +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions +import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationCodeGenerator -class MarkdownCodeGen { +class MarkdownCodeGen implements EcoreToDocumentationCodeGenerator{ EcoreToClassDiagramCodeGenerator classDiagramCodeGen; String diagramStartSyntax; String diagramEndSyntax = "```"; - def generateMarkdownDoc(EPackage epackage, EcoreToDocumentationConstants mode) { - if(EcoreToDocumentationConstants.CLASS_DIAGRAM_GEN_MERMAID_OPTION.equals(mode)) { - classDiagramCodeGen = new MermaidCodeGen(); + def generateMarkdownDoc(EPackage epackage, EcoreToDocumentationOptions mode) { + if(EcoreToDocumentationOptions.MARKDOWN_WITH_MERMAID_CLASS_DIAGRAM.equals(mode)) { + classDiagramCodeGen = new MermaidClassDiagramCodeGen(); diagramStartSyntax = "```mermaid"; } - else if(EcoreToDocumentationConstants.CLASS_DIAGRAM_GEN_PLANTUML_OPTION.equals(mode)) { - classDiagramCodeGen = new PlantumlCodeGen(); + else if(EcoreToDocumentationOptions.MARKDOWN_WITH_PLANTUML_CLASS_DIAGRAM.equals(mode)) { + classDiagramCodeGen = new PlantumlClassDiagramCodeGen(); diagramStartSyntax = "```plantuml"; } ''' -# «epackage.name» +# Package: «epackage.name» «"\n"» «IF classDiagramCodeGen !== null» ## Class Diagram @@ -61,18 +62,22 @@ var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | e «"\n"» ## Enumerators Overview «"\n"» +«IF enums.empty» +None. +«ELSE» «FOR enumerator: enums» «toEnumOverview(enumerator)» «"\n"» «"\n"» «ENDFOR» +«ENDIF» ''' } def toEnumOverview(EEnum enumerator) ''' -### «enumerator.name» +### Enumerator: «enumerator.name» «"\n"» #### Description «"\n"» @@ -98,7 +103,7 @@ None. def toClassOverview(EClass eclass) ''' -### «eclass.name» +### Class: «eclass.name» «"\n"» #### Description «"\n"» @@ -149,4 +154,20 @@ None. return "None." } + override generateDocumentation(EPackage ePackage, EcoreToDocumentationOptions docGenOption) { + generateMarkdownDoc(ePackage, docGenOption); + } + + override generateDocumentation(EClass eClass, EcoreToDocumentationOptions docGenOption) { + if(EcoreToDocumentationOptions.MARKDOWN_WITH_MERMAID_CLASS_DIAGRAM.equals(docGenOption)) { + classDiagramCodeGen = new MermaidClassDiagramCodeGen(); + diagramStartSyntax = "```mermaid"; + } + else if(EcoreToDocumentationOptions.MARKDOWN_WITH_PLANTUML_CLASS_DIAGRAM.equals(docGenOption)) { + classDiagramCodeGen = new PlantumlClassDiagramCodeGen(); + diagramStartSyntax = "```plantuml"; + } + toClassOverview(eClass); + } + } \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin index 39ab75b914ccd79c50fde54a36b96bd332111fad..f00954b2e8dff010e293251caaf7549b1277fcf8 100644 GIT binary patch literal 7340 zcmaKxWmFVwxA$p=?i>)L8w3gIkWPU?0Yw_=9>Afb8|em-?hd89OG>&y$zc!}V3;}H z>-})<=dAafeSO&1m%Xo8YyZ|>|E;HqiA9M9007Xq4J<%t|1!eAdmCq4ek)fOFB=yx z&mnp|Uk1<%Pp6x4m+WF~5-y@thlz$Y4+m1;I&~BMOFpz z&E0U8UF@&ETVGjXb_0q+Xf}PfV%m@>lI2|)*+4@{R5~Bt)HnhY2OFaec#;s#C?*Kiq>*P z5j_4}Oi)AgwE*=*$tkhp(yCMpaGl*%-o^Q%=%JTh*y?Ar$=pj^xnJ){?(H6_E!4Ke5;GqTRXTnB2>)pzK zhk<-m9@qbb0p&{4v@1rjyv2&Iy&-RRg(*4%f&O+Yt}w&pm` z!HN}7RXy@2^UFe9Ex%wFmX=?aX-a~m+WvuoNRjGA83UBAI>dmMERidsVkuOYv_<2TXi4l+bI_tvX) z)?%CKDw?fmqXdn3v8xPoxT)`bASBvZ?{Ft?=suE=4gi{z-M=2s4hhJ~ZVH!UoK@<9 ztcyk{fYBbpQ6Biex^j$BnB4;|vVjQqWJ2hcn!Y%z!_7x+U4308oad7K#%>Xs1_uVB zRzt-k)qkjiOJwvLV{RH>Reh9rpMS-zY^B`cJ6rp`f+#!dPd0nU=Q>q{5dRMaS5>^X zyQcZ3zf|V{H;N?UaVfo#U`$+PU}Ljq%Lk|7Q|=Cj43Aa?b4Pz}afi|d^;qV^{LWr+ zv!=fvkN^Dzxy+PM+piD$P|@9uUyM@0(Y8g^#uif2wC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?7-dO`33==Fd9}YFX=82t{1}35{%)P&4E^CqLl1GbUHQI1cXp`#5 zU>e}&YE2~+fECdJq)}Fi1&PPl*d?=44Sa>lr%+5N{;4R)8j4;c!YLcBy^%1h#OAkW zHr~uG(zt$qcu}+Dv-W6{n>e9Wc{p`xVn}W8I#iqY=U355(zZ+Kfu9+R zuR3)$61|uCy_TDnHW@S@4kjPuWJ4rT*Dlfonzj55l~i08;oQsmN1-MSZ4E|Zagd#? zA!oS{3AI@aDv&`d+4)*}z&>6}u8I5%;n*e7I)R_6uD_#R zEkUbTnd3@T0Gy%F^(Ku+56+tAqzC6rqtS!2q?zi$InpHc;B0AudT@6GzsCxLEq?F3 zI`R1ViNuJdrfwXpxZ4OD0*R?X|MTVVh^ft4mLb2IoME|y?p5g3Z-w&Jt@H#{x55J+ zh43iy`5$^K6qO{WJj6;&F0r!+g3oVRCZDp9YtG5K(C(=!+;MjXV*F(V( zZjk0kS&G!fu~cUDpc!ShW3PLT4E#zT$Zp_cF5s!_e|XxC)%bNY+B<@9BgFwO5P0qy ztSAOwn==YJ$4TBNS~4#XPe)2e-7pk8$S+e^aqf5CcinW4QfRgqS8zb^e5mSs`J7^v z&C^pr{TJ1u?3L)?j(!lR?(>@gGU>Qj*ro}Sl#fRzHd7Jk9|>g)^R zTyBQ2Ov6Ik>z^$pZ7=i*ul24CL0NoyPUKZO&GgoX*g~_5jHbb_I#`R%d2H^&+o4g* zE4<8f;+)2*0-V9S+jY_29e`eStE(m4tpo$&_Xxjv!pNT}5ps5JTU<45N zH-zpAL2=Glqp8sR!Pkr%IMiJv*DTSQ02QHoTn|9M)CL716@ZQ!gym`zz~DjC&(R|m z%@-OZc!ajr<3VwzLD(Mp27I0FZ~p-JZ eclassifiers) _builder.append("\n"); _builder.newLineIfNotEmpty(); { - for(final EEnum enumerator : enums) { - CharSequence _enumOverview = this.toEnumOverview(enumerator); - _builder.append(_enumOverview); - _builder.newLineIfNotEmpty(); - _builder.append("\n"); - _builder.newLineIfNotEmpty(); - _builder.append("\n"); - _builder.newLineIfNotEmpty(); + boolean _isEmpty = enums.isEmpty(); + if (_isEmpty) { + _builder.append("None."); + _builder.newLine(); + } else { + { + for(final EEnum enumerator : enums) { + CharSequence _enumOverview = this.toEnumOverview(enumerator); + _builder.append(_enumOverview); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } } } _xblockexpression = _builder; @@ -134,7 +143,7 @@ public CharSequence toEClassifierOverview(final EList eclassifiers) public CharSequence toEnumOverview(final EEnum enumerator) { StringConcatenation _builder = new StringConcatenation(); - _builder.append("### "); + _builder.append("### Enumerator: "); String _name = enumerator.getName(); _builder.append(_name); _builder.newLineIfNotEmpty(); @@ -190,7 +199,7 @@ public CharSequence toLiteralOverview(final EList literals) { public CharSequence toClassOverview(final EClass eclass) { StringConcatenation _builder = new StringConcatenation(); - _builder.append("### "); + _builder.append("### Class: "); String _name = eclass.getName(); _builder.append(_name); _builder.newLineIfNotEmpty(); @@ -294,4 +303,31 @@ public String toModelElementDescription(final EModelElement element) { } return "None."; } + + @Override + public CharSequence generateDocumentation(final EPackage ePackage, final EcoreToDocumentationOptions docGenOption) { + return this.generateMarkdownDoc(ePackage, docGenOption); + } + + @Override + public CharSequence generateDocumentation(final EClass eClass, final EcoreToDocumentationOptions docGenOption) { + CharSequence _xblockexpression = null; + { + boolean _equals = EcoreToDocumentationOptions.MARKDOWN_WITH_MERMAID_CLASS_DIAGRAM.equals(docGenOption); + if (_equals) { + MermaidClassDiagramCodeGen _mermaidClassDiagramCodeGen = new MermaidClassDiagramCodeGen(); + this.classDiagramCodeGen = _mermaidClassDiagramCodeGen; + this.diagramStartSyntax = "```mermaid"; + } else { + boolean _equals_1 = EcoreToDocumentationOptions.MARKDOWN_WITH_PLANTUML_CLASS_DIAGRAM.equals(docGenOption); + if (_equals_1) { + PlantumlClassDiagramCodeGen _plantumlClassDiagramCodeGen = new PlantumlClassDiagramCodeGen(); + this.classDiagramCodeGen = _plantumlClassDiagramCodeGen; + this.diagramStartSyntax = "```plantuml"; + } + } + _xblockexpression = this.toClassOverview(eClass); + } + return _xblockexpression; + } } diff --git a/org.gecko.emf.util.documentation.generators.mermaid/bnd.bnd b/org.gecko.emf.util.documentation.generators.mermaid/bnd.bnd index f3e5686e..1aa7917b 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid/bnd.bnd +++ b/org.gecko.emf.util.documentation.generators.mermaid/bnd.bnd @@ -5,7 +5,6 @@ Bundle-Version: 1.0.0-SNAPSHOT src.xtend-gen=xtend-gen -buildpath: \ - org.eclipse.xtext.builder,\ org.eclipse.xtext.xbase.lib,\ org.gecko.emf.util.documentation.generators.apis;version=latest diff --git a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidCodeGen.xtend b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend similarity index 97% rename from org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidCodeGen.xtend rename to org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend index cb6815ec..9d76724e 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend @@ -9,7 +9,7 @@ import org.eclipse.emf.ecore.EPackage import org.eclipse.emf.ecore.EReference import org.gecko.emf.util.documentation.generators.apis.EcoreToClassDiagramCodeGenerator -class MermaidCodeGen implements EcoreToClassDiagramCodeGenerator{ +class MermaidClassDiagramCodeGen implements EcoreToClassDiagramCodeGenerator{ def toMermaidClassDiagram(EPackage epackage) ''' diff --git a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.MermaidClassDiagramCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.MermaidClassDiagramCodeGen.xtendbin new file mode 100644 index 0000000000000000000000000000000000000000..a96a998c32a49543f78aea3204c4950f83775833 GIT binary patch literal 6621 zcmaKxWl$WZ!F?CPLU0H!i@Pmuf#4c~OLl`3f(C~m z0dn4)x>f)8oVxe+Ow~+(n5XB{ub%4G24i9Y(D3l^(15S4^wItmPyV^vx!LpEc)0u6 zx%+t6nc#=e>(flrccJn$nj~^ES}wO6cFTuZb=C63oJ@30O@bR^F;Z7iwtL4@e)gjK zEIfrP63Qx#PbRwqn^C2z(0jOHyl$N2pOAna1oZdm zZP@zZsAcCzk4$efT*)OfV?%sF|#l;jMux`)=OLOu%GkbPr z4yDVQ=tNzXU*mXbT~(|;O`Dm(GH(?_t>0ozONy|jkf~aWPL!Ju)+@u-*w>{m_QsuO zdCCNr!gE|eW|E5%x`NH~&*G2I&ATL7+m*Gtw_oVG_+Pr#97P=1Nl4gd9A?ypZ^-(Z zP?FZW&F{bt=JVHWvmvXkIA6SsHPewvov|y#c22>Q)_$*rY}y=1mhG11kRNT58hss^ zKb#dBWYh`u=Y-~ae1uS>`q`TiZtKqyUD(=bLi(x}4nToFSa=+2AAIS2B1t6-47P7$ zo6zjn(KTy~-r)b%9z&xIEmBRHld+ayN&#qp5;&zA>g^~sa zHle47RSY2jo?v+KSk8Xp%+T5PcS_}1BU+&1Ode-gqb96(w|@|u=v!$J_=638X0u+T zZ&IX-(5S%c?TpKuszXX(g8Osm{A` zvVETCh~hHLSjR4S+UL1@=LS=tkb5)46DOf*>Q^3zCw`J4xVq`3+MB5+bs1H)&*vBD z;0gm$BgHr0NiBKHD3V^;!r&Fd@;fvnrIJ2xRUHfHH`FiM;PgI zbA(QOx$*9akQtcc>QZ2gkG=}q_Zccpn$~t5t`+&v>BYls75OW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#2{4@S1r;=?Z>93xp}PwsVWtT`c5PpeRpgGbahPv8g@>v-eO0SqD> zemy(!A7~qdRv;QT;`IE0DoB}sx@Ooc%kZf`fcrbToo}$C9DUMZcm^a(WAaSQ% zcuXAdmp3v4^LR`w_viyB6#1YV#err#DHty4GxB`J8@7Q_vS(xnRx^$ej7{22G^?c3 zAQ&A?i$z-N=E*<>eu2sj-)0=1C36VPCK!fG_Lz3MiwAvq1BUf7--`@bl08ywdf-_q z-VkiE!0IV_Vor$$+DRW1PoEF8<3p2983z2x9>d?_Y%<~hi9gkXK|wc+n`E#Pibu*# zTo_d4ru~%nC-g6YkW#;$USXl3O)>r@5IP0`?LQ-te_NNo4Emq(?*YmGe)(^%{k1m# r39o;w(ErWo{BMPS|LcF&PWngi-!#+)W8?hQ$NXot{d1Dh{LTIgs)25t literal 0 HcmV?d00001 diff --git a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.gitignore b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.gitignore index d939a34c..fe486929 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.gitignore +++ b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.gitignore @@ -4,3 +4,4 @@ /.MermaidCodeGen.xtendbin /MarkdownCodeGen.java /MermaidCodeGen.java +/.MermaidClassDiagramCodeGen.java._trace diff --git a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java new file mode 100644 index 00000000..1d49c895 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java @@ -0,0 +1,299 @@ +package org.gecko.emf.util.documentation.generators.mermaid; + +import java.util.List; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EEnumLiteral; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.xtend2.lib.StringConcatenation; +import org.eclipse.xtext.xbase.lib.Functions.Function1; +import org.eclipse.xtext.xbase.lib.IterableExtensions; +import org.gecko.emf.util.documentation.generators.apis.EcoreToClassDiagramCodeGenerator; + +@SuppressWarnings("all") +public class MermaidClassDiagramCodeGen implements EcoreToClassDiagramCodeGenerator { + public CharSequence toMermaidClassDiagram(final EPackage epackage) { + StringConcatenation _builder = new StringConcatenation(); + CharSequence _startMermaidClassDiagram = this.startMermaidClassDiagram(); + _builder.append(_startMermaidClassDiagram); + _builder.newLineIfNotEmpty(); + CharSequence _eClassifierDiagram = this.toEClassifierDiagram(epackage.getEClassifiers()); + _builder.append(_eClassifierDiagram); + _builder.newLineIfNotEmpty(); + return _builder; + } + + public CharSequence startMermaidClassDiagram() { + StringConcatenation _builder = new StringConcatenation(); + _builder.append("classDiagram"); + _builder.newLine(); + return _builder; + } + + public CharSequence toEClassifierDiagram(final EList eclassifiers) { + CharSequence _xblockexpression = null; + { + final Function1 _function = (EClassifier ec) -> { + return Boolean.valueOf((ec instanceof EClass)); + }; + final Function1 _function_1 = (EClassifier ec) -> { + return ((EClass) ec); + }; + List classes = IterableExtensions.toList(IterableExtensions.map(IterableExtensions.filter(eclassifiers, _function), _function_1)); + final Function1 _function_2 = (EClassifier ec) -> { + return Boolean.valueOf((ec instanceof EEnum)); + }; + final Function1 _function_3 = (EClassifier ec) -> { + return ((EEnum) ec); + }; + List enums = IterableExtensions.toList(IterableExtensions.map(IterableExtensions.filter(eclassifiers, _function_2), _function_3)); + StringConcatenation _builder = new StringConcatenation(); + { + for(final EClass eclass : classes) { + CharSequence _classDiagram = this.toClassDiagram(eclass); + _builder.append(_classDiagram); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } + { + for(final EEnum enumerator : enums) { + CharSequence _enumerator = this.toEnumerator(enumerator); + _builder.append(_enumerator); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } + _xblockexpression = _builder; + } + return _xblockexpression; + } + + public CharSequence toClassDiagram(final EClass eclass) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append(" "); + _builder.append("class "); + String _name = eclass.getName(); + _builder.append(_name); + _builder.append(" {"); + _builder.newLineIfNotEmpty(); + { + boolean _isInterface = eclass.isInterface(); + if (_isInterface) { + _builder.append(" <>"); + _builder.newLineIfNotEmpty(); + } else { + boolean _isAbstract = eclass.isAbstract(); + if (_isAbstract) { + _builder.append(" <>"); + _builder.newLineIfNotEmpty(); + } + } + } + CharSequence _classMembers = this.toClassMembers(eclass); + _builder.append(_classMembers); + _builder.newLineIfNotEmpty(); + _builder.append("}"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + CharSequence _classReferences = this.toClassReferences(eclass); + _builder.append(_classReferences); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + { + boolean _isEmpty = eclass.getESuperTypes().isEmpty(); + boolean _not = (!_isEmpty); + if (_not) { + CharSequence _superTypes = this.toSuperTypes(eclass); + _builder.append(_superTypes); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } + return _builder; + } + + public CharSequence toClassMembers(final EClass eclass) { + StringConcatenation _builder = new StringConcatenation(); + { + EList _eAttributes = eclass.getEAttributes(); + for(final EAttribute attribute : _eAttributes) { + _builder.append(" "); + String _name = attribute.getEType().getName(); + _builder.append(_name); + _builder.append(" "); + String _name_1 = attribute.getName(); + _builder.append(_name_1); + _builder.newLineIfNotEmpty(); + } + } + return _builder; + } + + public CharSequence toClassReferences(final EClass eclass) { + StringConcatenation _builder = new StringConcatenation(); + { + EList _eReferences = eclass.getEReferences(); + for(final EReference ref : _eReferences) { + CharSequence _classRef = this.toClassRef(eclass, ref); + _builder.append(_classRef); + _builder.newLineIfNotEmpty(); + } + } + return _builder; + } + + public CharSequence toClassRef(final EClass eclass, final EReference ref) { + CharSequence _xblockexpression = null; + { + String multiplicity = this.extractMultiplicity(ref.getLowerBound(), ref.getUpperBound()); + String refType = this.extractRefType(ref, eclass); + boolean isInRefModel = this.isInRefModel(ref, eclass); + StringConcatenation _builder = new StringConcatenation(); + { + if (isInRefModel) { + _builder.append(" "); + String _name = eclass.getName(); + _builder.append(_name); + _builder.append(" "); + _builder.append(" ..> "); + _builder.append(" "); + _builder.append("\""); + _builder.append(multiplicity); + _builder.append("\""); + _builder.append(" "); + _builder.append(refType); + _builder.append(" : "); + String _name_1 = ref.getName(); + _builder.append(_name_1); + _builder.newLineIfNotEmpty(); + } else { + _builder.append(" "); + String _name_2 = eclass.getName(); + _builder.append(_name_2); + _builder.append(" "); + _builder.append(" --> "); + _builder.append(" "); + _builder.append("\""); + _builder.append(multiplicity); + _builder.append("\""); + _builder.append(" "); + _builder.append(refType); + _builder.append(" : "); + String _name_3 = ref.getName(); + _builder.append(_name_3); + _builder.newLineIfNotEmpty(); + } + } + _xblockexpression = _builder; + } + return _xblockexpression; + } + + public String extractRefType(final EReference ref, final EClass containerClass) { + String _name = ref.getEType().getEPackage().getName(); + String _name_1 = containerClass.getEPackage().getName(); + boolean _tripleEquals = (_name == _name_1); + if (_tripleEquals) { + return ref.getEType().getName(); + } else { + return ref.getEType().getName(); + } + } + + public boolean isInRefModel(final EReference ref, final EClass containerClass) { + String _name = ref.getEType().getEPackage().getName(); + String _name_1 = containerClass.getEPackage().getName(); + boolean _tripleEquals = (_name == _name_1); + if (_tripleEquals) { + return false; + } else { + return true; + } + } + + public String extractMultiplicity(final int lowerBound, final int upperBound) { + if (((lowerBound == 0) && (upperBound == (-1)))) { + return "*"; + } else { + if (((lowerBound == 1) && (upperBound == (-1)))) { + return "1..*"; + } + } + String _valueOf = String.valueOf(lowerBound); + String _plus = (_valueOf + ".."); + String _valueOf_1 = String.valueOf(upperBound); + return (_plus + _valueOf_1); + } + + public CharSequence toSuperTypes(final EClass eclass) { + StringConcatenation _builder = new StringConcatenation(); + { + EList _eSuperTypes = eclass.getESuperTypes(); + for(final EClass parent : _eSuperTypes) { + _builder.append(" "); + String _name = eclass.getName(); + _builder.append(_name); + _builder.append(" ..> "); + String _name_1 = parent.getName(); + _builder.append(_name_1); + _builder.newLineIfNotEmpty(); + } + } + return _builder; + } + + public CharSequence toEnumerator(final EEnum enumerator) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append(" "); + _builder.append("class "); + String _name = enumerator.getName(); + _builder.append(_name); + _builder.append(" {"); + _builder.newLineIfNotEmpty(); + _builder.append(" <>"); + _builder.newLineIfNotEmpty(); + { + EList _eLiterals = enumerator.getELiterals(); + for(final EEnumLiteral value : _eLiterals) { + _builder.append(" "); + String _name_1 = value.getName(); + _builder.append(_name_1); + _builder.newLineIfNotEmpty(); + } + } + _builder.append("}"); + _builder.newLine(); + return _builder; + } + + @Override + public CharSequence generateClassDiagram(final EPackage ePackage) { + return this.toMermaidClassDiagram(ePackage); + } + + @Override + public CharSequence generateClassDiagram(final EClass eClass) { + StringConcatenation _builder = new StringConcatenation(); + CharSequence _startMermaidClassDiagram = this.startMermaidClassDiagram(); + _builder.append(_startMermaidClassDiagram); + _builder.newLineIfNotEmpty(); + CharSequence _classDiagram = this.toClassDiagram(eClass); + _builder.append(_classDiagram); + _builder.newLineIfNotEmpty(); + return _builder; + } +} diff --git a/org.gecko.emf.util.documentation.generators.plantuml/bnd.bnd b/org.gecko.emf.util.documentation.generators.plantuml/bnd.bnd index ad7ce709..1121c1fb 100644 --- a/org.gecko.emf.util.documentation.generators.plantuml/bnd.bnd +++ b/org.gecko.emf.util.documentation.generators.plantuml/bnd.bnd @@ -5,7 +5,6 @@ Bundle-Version: 1.0.0-SNAPSHOT src.xtend-gen=xtend-gen -buildpath: \ - org.eclipse.xtext.builder,\ org.eclipse.xtext.xbase.lib,\ org.gecko.emf.util.documentation.generators.apis;version=latest diff --git a/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlCodeGen.xtend b/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.xtend similarity index 97% rename from org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlCodeGen.xtend rename to org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.xtend index 2e4964bf..a6c94ffc 100644 --- a/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.xtend @@ -12,7 +12,7 @@ import org.eclipse.emf.ecore.EPackage import org.eclipse.emf.ecore.EReference import org.gecko.emf.util.documentation.generators.apis.EcoreToClassDiagramCodeGenerator -class PlantumlCodeGen implements EcoreToClassDiagramCodeGenerator{ +class PlantumlClassDiagramCodeGen implements EcoreToClassDiagramCodeGenerator{ def toPlantumlClassDiagram(EPackage epackage) ''' «startPlantumlClassDiagram()» @@ -37,13 +37,9 @@ var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | e ''' «FOR eclass: classes» «toClassDiagram(eclass)» -«"\n"» -«"\n"» «ENDFOR» «FOR enumerator: enums» «toEnumerator(enumerator)» -«"\n"» -«"\n"» «ENDFOR» ''' } diff --git a/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.PlantumlClassDiagramCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.PlantumlClassDiagramCodeGen.xtendbin new file mode 100644 index 0000000000000000000000000000000000000000..962f2152fd9d5cb16758e0d4ed9b5aeaccce7423 GIT binary patch literal 7722 zcmaKxRa6{G)2;^}TnD${?i!o`!68U+88o=N26uONcMlfaf&_ONoZu1|{Oo=8f8W2( zIn@{4)vK$zub%aGm8t?9JRSfD1Ogb#jEjT7w^}O&|%&HI>$u;&id}x&oCV4d?}~c8?idhZ`odtZwzq zVYOr=j^Ftq2xI4+kX_v_Gp!s_4BlfG_kowH3#C_~?*a8B0lzf-$`f=hJ^l4wmctNB z3qKTAMan2y$+E=Phr}Y_8c(5Z=doW5FW%nE^F4kBoQDyQ zJQQ3~M(*(G`CAt21xh7a1+%V`TvE&8zS;Ne1)m|bI;}8i*ewEfUhkYh$S<}e{IoR3 zX=lXiH`So7Q6{_vv%L4Y(n{8ZAN;9ybpj$HXP(MG)g51Yl(O6B|N4nUwjdpp7(2kb zP2c%e?=H`ul(-Hf_Tdnl1ZZZbojXMzSgQtwBv)BIpH;yP1SLS zR6|{qr(jvXFFJ~L+?Bwc;^7&aam;g@X|}<#&8bw2k#^$04V#I86xAG^F*_y}}UgPseQt1*Nyws6eq=`jkHHoSBn?JZUZ;R<` zVM8>J5^v1}B`TSUL5-CzGiJz0!ik)MxQ+tEl1Op7K9Nq4mO>{Dm=lB11M{%#op!mj z5OxSMwPXQ;jd0fVI)LsrM_+=C*8^?VjWDuw3r}<>*lx|A`uh&dG8I$>oxNo%Ha>yJ z!AZ{LpS~^rts0a#OucfEBKtwKp9rWVsx-!3C9O^|BZ*!mR+q9JnQ}~-Z0VORf3z2= zGk*Ify&U%iCj;mSrKskq`s3867!7Ws{LcG9Z{!#Z*Ib6IO_$iO81>Bpv#%5#S1O@j zW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P2z!7>XODnubWv}T?z=I0UBnE%-Pn4u#dRz1 zy*2j|Ow;7A89s*){MKW?$8}rLKatv9Yib-v`)b88fl^(=F~L+_!zG`rnH4iOs~+@e!D#c*2FG|fQv^~5Z-I8#0&b_iXOane~gc$qk-ZNP>(r)|QfI%jFWm9D(i zvv%0Zrn_y#>Rdadd`R#EUtFN{N7y{2JS6HbXXGF?W*8$<pPkQ_2l^+g?Mfxf97`nGpzR9M?tm5%MV>8O zIIpJQWz7Wph-J-0`wXLC>n&ama~ns`-#Z6_{GKMMtQvZLbeXfzxeDv_uu64eI^8O4 z|4Qf!UfRS&qk*EG3JaME%ldRan#fSWC0Cyh^~-I9e--aIn181Z~?CMUVC>}4ueDe0np5Y z!LgEjk=h|DtDfa%u$Jmv$J|;<%a%7pxRP;^Ovo*3nZ+x!mgPLc@VAVX%@FPKZcCBh zIFWOC^yCz6fFE15ue$w%J{=mSN-&2$ck&fRh~2;^pioFSwx}!=YoHyg7X%R;2*>V? zy#fy0hFnTPfskV0wzMZ6#5Cmc6Vz}3lhQZG5gUSp%ue}&1^JBapK-+&LP6~d3y~i1 zdoX!g#DSQHP|*A0K&;u9_%%>6#bCeR0f$~7gu|yT1qys9r{umHT;LpIT z+mKOgQ57g{h!M>T$^bjAKRQGU`RDhm(~xB>|Kuz90RrI9*eksdcB&T)2+qJIjz0zD z0T>W*g%m=M{T6XW4-8O*x`c?)3Wr`1g#46*DhzB>zVJd6fB_1g>;v1lZ^#e|yZ05lO039Fx|gKy0Ecg` A761SM literal 0 HcmV?d00001 diff --git a/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.gitignore b/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.gitignore index a81ae4f4..a0ee9026 100644 --- a/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.gitignore +++ b/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.gitignore @@ -1,3 +1,4 @@ /.PlantumlCodeGen.java._trace /.PlantumlCodeGen.xtendbin /PlantumlCodeGen.java +/.PlantumlClassDiagramCodeGen.java._trace diff --git a/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.java b/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.java new file mode 100644 index 00000000..96fcff82 --- /dev/null +++ b/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.java @@ -0,0 +1,403 @@ +package org.gecko.emf.util.documentation.generators.plantuml; + +import java.util.List; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.EMap; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EEnumLiteral; +import org.eclipse.emf.ecore.EModelElement; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.xtend2.lib.StringConcatenation; +import org.eclipse.xtext.xbase.lib.Functions.Function1; +import org.eclipse.xtext.xbase.lib.IterableExtensions; +import org.gecko.emf.util.documentation.generators.apis.EcoreToClassDiagramCodeGenerator; + +@SuppressWarnings("all") +public class PlantumlClassDiagramCodeGen implements EcoreToClassDiagramCodeGenerator { + public CharSequence toPlantumlClassDiagram(final EPackage epackage) { + StringConcatenation _builder = new StringConcatenation(); + CharSequence _startPlantumlClassDiagram = this.startPlantumlClassDiagram(); + _builder.append(_startPlantumlClassDiagram); + _builder.newLineIfNotEmpty(); + CharSequence _eClassifierDiagram = this.toEClassifierDiagram(epackage.getEClassifiers()); + _builder.append(_eClassifierDiagram); + _builder.newLineIfNotEmpty(); + CharSequence _endPlantumlClassDiagram = this.endPlantumlClassDiagram(); + _builder.append(_endPlantumlClassDiagram); + _builder.newLineIfNotEmpty(); + return _builder; + } + + public CharSequence startPlantumlClassDiagram() { + StringConcatenation _builder = new StringConcatenation(); + _builder.append("@startuml"); + _builder.newLine(); + return _builder; + } + + public CharSequence endPlantumlClassDiagram() { + StringConcatenation _builder = new StringConcatenation(); + _builder.append("@enduml"); + _builder.newLine(); + return _builder; + } + + public CharSequence toEClassifierDiagram(final EList eclassifiers) { + CharSequence _xblockexpression = null; + { + final Function1 _function = (EClassifier ec) -> { + return Boolean.valueOf((ec instanceof EClass)); + }; + final Function1 _function_1 = (EClassifier ec) -> { + return ((EClass) ec); + }; + List classes = IterableExtensions.toList(IterableExtensions.map(IterableExtensions.filter(eclassifiers, _function), _function_1)); + final Function1 _function_2 = (EClassifier ec) -> { + return Boolean.valueOf((ec instanceof EEnum)); + }; + final Function1 _function_3 = (EClassifier ec) -> { + return ((EEnum) ec); + }; + List enums = IterableExtensions.toList(IterableExtensions.map(IterableExtensions.filter(eclassifiers, _function_2), _function_3)); + StringConcatenation _builder = new StringConcatenation(); + { + for(final EClass eclass : classes) { + CharSequence _classDiagram = this.toClassDiagram(eclass); + _builder.append(_classDiagram); + _builder.newLineIfNotEmpty(); + } + } + { + for(final EEnum enumerator : enums) { + CharSequence _enumerator = this.toEnumerator(enumerator); + _builder.append(_enumerator); + _builder.newLineIfNotEmpty(); + } + } + _xblockexpression = _builder; + } + return _xblockexpression; + } + + public CharSequence toClassDiagram(final EClass eclass) { + StringConcatenation _builder = new StringConcatenation(); + { + boolean _isInterface = eclass.isInterface(); + if (_isInterface) { + _builder.append(" "); + _builder.append("interface "); + String _name = eclass.getName(); + _builder.append(_name); + _builder.append(" {"); + _builder.newLineIfNotEmpty(); + } else { + boolean _isAbstract = eclass.isAbstract(); + if (_isAbstract) { + _builder.append(" "); + _builder.append("abstract class "); + String _name_1 = eclass.getName(); + _builder.append(_name_1); + _builder.append(" {"); + _builder.newLineIfNotEmpty(); + } else { + _builder.append(" "); + _builder.append("class "); + String _name_2 = eclass.getName(); + _builder.append(_name_2); + _builder.append(" {"); + _builder.newLineIfNotEmpty(); + } + } + } + CharSequence _classMembers = this.toClassMembers(eclass); + _builder.append(_classMembers); + _builder.newLineIfNotEmpty(); + _builder.append("}"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + CharSequence _onTopDescription = this.toOnTopDescription(eclass); + _builder.append(_onTopDescription); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + CharSequence _classReferences = this.toClassReferences(eclass); + _builder.append(_classReferences); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + { + boolean _isEmpty = eclass.getESuperTypes().isEmpty(); + boolean _not = (!_isEmpty); + if (_not) { + CharSequence _superTypes = this.toSuperTypes(eclass); + _builder.append(_superTypes); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + } + } + return _builder; + } + + public CharSequence toClassMembers(final EClass eclass) { + StringConcatenation _builder = new StringConcatenation(); + { + EList _eAttributes = eclass.getEAttributes(); + for(final EAttribute attribute : _eAttributes) { + _builder.append(" "); + String _name = attribute.getName(); + _builder.append(_name); + _builder.append(" : "); + String _name_1 = attribute.getEType().getName(); + _builder.append(_name_1); + _builder.append(" "); + _builder.newLineIfNotEmpty(); + } + } + return _builder; + } + + public CharSequence toClassReferences(final EClass eclass) { + StringConcatenation _builder = new StringConcatenation(); + { + EList _eReferences = eclass.getEReferences(); + for(final EReference ref : _eReferences) { + CharSequence _classRef = this.toClassRef(eclass, ref); + _builder.append(_classRef); + _builder.newLineIfNotEmpty(); + } + } + return _builder; + } + + public CharSequence toClassRef(final EClass eclass, final EReference ref) { + CharSequence _xblockexpression = null; + { + String multiplicity = this.extractMultiplicity(ref.getLowerBound(), ref.getUpperBound()); + boolean isInRefModel = this.isInRefModel(ref, eclass); + StringConcatenation _builder = new StringConcatenation(); + { + if (isInRefModel) { + CharSequence _createRefPackage = this.createRefPackage(ref); + _builder.append(_createRefPackage); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _builder.append(" "); + String _name = eclass.getName(); + _builder.append(_name); + _builder.append(" "); + _builder.append(" ..> "); + _builder.append(" "); + _builder.append("\""); + _builder.append(multiplicity); + _builder.append("\""); + _builder.append(" "); + String _name_1 = ref.getEType().getName(); + _builder.append(_name_1); + _builder.append(" : "); + String _name_2 = ref.getName(); + _builder.append(_name_2); + _builder.newLineIfNotEmpty(); + } else { + _builder.append(" "); + String _name_3 = eclass.getName(); + _builder.append(_name_3); + _builder.append(" "); + _builder.append(" --> "); + _builder.append(" "); + _builder.append("\""); + _builder.append(multiplicity); + _builder.append("\""); + _builder.append(" "); + String _name_4 = ref.getEType().getName(); + _builder.append(_name_4); + _builder.append(" : "); + String _name_5 = ref.getName(); + _builder.append(_name_5); + _builder.newLineIfNotEmpty(); + } + } + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + _xblockexpression = _builder; + } + return _xblockexpression; + } + + public CharSequence createRefPackage(final EReference ref) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append(" "); + _builder.append("package \""); + String _nsURI = ref.getEType().getEPackage().getNsURI(); + _builder.append(_nsURI); + _builder.append("\" #DDDDDD {"); + _builder.newLineIfNotEmpty(); + _builder.append(" "); + String _name = ref.getEType().getName(); + _builder.append(_name); + _builder.append(" : "); + String _name_1 = ref.getName(); + _builder.append(_name_1); + _builder.newLineIfNotEmpty(); + _builder.append("}"); + _builder.newLine(); + return _builder; + } + + public boolean isInRefModel(final EReference ref, final EClass containerClass) { + String _name = ref.getEType().getEPackage().getName(); + String _name_1 = containerClass.getEPackage().getName(); + boolean _tripleEquals = (_name == _name_1); + if (_tripleEquals) { + return false; + } else { + return true; + } + } + + public String extractMultiplicity(final int lowerBound, final int upperBound) { + if (((lowerBound == 0) && (upperBound == (-1)))) { + return "*"; + } else { + if (((lowerBound == 1) && (upperBound == (-1)))) { + return "1..*"; + } + } + String _valueOf = String.valueOf(lowerBound); + String _plus = (_valueOf + ".."); + String _valueOf_1 = String.valueOf(upperBound); + return (_plus + _valueOf_1); + } + + public CharSequence toSuperTypes(final EClass eclass) { + StringConcatenation _builder = new StringConcatenation(); + { + EList _eSuperTypes = eclass.getESuperTypes(); + for(final EClass parent : _eSuperTypes) { + _builder.append(" "); + String _name = eclass.getName(); + _builder.append(_name); + _builder.append(" ..> "); + String _name_1 = parent.getName(); + _builder.append(_name_1); + _builder.newLineIfNotEmpty(); + } + } + return _builder; + } + + public CharSequence toEnumerator(final EEnum enumerator) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append(" "); + _builder.append("enum "); + String _name = enumerator.getName(); + _builder.append(_name); + _builder.append(" {"); + _builder.newLineIfNotEmpty(); + { + EList _eLiterals = enumerator.getELiterals(); + for(final EEnumLiteral value : _eLiterals) { + _builder.append(" "); + String _name_1 = value.getName(); + _builder.append(_name_1); + _builder.newLineIfNotEmpty(); + } + } + _builder.append("}"); + _builder.newLine(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + CharSequence _onTopDescription = this.toOnTopDescription(enumerator); + _builder.append(_onTopDescription); + _builder.newLineIfNotEmpty(); + _builder.append("\n"); + _builder.newLineIfNotEmpty(); + return _builder; + } + + public CharSequence toOnTopDescription(final EClassifier eclassifier) { + CharSequence _xblockexpression = null; + { + String description = this.toModelElementDescription(eclassifier); + CharSequence _xifexpression = null; + if ((description != "None.")) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append("note top of "); + String _name = eclassifier.getName(); + _builder.append(_name); + _builder.newLineIfNotEmpty(); + _builder.append(" "); + _builder.append(description); + _builder.newLineIfNotEmpty(); + _builder.append("end note"); + _builder.newLine(); + _xifexpression = _builder; + } + _xblockexpression = _xifexpression; + } + return _xblockexpression; + } + + public String toModelElementDescription(final EModelElement element) { + EList _eAnnotations = element.getEAnnotations(); + for (final EAnnotation annotation : _eAnnotations) { + { + EMap details = annotation.getDetails(); + boolean _containsKey = details.containsKey("documentation"); + if (_containsKey) { + String descr = details.get("documentation").replace("\n", "").trim(); + int _length = descr.length(); + boolean _greaterThan = (_length > 30); + if (_greaterThan) { + String[] splitStr = descr.split(" "); + int counter = 0; + descr = ""; + for (final String sp : splitStr) { + { + int _counter = counter; + int _length_1 = sp.length(); + counter = (_counter + _length_1); + String _descr = descr; + descr = (_descr + (" " + sp)); + if ((counter > 30)) { + String _descr_1 = descr; + descr = (_descr_1 + " \n"); + counter = 0; + } + } + } + } + return descr.trim(); + } + } + } + return "None."; + } + + @Override + public CharSequence generateClassDiagram(final EPackage ePackage) { + return this.toPlantumlClassDiagram(ePackage); + } + + @Override + public CharSequence generateClassDiagram(final EClass eClass) { + StringConcatenation _builder = new StringConcatenation(); + CharSequence _startPlantumlClassDiagram = this.startPlantumlClassDiagram(); + _builder.append(_startPlantumlClassDiagram); + _builder.newLineIfNotEmpty(); + CharSequence _classDiagram = this.toClassDiagram(eClass); + _builder.append(_classDiagram); + _builder.newLineIfNotEmpty(); + CharSequence _endPlantumlClassDiagram = this.endPlantumlClassDiagram(); + _builder.append(_endPlantumlClassDiagram); + _builder.newLineIfNotEmpty(); + return _builder; + } +} From d5c37dbe1fad65801c0e65cbad66ec011da3dbb9 Mon Sep 17 00:00:00 2001 From: Ilenia Salvadori Date: Tue, 1 Nov 2022 11:08:02 +0100 Subject: [PATCH 10/21] updated bnd version in gradle.properties Signed-off-by: Ilenia Salvadori --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index a9503cfa..8a0bbbbe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -bnd_version=6.3.0-RC1 +bnd_version=6.3.1 bnd_snapshots=https://bndtools.jfrog.io/ui/native/libs-release/ From b058b7fd5aa6cf05cefd16006bab2e064308a3d5 Mon Sep 17 00:00:00 2001 From: Ilenia Salvadori Date: Tue, 1 Nov 2022 11:36:47 +0100 Subject: [PATCH 11/21] added/updated license Signed-off-by: Ilenia Salvadori --- .../org.eclipse.core.resources.prefs | 1 - .../EcoreToClassDiagramCodeGenerator.java | 4 +- .../EcoreToDocumentationCodeGenerator.java | 4 +- .../apis/EcoreToDocumentationOptions.java | 4 +- .../apis/EcoreToDocumentationService.java | 6 +- .../apis/EcoreToDocumentationServiceOld.java | 75 ------------------ .../html/component/EcoreToHtmlComponent.java | 6 +- .../generators/html/HtmlCodeGen.xtend | 11 +++ .../generators/html/.HtmlCodeGen.xtendbin | Bin 8426 -> 8426 bytes .../generators/html/HtmlCodeGen.java | 11 +++ .../component/EcoreToMarkdownComponent.java | 4 +- .../generators/markdown/MarkdownCodeGen.xtend | 11 +++ .../markdown/.MarkdownCodeGen.xtendbin | Bin 7340 -> 7340 bytes .../generators/markdown/MarkdownCodeGen.java | 11 +++ .../mermaid/MermaidClassDiagramCodeGen.xtend | 11 +++ .../.MermaidClassDiagramCodeGen.xtendbin | Bin 6621 -> 6621 bytes .../mermaid/MermaidClassDiagramCodeGen.java | 11 +++ .../PlantumlClassDiagramCodeGen.xtend | 11 +++ .../.PlantumlClassDiagramCodeGen.xtendbin | Bin 7722 -> 7722 bytes .../plantuml/PlantumlClassDiagramCodeGen.java | 11 +++ 20 files changed, 102 insertions(+), 90 deletions(-) delete mode 100644 org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationServiceOld.java diff --git a/org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.core.resources.prefs b/org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.core.resources.prefs index cccce420..416633d8 100644 --- a/org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.core.resources.prefs +++ b/org.gecko.emf.util.documentation.generators.apis/.settings/org.eclipse.core.resources.prefs @@ -3,7 +3,6 @@ encoding//.settings/org.eclipse.core.resources.prefs=UTF-8 encoding//.settings/org.eclipse.jdt.core.prefs=UTF-8 encoding//.settings/org.eclipse.jdt.ui.prefs=UTF-8 encoding//src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java=UTF-8 -encoding//src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationServiceOld.java=UTF-8 encoding//src/org/gecko/emf/util/documentation/generators/apis/package-info.java=UTF-8 encoding//src/test/component/Example.java=UTF-8 encoding//test/test/component/ExampleTest.java=UTF-8 diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java index 6af32f8f..fc2d1a67 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java @@ -3,8 +3,8 @@ * All rights reserved. * * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v1.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java index b2f85bd0..8059a0a1 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java @@ -3,8 +3,8 @@ * All rights reserved. * * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v1.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java index 5d8d2e35..0e4a9a45 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java @@ -3,8 +3,8 @@ * All rights reserved. * * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v1.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java index aa5078f9..76516e06 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java @@ -1,10 +1,10 @@ /** - * Copyright (c) 2012 - 2018 Data In Motion and others. + * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v1.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationServiceOld.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationServiceOld.java deleted file mode 100644 index 2f70f331..00000000 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationServiceOld.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) 2012 - 2018 Data In Motion and others. - * All rights reserved. - * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v1.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Data In Motion - initial API and implementation - */ -package org.gecko.emf.util.documentation.generators.apis; - -import java.io.IOException; -import java.io.PrintWriter; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Objects; -import java.util.logging.Level; -import java.util.logging.Logger; - -import org.osgi.annotation.versioning.ProviderType; - -@ProviderType -public interface EcoreToDocumentationServiceOld{ - -// TODO as input we get already an EPackage or an EClass and it returns an OutputStream - - public static final String ECORE_FILE_EXTENSION = ".ecore"; - public static final Logger LOGGER = Logger.getLogger(EcoreToDocumentationServiceOld.class.getName()); - - String getOutputFileExtension(); - String getOutputFolder(EcoreToDocumentationOptions mode); - void doGenerateDocumentation(Path ecoreFilePath, EcoreToDocumentationOptions mode); - - default boolean canHandleFileFormat(String fileName) { - Objects.requireNonNull(fileName, "File name cannot be null!"); - if(fileName.endsWith(ECORE_FILE_EXTENSION)) { - return true; - } - return false; - } - - default void ecoreToDocumentation(String ecoreFilePath, EcoreToDocumentationOptions mode) { - Path path = Paths.get(ecoreFilePath); - if(Files.isDirectory(path)) { - try { - Files.list(path).filter(p -> Files.isRegularFile(p)).forEach(p -> doGenerateDocumentation(p, mode)); - } catch (IOException e) { - LOGGER.log(Level.SEVERE, "IOException while getting files from folder " + ecoreFilePath + " " + e.getMessage()); - } - - } else if(Files.isRegularFile(path)) { - doGenerateDocumentation(path, mode); - } - } - - default void generateOutputFile(Path ecoreFilePath, CharSequence generatedCharSeq, EcoreToDocumentationOptions mode) { - Path parentFolder = Paths.get(ecoreFilePath.toString()).getParent().getParent(); - String outputFileName = ecoreFilePath.getFileName().toString().replace(ECORE_FILE_EXTENSION, getOutputFileExtension()); - Path outputPath = Paths.get(parentFolder.toString(), getOutputFolder(mode), outputFileName); - try { - Files.deleteIfExists(outputPath); - Files.createDirectories(outputPath.getParent()); - Files.createFile(outputPath); - try(PrintWriter pw = new PrintWriter(outputPath.toFile())) { - pw.write(generatedCharSeq.toString()); - } - } catch (IOException e) { - e.printStackTrace(); - } - } - -} diff --git a/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java b/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java index 6be20ec1..96d16959 100644 --- a/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java +++ b/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java @@ -1,10 +1,10 @@ /** - * Copyright (c) 2012 - 2018 Data In Motion and others. + * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v1.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend b/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend index aca2dc21..f330a809 100644 --- a/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend @@ -1,3 +1,14 @@ +/** + * Copyright (c) 2012 - 2022 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ package org.gecko.emf.util.documentation.generators.html; import java.util.List diff --git a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.HtmlCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.HtmlCodeGen.xtendbin index 42ebb444598918ee3233f6005e3910af7e610d69..656ffc20b338de79b6fde34b2cc287d5145122f2 100644 GIT binary patch delta 58 zcmaFm_{xzdz?+#xgn@&DgP}8KBhLn5rp}nn`-HpLLA00j0~R1XSx3PFM5QS>fT$G; FP5=i>5;p(< delta 58 zcmaFm_{xzdz?+#xgn@&DgF!QRBhLn5Ce7f@`-HpLLA00j0~R1XSx3PFM5QS>fT$G; FP5{f055WKc diff --git a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java index 4a17a0b1..d44ad9f6 100644 --- a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java +++ b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java @@ -1,3 +1,14 @@ +/** + * Copyright (c) 2012 - 2022 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ package org.gecko.emf.util.documentation.generators.html; import java.util.List; diff --git a/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java b/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java index 27bc2c5d..1be428d6 100644 --- a/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java +++ b/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java @@ -3,8 +3,8 @@ * All rights reserved. * * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v1.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend b/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend index 0b0403ab..8ae6fe2c 100644 --- a/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend @@ -1,3 +1,14 @@ +/** + * Copyright (c) 2012 - 2022 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ package org.gecko.emf.util.documentation.generators.markdown; import java.util.List diff --git a/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin index f00954b2e8dff010e293251caaf7549b1277fcf8..62ce27f73dd3cbf24817192e16844467b63665ea 100644 GIT binary patch delta 58 zcmZ2uxyF(wz?+#xgn@&DgP|j4BhN%ZrjD4+^9Ap)g6LZDd=?-*`JJ={h|-X808v>o FP5|q$5vl+H delta 58 zcmZ2uxyF(wz?+#xgn@&DgF!QRBhN%ZCe7f@^9Ap)g6LZDd=?-*`JJ={h|-X808v>o FP5`i$4>|w< diff --git a/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.java b/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.java index 4545ca6a..274e2154 100644 --- a/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.java +++ b/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.java @@ -1,3 +1,14 @@ +/** + * Copyright (c) 2012 - 2022 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ package org.gecko.emf.util.documentation.generators.markdown; import java.util.List; diff --git a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend index 9d76724e..8afe8ff9 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend @@ -1,3 +1,14 @@ +/** + * Copyright (c) 2012 - 2022 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ package org.gecko.emf.util.documentation.generators.mermaid; import java.util.List diff --git a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.MermaidClassDiagramCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.MermaidClassDiagramCodeGen.xtendbin index a96a998c32a49543f78aea3204c4950f83775833..9dde524d25d9e236c153972fe5a8c9c07a37f5f8 100644 GIT binary patch delta 58 zcmca>eAk#Kz?+#xgn@&DgP|j4BTs<eAk#Kz?+#xgn@&DgFz*DBTs<(^b diff --git a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java index 1d49c895..1ca097a3 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java +++ b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java @@ -1,3 +1,14 @@ +/** + * Copyright (c) 2012 - 2022 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ package org.gecko.emf.util.documentation.generators.mermaid; import java.util.List; diff --git a/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.xtend b/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.xtend index a6c94ffc..e6c793f9 100644 --- a/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.xtend @@ -1,3 +1,14 @@ +/** + * Copyright (c) 2012 - 2022 Data In Motion and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html + * + * Contributors: + * Data In Motion - initial API and implementation + */ package org.gecko.emf.util.documentation.generators.plantuml; import java.util.List diff --git a/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.PlantumlClassDiagramCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.PlantumlClassDiagramCodeGen.xtendbin index 962f2152fd9d5cb16758e0d4ed9b5aeaccce7423..d1118a8f9eeefe7568c693946abdb7868c0e121b 100644 GIT binary patch delta 58 zcmZ2wv&x1iz?+#xgn@&DgP|j4BTtA3Q%B6^BoRFp5Isra28f=VBWnSomdQGRs28$M E0MHo`h5!Hn delta 58 zcmZ2wv&x1iz?+#xgn@&DgF!QRBTtA3lV Date: Tue, 1 Nov 2022 12:36:13 +0100 Subject: [PATCH 12/21] updated license header Signed-off-by: Ilenia Salvadori --- .licenserc.yaml | 1 + .../EMFBsonResourceFactoryConfigurator.java | 2 +- .../emf/bson/annotation/RequireEMFBson.java | 2 +- .../bson/handler/BsonDateProblemHandler.java | 2 +- .../EMFJSONResourceFactoryConfigurator.java | 2 +- .../emf/json/annotation/RequireEMFJson.java | 2 +- .../ConfigurableJsonResource.java | 2 +- .../ConfigurableJsonResourceFactory.java | 2 +- .../XMLResourceUriHandlerWrapper.java | 2 +- .../org/gecko/emf/json/constants/EMFJs.java | 2 +- .../AbstractEMFMessageBodyReaderWriter.java | 2 +- .../emf/jaxrs/EMFJsonAnnotationConverter.java | 2 +- .../jaxrs/EMFResourceMessageBodyHandler.java | 2 +- .../emf/jaxrs/EObjectMessageBodyHandler.java | 2 +- .../org/gecko/emf/jaxrs/XMLURIHandler.java | 2 +- .../annotations/AnnotationConverter.java | 2 +- .../jaxrs/annotations/ContentNotEmpty.java | 2 +- .../jaxrs/annotations/EMFResourceOptions.java | 2 +- .../RequireEMFMessageBodyReaderWriter.java | 2 +- .../emf/jaxrs/annotations/ResourceEClass.java | 2 +- .../emf/jaxrs/annotations/ResourceOption.java | 2 +- .../jaxrs/annotations/ValidateContent.java | 2 +- .../jaxrs/annotations/json/EMFJSONConfig.java | 2 +- .../jaxrs/annotations/json/RootElement.java | 2 +- .../EcoreToClassDiagramCodeGenerator.java | 2 +- .../EcoreToDocumentationCodeGenerator.java | 2 +- .../apis/EcoreToDocumentationOptions.java | 2 +- .../apis/EcoreToDocumentationService.java | 2 +- .../html/component/EcoreToHtmlComponent.java | 2 +- .../generators/html/.HtmlCodeGen.xtendbin | Bin 8426 -> 8426 bytes .../component/EcoreToMarkdownComponent.java | 2 +- .../generators/markdown/MarkdownCodeGen.xtend | 2 +- .../markdown/.MarkdownCodeGen.xtendbin | Bin 7340 -> 7340 bytes .../mermaid/MermaidClassDiagramCodeGen.xtend | 2 +- .../.MermaidClassDiagramCodeGen.xtendbin | Bin 6621 -> 6621 bytes .../PlantumlClassDiagramCodeGen.xtend | 2 +- .../.PlantumlClassDiagramCodeGen.xtendbin | Bin 7722 -> 7722 bytes .../emf/util/helper/UtilModelHelper.java | 2 +- 38 files changed, 34 insertions(+), 33 deletions(-) diff --git a/.licenserc.yaml b/.licenserc.yaml index 3614fb22..a6a1cb45 100755 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -54,5 +54,6 @@ header: - 'gradlew' - 'gradlew.bat' - 'settings.gradle' + - '**/*Test.java' comment: always diff --git a/org.gecko.emf.bson/src/org/gecko/emf/bson/EMFBsonResourceFactoryConfigurator.java b/org.gecko.emf.bson/src/org/gecko/emf/bson/EMFBsonResourceFactoryConfigurator.java index 70de3b8e..c2348609 100644 --- a/org.gecko.emf.bson/src/org/gecko/emf/bson/EMFBsonResourceFactoryConfigurator.java +++ b/org.gecko.emf.bson/src/org/gecko/emf/bson/EMFBsonResourceFactoryConfigurator.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.bson/src/org/gecko/emf/bson/annotation/RequireEMFBson.java b/org.gecko.emf.bson/src/org/gecko/emf/bson/annotation/RequireEMFBson.java index 0e140751..dfbb62b0 100644 --- a/org.gecko.emf.bson/src/org/gecko/emf/bson/annotation/RequireEMFBson.java +++ b/org.gecko.emf.bson/src/org/gecko/emf/bson/annotation/RequireEMFBson.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.bson/src/org/gecko/emf/bson/handler/BsonDateProblemHandler.java b/org.gecko.emf.bson/src/org/gecko/emf/bson/handler/BsonDateProblemHandler.java index cacb9bbc..415ae512 100644 --- a/org.gecko.emf.bson/src/org/gecko/emf/bson/handler/BsonDateProblemHandler.java +++ b/org.gecko.emf.bson/src/org/gecko/emf/bson/handler/BsonDateProblemHandler.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/EMFJSONResourceFactoryConfigurator.java b/org.gecko.emf.json/src/org/gecko/emf/json/EMFJSONResourceFactoryConfigurator.java index 8f22f536..8691bfd7 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/EMFJSONResourceFactoryConfigurator.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/EMFJSONResourceFactoryConfigurator.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/annotation/RequireEMFJson.java b/org.gecko.emf.json/src/org/gecko/emf/json/annotation/RequireEMFJson.java index ff5161bd..eb88b5b3 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/annotation/RequireEMFJson.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/annotation/RequireEMFJson.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java index 5ff346cd..ffa31bee 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResourceFactory.java b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResourceFactory.java index 2d1f0afe..387ebe87 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResourceFactory.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResourceFactory.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/XMLResourceUriHandlerWrapper.java b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/XMLResourceUriHandlerWrapper.java index 898477cf..4486feb4 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/XMLResourceUriHandlerWrapper.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/XMLResourceUriHandlerWrapper.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/constants/EMFJs.java b/org.gecko.emf.json/src/org/gecko/emf/json/constants/EMFJs.java index d7fb4b35..ddac7209 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/constants/EMFJs.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/constants/EMFJs.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/AbstractEMFMessageBodyReaderWriter.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/AbstractEMFMessageBodyReaderWriter.java index 3eb8de58..b282c850 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/AbstractEMFMessageBodyReaderWriter.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/AbstractEMFMessageBodyReaderWriter.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFJsonAnnotationConverter.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFJsonAnnotationConverter.java index e7de1d28..08b1d0c4 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFJsonAnnotationConverter.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFJsonAnnotationConverter.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFResourceMessageBodyHandler.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFResourceMessageBodyHandler.java index ad6d92f4..3290fe04 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFResourceMessageBodyHandler.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFResourceMessageBodyHandler.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EObjectMessageBodyHandler.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EObjectMessageBodyHandler.java index 7433eda3..75072cfb 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EObjectMessageBodyHandler.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EObjectMessageBodyHandler.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/XMLURIHandler.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/XMLURIHandler.java index 4e6e5a25..68b2875a 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/XMLURIHandler.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/XMLURIHandler.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/AnnotationConverter.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/AnnotationConverter.java index 5ddea2b0..6866ce3d 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/AnnotationConverter.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/AnnotationConverter.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ContentNotEmpty.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ContentNotEmpty.java index 746bca96..e605e24f 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ContentNotEmpty.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ContentNotEmpty.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/EMFResourceOptions.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/EMFResourceOptions.java index 6db99b8a..dc11e22b 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/EMFResourceOptions.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/EMFResourceOptions.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/RequireEMFMessageBodyReaderWriter.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/RequireEMFMessageBodyReaderWriter.java index 9e7c9796..080f62da 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/RequireEMFMessageBodyReaderWriter.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/RequireEMFMessageBodyReaderWriter.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceEClass.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceEClass.java index a0ad8597..7c80ec46 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceEClass.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceEClass.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceOption.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceOption.java index 1585b520..37c01153 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceOption.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceOption.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ValidateContent.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ValidateContent.java index 390ed734..46454a23 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ValidateContent.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ValidateContent.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/EMFJSONConfig.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/EMFJSONConfig.java index 7c6f0a1b..a3992c0c 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/EMFJSONConfig.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/EMFJSONConfig.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/RootElement.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/RootElement.java index a0dc11c9..faf9b0a4 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/RootElement.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/RootElement.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java index fc2d1a67..92fe6ba3 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java index 8059a0a1..9907cb56 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java index 0e4a9a45..105fa572 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java index 76516e06..43f3ace5 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java b/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java index 96d16959..1f1a6f14 100644 --- a/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java +++ b/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.HtmlCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.HtmlCodeGen.xtendbin index 656ffc20b338de79b6fde34b2cc287d5145122f2..bf70aa4ec141e300a9279e733868ff90a61dd652 100644 GIT binary patch delta 58 zcmaFm_{xzdz?+#xgn@&DgTXs_BhLn5Chz3U`-HpLLA00j0~R1XSx3PFM5QS>fT$G; FP5|e$5bXc} delta 58 zcmaFm_{xzdz?+#xgn@&DgP}8KBhLn5rp}nn`-HpLLA00j0~R1XSx3PFM5QS>fT$G; FP5=i>5;p(< diff --git a/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java b/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java index 1be428d6..8596675a 100644 --- a/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java +++ b/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend b/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend index 8ae6fe2c..6d0d0301 100644 --- a/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin index 62ce27f73dd3cbf24817192e16844467b63665ea..7174e81a26e0b586df980230487099d50ea2462b 100644 GIT binary patch delta 58 zcmZ2uxyF(wz?+#xgn@&DgCQn)BhN%ZrkLc-^9Ap)g6LZDd=?-*`JJ={h|-X808v>o FP5{o FP5|q$5vl+H diff --git a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend index 8afe8ff9..1786a511 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * diff --git a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.MermaidClassDiagramCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.MermaidClassDiagramCodeGen.xtendbin index 9dde524d25d9e236c153972fe5a8c9c07a37f5f8..482d125852be0f5b18c185f0309199f5dd316979 100644 GIT binary patch delta 58 zcmca>eAk#Kz?+#xgn@&DgCQb$BTs<eAk#Kz?+#xgn@&DgP|j4BTs< Date: Tue, 1 Nov 2022 12:43:45 +0100 Subject: [PATCH 13/21] test license Signed-off-by: Ilenia Salvadori --- .../src/org/gecko/emf/util/helper/UtilModelHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.gecko.emf.util.model/src/org/gecko/emf/util/helper/UtilModelHelper.java b/org.gecko.emf.util.model/src/org/gecko/emf/util/helper/UtilModelHelper.java index 713d83ff..ca35e90c 100644 --- a/org.gecko.emf.util.model/src/org/gecko/emf/util/helper/UtilModelHelper.java +++ b/org.gecko.emf.util.model/src/org/gecko/emf/util/helper/UtilModelHelper.java @@ -1,8 +1,8 @@ /* - * Copyright (c) 2012 - 2022 Data In Motion and others. + * Copyright (c) 2012 - 2022 Data In Motion Consulting GmbH. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the + * This program and the accompanying materials are made available under the terms of the * Eclipse Public License v2.0 which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v20.html * From ae3bfe3b1e1de3d110719feb81216ddc1c41fa2c Mon Sep 17 00:00:00 2001 From: Ilenia Salvadori Date: Tue, 1 Nov 2022 16:17:31 +0100 Subject: [PATCH 14/21] re-fixed the license headers Signed-off-by: Ilenia Salvadori --- .licenserc.yaml | 21 +++++++++++------- .../EMFBsonResourceFactoryConfigurator.java | 10 +++++---- .../emf/bson/annotation/RequireEMFBson.java | 10 +++++---- .../bson/handler/BsonDateProblemHandler.java | 10 +++++---- .../EMFJSONResourceFactoryConfigurator.java | 10 +++++---- .../emf/json/annotation/RequireEMFJson.java | 10 +++++---- .../ConfigurableJsonResource.java | 10 +++++---- .../ConfigurableJsonResourceFactory.java | 10 +++++---- .../XMLResourceUriHandlerWrapper.java | 10 +++++---- .../org/gecko/emf/json/constants/EMFJs.java | 10 +++++---- .../AbstractEMFMessageBodyReaderWriter.java | 10 +++++---- .../emf/jaxrs/EMFJsonAnnotationConverter.java | 10 +++++---- .../jaxrs/EMFResourceMessageBodyHandler.java | 10 +++++---- .../emf/jaxrs/EObjectMessageBodyHandler.java | 10 +++++---- .../org/gecko/emf/jaxrs/XMLURIHandler.java | 10 +++++---- .../annotations/AnnotationConverter.java | 10 +++++---- .../jaxrs/annotations/ContentNotEmpty.java | 10 +++++---- .../jaxrs/annotations/EMFResourceOptions.java | 10 +++++---- .../RequireEMFMessageBodyReaderWriter.java | 10 +++++---- .../emf/jaxrs/annotations/ResourceEClass.java | 10 +++++---- .../emf/jaxrs/annotations/ResourceOption.java | 10 +++++---- .../jaxrs/annotations/ValidateContent.java | 10 +++++---- .../jaxrs/annotations/json/EMFJSONConfig.java | 10 +++++---- .../jaxrs/annotations/json/RootElement.java | 10 +++++---- .../EcoreToClassDiagramCodeGenerator.java | 10 +++++---- .../EcoreToDocumentationCodeGenerator.java | 10 +++++---- .../apis/EcoreToDocumentationOptions.java | 10 +++++---- .../apis/EcoreToDocumentationService.java | 10 +++++---- .../html/component/EcoreToHtmlComponent.java | 10 +++++---- .../generators/html/HtmlCodeGen.xtend | 8 ++++--- .../generators/html/.HtmlCodeGen.xtendbin | Bin 8426 -> 8426 bytes .../generators/html/HtmlCodeGen.java | 8 ++++--- .../component/EcoreToMarkdownComponent.java | 10 +++++---- .../generators/markdown/MarkdownCodeGen.xtend | 10 +++++---- .../markdown/.MarkdownCodeGen.xtendbin | Bin 7340 -> 7340 bytes .../generators/markdown/MarkdownCodeGen.java | 8 ++++--- .../mermaid/MermaidClassDiagramCodeGen.xtend | 10 +++++---- .../.MermaidClassDiagramCodeGen.xtendbin | Bin 6621 -> 6621 bytes .../mermaid/MermaidClassDiagramCodeGen.java | 8 ++++--- .../PlantumlClassDiagramCodeGen.xtend | 10 +++++---- .../.PlantumlClassDiagramCodeGen.xtendbin | Bin 7722 -> 7722 bytes .../plantuml/PlantumlClassDiagramCodeGen.java | 8 ++++--- .../emf/util/helper/UtilModelHelper.java | 12 +++++----- 43 files changed, 237 insertions(+), 156 deletions(-) diff --git a/.licenserc.yaml b/.licenserc.yaml index a6a1cb45..b848bcc0 100755 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -1,16 +1,21 @@ header: license: spdx-id: EPL-2.0 - copyright-owner: Data In Motion Consulting GmbH + copyright-owner: Data In Motion content: | - This program and the accompanying materials are made available under the terms of the - Eclipse Public License v2.0 which accompanies this distribution, and is available at - http://www.eclipse.org/legal/epl-v20.html - + Copyright (c) 2012 - 2022 Data In Motion and others. + All rights reserved. + + This program and the accompanying materials are made + available under the terms of the Eclipse Public License 2.0 + which is available at https://www.eclipse.org/legal/epl-2.0/ + SPDX-License-Identifier: EPL-2.0 + + Contributors: pattern: | - This program and the accompanying materials are made available under the terms of the - Eclipse Public License v2.0 which accompanies this distribution, and is available at - http://www.eclipse.org/legal/epl-v20.html + This program and the accompanying materials are made + available under the terms of the Eclipse Public License 2.0 + which is available at https://www.eclipse.org/legal/epl-2.0/ paths-ignore: - 'dist' diff --git a/org.gecko.emf.bson/src/org/gecko/emf/bson/EMFBsonResourceFactoryConfigurator.java b/org.gecko.emf.bson/src/org/gecko/emf/bson/EMFBsonResourceFactoryConfigurator.java index c2348609..9695e875 100644 --- a/org.gecko.emf.bson/src/org/gecko/emf/bson/EMFBsonResourceFactoryConfigurator.java +++ b/org.gecko.emf.bson/src/org/gecko/emf/bson/EMFBsonResourceFactoryConfigurator.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.bson/src/org/gecko/emf/bson/annotation/RequireEMFBson.java b/org.gecko.emf.bson/src/org/gecko/emf/bson/annotation/RequireEMFBson.java index dfbb62b0..2fc36191 100644 --- a/org.gecko.emf.bson/src/org/gecko/emf/bson/annotation/RequireEMFBson.java +++ b/org.gecko.emf.bson/src/org/gecko/emf/bson/annotation/RequireEMFBson.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.bson/src/org/gecko/emf/bson/handler/BsonDateProblemHandler.java b/org.gecko.emf.bson/src/org/gecko/emf/bson/handler/BsonDateProblemHandler.java index 415ae512..7b5ba44c 100644 --- a/org.gecko.emf.bson/src/org/gecko/emf/bson/handler/BsonDateProblemHandler.java +++ b/org.gecko.emf.bson/src/org/gecko/emf/bson/handler/BsonDateProblemHandler.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/EMFJSONResourceFactoryConfigurator.java b/org.gecko.emf.json/src/org/gecko/emf/json/EMFJSONResourceFactoryConfigurator.java index 8691bfd7..0d6eff29 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/EMFJSONResourceFactoryConfigurator.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/EMFJSONResourceFactoryConfigurator.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/annotation/RequireEMFJson.java b/org.gecko.emf.json/src/org/gecko/emf/json/annotation/RequireEMFJson.java index eb88b5b3..ba80d026 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/annotation/RequireEMFJson.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/annotation/RequireEMFJson.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java index ffa31bee..39bab10f 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResource.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResourceFactory.java b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResourceFactory.java index 387ebe87..17457379 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResourceFactory.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/ConfigurableJsonResourceFactory.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/XMLResourceUriHandlerWrapper.java b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/XMLResourceUriHandlerWrapper.java index 4486feb4..20b293f6 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/configuration/XMLResourceUriHandlerWrapper.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/configuration/XMLResourceUriHandlerWrapper.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.json/src/org/gecko/emf/json/constants/EMFJs.java b/org.gecko.emf.json/src/org/gecko/emf/json/constants/EMFJs.java index ddac7209..d1f13b09 100644 --- a/org.gecko.emf.json/src/org/gecko/emf/json/constants/EMFJs.java +++ b/org.gecko.emf.json/src/org/gecko/emf/json/constants/EMFJs.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/AbstractEMFMessageBodyReaderWriter.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/AbstractEMFMessageBodyReaderWriter.java index b282c850..ec08d3cb 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/AbstractEMFMessageBodyReaderWriter.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/AbstractEMFMessageBodyReaderWriter.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFJsonAnnotationConverter.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFJsonAnnotationConverter.java index 08b1d0c4..e33b29ea 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFJsonAnnotationConverter.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFJsonAnnotationConverter.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFResourceMessageBodyHandler.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFResourceMessageBodyHandler.java index 3290fe04..a2437c3c 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFResourceMessageBodyHandler.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EMFResourceMessageBodyHandler.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EObjectMessageBodyHandler.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EObjectMessageBodyHandler.java index 75072cfb..1c33a2fa 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EObjectMessageBodyHandler.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/EObjectMessageBodyHandler.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/XMLURIHandler.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/XMLURIHandler.java index 68b2875a..08be25d9 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/XMLURIHandler.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/XMLURIHandler.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/AnnotationConverter.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/AnnotationConverter.java index 6866ce3d..6873ab69 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/AnnotationConverter.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/AnnotationConverter.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ContentNotEmpty.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ContentNotEmpty.java index e605e24f..145977a7 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ContentNotEmpty.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ContentNotEmpty.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/EMFResourceOptions.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/EMFResourceOptions.java index dc11e22b..208c4af0 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/EMFResourceOptions.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/EMFResourceOptions.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/RequireEMFMessageBodyReaderWriter.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/RequireEMFMessageBodyReaderWriter.java index 080f62da..975b22aa 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/RequireEMFMessageBodyReaderWriter.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/RequireEMFMessageBodyReaderWriter.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceEClass.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceEClass.java index 7c80ec46..587e9bf8 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceEClass.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceEClass.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceOption.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceOption.java index 37c01153..e022bf19 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceOption.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ResourceOption.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ValidateContent.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ValidateContent.java index 46454a23..ac7e48a9 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ValidateContent.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/ValidateContent.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/EMFJSONConfig.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/EMFJSONConfig.java index a3992c0c..0db321b8 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/EMFJSONConfig.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/EMFJSONConfig.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/RootElement.java b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/RootElement.java index faf9b0a4..2c2b4576 100644 --- a/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/RootElement.java +++ b/org.gecko.emf.rest/src/org/gecko/emf/jaxrs/annotations/json/RootElement.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java index 92fe6ba3..2b0bd9b0 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java index 9907cb56..3ba1581d 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java index 105fa572..467f2c9b 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationOptions.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java index 43f3ace5..eb037b0d 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java b/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java index 1f1a6f14..4034096d 100644 --- a/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java +++ b/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend b/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend index f330a809..a0727901 100644 --- a/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend @@ -2,9 +2,11 @@ * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.HtmlCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.HtmlCodeGen.xtendbin index bf70aa4ec141e300a9279e733868ff90a61dd652..206ea1c91ce3a0c4c3a88bdec81d971d36174e0c 100644 GIT binary patch delta 58 zcmaFm_{xzdz?+#xgn@&DgMqziBhLn5CibSy`-HpLLA00j0~R1XSx3PFM5QS>fT$G; FP5{y15Dx$V delta 58 zcmaFm_{xzdz?+#xgn@&DgTXs_BhLn5Chz3U`-HpLLA00j0~R1XSx3PFM5QS>fT$G; FP5|e$5bXc} diff --git a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java index d44ad9f6..390c549e 100644 --- a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java +++ b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java @@ -2,9 +2,11 @@ * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java b/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java index 8596675a..3f049bd9 100644 --- a/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java +++ b/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend b/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend index 6d0d0301..841c1364 100644 --- a/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2012 - 2022 Data In Motion and others. * All rights reserved. * - * This program and the accompanying materials are made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Data In Motion - initial API and implementation diff --git a/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin index 7174e81a26e0b586df980230487099d50ea2462b..0c6cc6dd14bd6fad9dfe2bc558a7882f8cfadb15 100644 GIT binary patch delta 58 zcmZ2uxyF(wz?+#xgn@&DgF&%rBhN%ZCdH=B^9Ap)g6LZDd=?-*`JJ={h|-X808v>o FP5{Na5F`Kq delta 58 zcmZ2uxyF(wz?+#xgn@&DgCQn)BhN%ZrkLc-^9Ap)g6LZDd=?-*`JJ={h|-X808v>o FP5{eAk#Kz?+#xgn@&DgF&KcBTs<eAk#Kz?+#xgn@&DgCQb$BTs< Date: Wed, 2 Nov 2022 09:16:20 +0100 Subject: [PATCH 15/21] updated org.gecko.emf.osgi.example.model.basic version Signed-off-by: Ilenia Salvadori --- cnf/central.mvn | 2 +- org.gecko.emf.bson.tests/test.bndrun | 9 +-- .../gecko/emf/json/tests/RootElementTest.java | 67 +++++++++++++------ org.gecko.emf.json.tests/test.bndrun | 10 ++- 4 files changed, 59 insertions(+), 29 deletions(-) diff --git a/cnf/central.mvn b/cnf/central.mvn index 09a3b92d..6a0d51e3 100644 --- a/cnf/central.mvn +++ b/cnf/central.mvn @@ -167,7 +167,7 @@ org.eclipse.emfcloud:emfjson-jackson:2.1.0 de.undercouch:bson4jackson:2.13.1 org.yaml:snakeyaml:1.30 #org.emfjson:emfjson-jackson:1.3.0 -org.geckoprojects.emf:org.gecko.emf.osgi.example.model.basic:4.1.1.202202162309 +org.geckoprojects.emf:org.gecko.emf.osgi.example.model.basic:4.1.1-SNAPSHOT #xtext diff --git a/org.gecko.emf.bson.tests/test.bndrun b/org.gecko.emf.bson.tests/test.bndrun index 089d2688..66623e8a 100644 --- a/org.gecko.emf.bson.tests/test.bndrun +++ b/org.gecko.emf.bson.tests/test.bndrun @@ -7,9 +7,7 @@ org.apache.felix.configadmin;version='[1.9.22,1.9.23)',\ org.eclipse.emf.ecore.xmi;version='[2.16.0,2.16.1)',\ org.opentest4j;version='[1.2.0,1.2.1)',\ - org.osgi.service.component;version='[1.4.0,1.4.1)',\ org.osgi.util.function;version='[1.1.0,1.1.1)',\ - org.osgi.util.promise;version='[1.1.1,1.1.2)',\ com.fasterxml.jackson.core.jackson-annotations;version='[2.13.2,2.13.3)',\ com.fasterxml.jackson.core.jackson-core;version='[2.13.2,2.13.3)',\ com.fasterxml.jackson.core.jackson-databind;version='[2.13.2,2.13.3)',\ @@ -23,7 +21,6 @@ org.gecko.emf.osgi.example.model.basic;version='[4.1.1,4.1.2)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-properties;version='[2.13.2,2.13.3)',\ com.fasterxml.jackson.dataformat.jackson-dataformat-yaml;version='[2.13.2,2.13.3)',\ - emfjson-jackson;version='[2.1.0,2.1.1)',\ org.gecko.emf.bson;version=snapshot,\ org.gecko.emf.json;version=snapshot,\ org.yaml.snakeyaml;version='[1.30.0,1.30.1)',\ @@ -31,4 +28,8 @@ junit-jupiter-api;version='[5.8.2,5.8.3)',\ junit-jupiter-params;version='[5.8.2,5.8.3)',\ org.osgi.test.common;version='[1.1.0,1.1.1)',\ - org.osgi.test.junit5;version='[1.1.0,1.1.1)' \ No newline at end of file + org.osgi.test.junit5;version='[1.1.0,1.1.1)',\ + org.apache.felix.converter;version='[1.0.18,1.0.19)',\ + org.eclipse.emfcloud.emfjson-jackson;version='[2.1.0,2.1.1)',\ + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + org.osgi.util.promise;version='[1.2.0,1.2.1)' \ No newline at end of file diff --git a/org.gecko.emf.json.tests/src/org/gecko/emf/json/tests/RootElementTest.java b/org.gecko.emf.json.tests/src/org/gecko/emf/json/tests/RootElementTest.java index e8e8209c..026ec926 100644 --- a/org.gecko.emf.json.tests/src/org/gecko/emf/json/tests/RootElementTest.java +++ b/org.gecko.emf.json.tests/src/org/gecko/emf/json/tests/RootElementTest.java @@ -11,6 +11,7 @@ */ package org.gecko.emf.json.tests; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -23,42 +24,43 @@ import java.util.Map; import org.eclipse.emf.common.util.URI; -import org.eclipse.emf.ecore.EcorePackage; import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.resource.ResourceSet; import org.gecko.emf.json.configuration.ConfigurableJsonResource; -import org.gecko.emf.json.configuration.ConfigurableJsonResourceFactory; import org.gecko.emf.json.constants.EMFJs; import org.gecko.emf.osgi.example.model.basic.BasicFactory; import org.gecko.emf.osgi.example.model.basic.BasicPackage; import org.gecko.emf.osgi.example.model.basic.Person; -import org.gecko.emf.osgi.example.model.basic.impl.BasicPackageImpl; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.osgi.test.common.annotation.InjectService; +import org.osgi.test.common.service.ServiceAware; +import org.osgi.test.junit5.context.BundleContextExtension; +import org.osgi.test.junit5.service.ServiceExtension; /** * * @author mark * @since 15.07.2022 */ +@ExtendWith(BundleContextExtension.class) +@ExtendWith(ServiceExtension.class) public class RootElementTest { - private ResourceSetImpl resourceSet; - private BasicPackage packageImpl; - private BasicFactory factoryImpl; - - @BeforeEach - public void beforeEach() { - resourceSet = new ResourceSetImpl(); - resourceSet.getPackageRegistry().put(EcorePackage.eNS_URI, EcorePackage.eINSTANCE); - packageImpl = BasicPackageImpl.init(); - factoryImpl = BasicFactory.eINSTANCE; - resourceSet.getPackageRegistry().put(BasicPackage.eNS_URI, packageImpl); - resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("json", new ConfigurableJsonResourceFactory()); - } - @Test - public void testSaveJson() { + public void testSaveJson(@InjectService(timeout = 2000) ServiceAware rsAware, + @InjectService(timeout = 2000) ServiceAware bfAware) { + + assertNotNull(rsAware); + assertThat(rsAware.getServices()).hasSize(1); + ResourceSet resourceSet = rsAware.getService(); + assertNotNull(resourceSet); + + assertNotNull(bfAware); + assertThat(bfAware.getServices()).hasSize(1); + BasicFactory factoryImpl = bfAware.getService(); + assertNotNull(factoryImpl); + Resource resource = resourceSet.createResource(URI.createURI("test.json")); assertNotNull(resource); assertTrue(resource instanceof ConfigurableJsonResource); @@ -78,8 +80,16 @@ public void testSaveJson() { System.out.println(result); } + + @Test - public void testLoadJsonError() { + public void testLoadJsonError(@InjectService(timeout = 2000) ServiceAware rsAware) { + + assertNotNull(rsAware); + assertThat(rsAware.getServices()).hasSize(1); + ResourceSet resourceSet = rsAware.getService(); + assertNotNull(resourceSet); + String json = "{\n" + " \"firstName\" : \"Emil\",\n" + " \"lastName\" : \"Tester\"\n" @@ -97,8 +107,21 @@ public void testLoadJsonError() { } } + @Test - public void testLoadJson() { + public void testLoadJson(@InjectService(timeout = 2000) ServiceAware rsAware, + @InjectService(timeout = 2000) ServiceAware basicPackageAware) { + + assertNotNull(rsAware); + assertThat(rsAware.getServices()).hasSize(1); + ResourceSet resourceSet = rsAware.getService(); + assertNotNull(resourceSet); + + assertNotNull(basicPackageAware); + assertThat(basicPackageAware.getServices()).hasSize(1); + BasicPackage packageImpl = basicPackageAware.getService(); + assertNotNull(packageImpl); + String json = "{\n" + " \"firstName\" : \"Emil\",\n" + " \"lastName\" : \"Tester\"\n" diff --git a/org.gecko.emf.json.tests/test.bndrun b/org.gecko.emf.json.tests/test.bndrun index 798b2a14..7273e5e1 100644 --- a/org.gecko.emf.json.tests/test.bndrun +++ b/org.gecko.emf.json.tests/test.bndrun @@ -29,13 +29,19 @@ org.mockito.mockito-core;version='[4.4.0,4.4.1)',\ org.objenesis;version='[3.2.0,3.2.1)',\ org.opentest4j;version='[1.2.0,1.2.1)',\ - org.osgi.service.component;version='[1.4.0,1.4.1)',\ org.osgi.util.function;version='[1.1.0,1.1.1)',\ org.osgi.util.pushstream;version='[1.0.1,1.0.2)',\ org.yaml.snakeyaml;version='[1.30.0,1.30.1)',\ org.apache.felix.converter;version='[1.0.18,1.0.19)',\ org.eclipse.emfcloud.emfjson-jackson;version='[2.1.0,2.1.1)',\ - org.osgi.util.promise;version='[1.2.0,1.2.1)' + org.osgi.util.promise;version='[1.2.0,1.2.1)',\ + org.gecko.emf.bson;version=snapshot,\ + org.gecko.emf.util.model;version=snapshot,\ + org.osgi.service.cm;version='[1.6.0,1.6.1)',\ + assertj-core;version='[3.22.0,3.22.1)',\ + junit-jupiter-params;version='[5.8.2,5.8.3)',\ + org.osgi.test.common;version='[1.1.0,1.1.1)',\ + org.osgi.test.junit5;version='[1.1.0,1.1.1)' From 7474cdea2c73d5ac0a9e177e9c9ad5e9015a0df8 Mon Sep 17 00:00:00 2001 From: Ilenia Salvadori Date: Wed, 2 Nov 2022 09:20:51 +0100 Subject: [PATCH 16/21] added xtend-gen to gitignore file Signed-off-by: Ilenia Salvadori --- .../.gitignore | 1 + .../generators/html/.HtmlCodeGen.xtendbin | Bin 8426 -> 8441 bytes .../documentation/generators/html/.gitignore | 2 ++ .../.gitignore | 1 + .../markdown/.MarkdownCodeGen.xtendbin | Bin 7340 -> 7357 bytes .../.gitignore | 1 + .../.MermaidClassDiagramCodeGen.xtendbin | Bin 6621 -> 6627 bytes .../generators/mermaid/.gitignore | 2 ++ .../.gitignore | 1 + .../.PlantumlClassDiagramCodeGen.xtendbin | Bin 7722 -> 7734 bytes .../generators/plantuml/.gitignore | 2 ++ 11 files changed, 10 insertions(+) diff --git a/org.gecko.emf.util.documentation.generators.html/.gitignore b/org.gecko.emf.util.documentation.generators.html/.gitignore index ae3c1726..1a9ea807 100644 --- a/org.gecko.emf.util.documentation.generators.html/.gitignore +++ b/org.gecko.emf.util.documentation.generators.html/.gitignore @@ -1 +1,2 @@ /bin/ +/xtend-gen/* \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.HtmlCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.HtmlCodeGen.xtendbin index 206ea1c91ce3a0c4c3a88bdec81d971d36174e0c..b5a8331767fd30d97b208988fb5bdb3f91c3d15f 100644 GIT binary patch delta 5164 zcmV+{6w~YKLHR)qP)h>@6aWYa2mtO$Vv!9ne-s;RS>Tx~2@sYLK>}~$*!XJqO1iMk zTLd^tkK;JK=e?KMNt`%wdUJYlnp2$aG^h98?Ua|Eb7tR^P|_9v|QCYUZ3X zXHNOgnYs5iD?1gAtq3=1in4m9TrTt_5@*kzja#XVT_{=cd~rH)u59Jf3(u+vC7i?` ze+TW1rMBAHLcUlYw^C(0pHtPX^Ru2SC(ccpB`c9EpD$R8piC%j$>FMHy7;Ptz-Jas z94fVIs@mm{N#o5iPHLqmK$NcSTyWJ?KAX+w5=YEg^W-Qplori^+8&wB9i%=ab6CQpO@r3C&Juaxafe8eu5f7`16Y-&=PnwnL$xkXc&ns-)n!or>s;LSK+ zo-+?2_xcM`F!=$H9|ZX=iABgCH4E!5M8KqnKzbOY2QHw!mC6^b_z=zI@@3|%8trQ+ znEVLHkAnQ*wua;nWXw`&^+JNn4 zC|Aj@T40XJ>;RdaATzS7VVNU#*(#cu4HqV1D|EpMOJIfQ?uJ$v&8Mx*P{ztyx$?#a zXxJJ{VU2EBBetWVHIA97Gv>6lcHwCzc^ODv4w751r5NW8YTfP%yPb1ikk(y6d%H6Ch{zT25ob? zXl4h%YKL4ha{Qu;WII?1J6HufXjjNf5jD-pjJ08r0Jv%QoZuB$=UHJaK5OJUGj9Pb(6c982Xjspf|f1P*E zVoGCMSqod~1+#Y&^Z!8a>c|l8J@+63l6td^k6iU$1CO zlPR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{0?&@=FF6MrEoL@Us^PV zG^J_nf4uJu^O26~0q*1d!Z%U>-RMr^fEHeaLa0B>85X=O*jSdZ@Mi}%)`c4#`0IA8 zV=M7vKmLhv%}xibsWA>}dX;;JwU}xgf}reOH}C#Dgy^ar;t}WTUq4))2KTt~t2pj?ZuXqyx z0ERaJ08mQ<1QY-W2nYZNf?>1H6Nv`{2ZCXOh z00000000000000006rT40AX`;Z)0g;bZKvHb5KhK1^@s600RI60JZ=C03IL!0000v CBjWr3 diff --git a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.gitignore b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.gitignore index e9ce2dc3..ad117701 100644 --- a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.gitignore +++ b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.gitignore @@ -1 +1,3 @@ /.HtmlCodeGen.java._trace +/.HtmlCodeGen.xtendbin +/HtmlCodeGen.java diff --git a/org.gecko.emf.util.documentation.generators.markdown/.gitignore b/org.gecko.emf.util.documentation.generators.markdown/.gitignore index ae3c1726..1a9ea807 100644 --- a/org.gecko.emf.util.documentation.generators.markdown/.gitignore +++ b/org.gecko.emf.util.documentation.generators.markdown/.gitignore @@ -1 +1,2 @@ /bin/ +/xtend-gen/* \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin index 0c6cc6dd14bd6fad9dfe2bc558a7882f8cfadb15..ea75da6c247f6207ab09bebb501d72473d39c922 100644 GIT binary patch delta 4616 zcmV+j68G(_IlVazP)h>@6aWYa2mtL#Vv!9Ve>w+v97omKa=NBFHTT%D631Yt+}Ww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%Ja4Qe;-B&2mdjV{#&D?I|N3*Qe3;K=`X})DwO8-S=ADxGxvn%uc+L3 zC+GA_FyQKUMrt*X6S*)TO0SLRtbj7{J_{A2X~(!)tp6!qJn7Cgn~LLQiJpZ^!qI$o8+&QO;CBP*doZE?6?5s|!nqXr`aAHY z^M4R8E#iC-w%v<3|A{#NwE$O9u$|7?a?ZSrGsL@iG7aP)h>@ z6aWYa2mm31VY9Ij+XVw5f?>0d7j6U&A%bC5_mkk3SrGsL@iLPO94rGNf?<<792)|Y h5tG0X7L#op3eGl;2Qt{006#Z>iGZw diff --git a/org.gecko.emf.util.documentation.generators.mermaid/.gitignore b/org.gecko.emf.util.documentation.generators.mermaid/.gitignore index ae3c1726..1a9ea807 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid/.gitignore +++ b/org.gecko.emf.util.documentation.generators.mermaid/.gitignore @@ -1 +1,2 @@ /bin/ +/xtend-gen/* \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.MermaidClassDiagramCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.MermaidClassDiagramCodeGen.xtendbin index a06e6b919b1825d32f2a77b35ab5d801eaad3894..153307d6aa096c7d284c3eafe301c43e4df93b5c 100644 GIT binary patch delta 4317 zcmV<35F+p0GvhN2P)h>@6aWYa2mtI!Vv!9We+QTwM-{#;YOB-fic8Lp?Xy#G)!7gT zIF8xb^VvCL$Hpy!K$1Oab+@skRd!eB5(0#h5J-W9o=Q#VkkETi=son_d#EWu;Jq2` z%&bm#zRSn=`DAJ4&71$Vf6DGvPOW0(mKa@{qAZ&X!^Y;};UhNY}Rcs&h~9=3No6i4z$Fi_C$_}I^_ePO4l~dI%~OKm^B#a` zcTUxIICaN&OW4$vu|??-WKys&)`8o2`>-&45+|w5Cpg zS{~?DT*se=dYS~)p9THhpg+BKPWngd&DzPc^iiET(A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vx6G;`6YkAvXYhONX&R;2_9(VI2; z6l*?$bLI|AYrxf`T5<+#$Fpg)DVx@shB=jve`irtjH2x0P580?V?iqIiPMrs9|L{U z$2Fy4)~HXq_(*&00FSgMguRULKP+_8C$$v*kEK}@MQ4z`9*Q*)vy8jGkV_w z_+dV5zKkEQ!3XKUk2UylIDQ<26K~+h<@kX|96AR-o`PVB`@_>(qe`FAni^*BKdJ(P zS77TLImF#myoF!S#UWYWfNA7e%plLjG6-_?JaDAa7Z?}gL%SQ%UPQE)YSCJogMdM$ zzP+FUl>Y-zO9u$+*Gu^v6aWC1H~;`pO9KQH00;;O03d>4vu_kF1Op&~VY8nY*8~k9 zf?-wb*Gu^v6aWC1lY<>CA0UEZRrerJN$vvx0EiC&02BZK000000000000011lg}L^ uA0UEZRl6Q*-JS#h0JtFl01N;C00000000000001nlMx;t23{Qi00014p-?3N diff --git a/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.gitignore b/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.gitignore index a0ee9026..71a65ddc 100644 --- a/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.gitignore +++ b/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.gitignore @@ -2,3 +2,5 @@ /.PlantumlCodeGen.xtendbin /PlantumlCodeGen.java /.PlantumlClassDiagramCodeGen.java._trace +/.PlantumlClassDiagramCodeGen.xtendbin +/PlantumlClassDiagramCodeGen.java From 075ce36d8e7a95d8b6faa6c86e09f16324eca566 Mon Sep 17 00:00:00 2001 From: Ilenia Salvadori Date: Wed, 2 Nov 2022 09:38:59 +0100 Subject: [PATCH 17/21] tried to increase sonarqube allocated memory Signed-off-by: Ilenia Salvadori --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 77b4358f..d06ae0e8 100644 --- a/build.gradle +++ b/build.gradle @@ -7,6 +7,7 @@ plugins { sonarqube { properties { + property "sonar.ce.javaOpts", "-Xmx2G" property "sonar.projectName", "Gecko EMF Utilities" property "sonar.projectKey", "geckoprojects-org_org.gecko.emf.utils" property "sonar.organization", "geckoprojects-org" From 982c04ead23be4d9ac0f952f47a32bb0b84a69da Mon Sep 17 00:00:00 2001 From: Ilenia Salvadori Date: Wed, 2 Nov 2022 12:22:45 +0100 Subject: [PATCH 18/21] increased memory in gradle.properties Signed-off-by: Ilenia Salvadori --- gradle.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/gradle.properties b/gradle.properties index 8a0bbbbe..37a305d1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,3 @@ bnd_version=6.3.1 bnd_snapshots=https://bndtools.jfrog.io/ui/native/libs-release/ +org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m From c3baeac155836c6d78b0fc6ab23835a4fb0ee7fb Mon Sep 17 00:00:00 2001 From: Ilenia Salvadori Date: Wed, 2 Nov 2022 13:16:54 +0100 Subject: [PATCH 19/21] removed code smells Signed-off-by: Ilenia Salvadori --- .../generators/apis/EcoreToClassDiagramCodeGenerator.java | 4 +--- .../generators/html/component/EcoreToHtmlComponent.java | 5 +---- .../markdown/component/EcoreToMarkdownComponent.java | 5 +---- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java index 2b0bd9b0..d200734a 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java @@ -26,7 +26,5 @@ public interface EcoreToClassDiagramCodeGenerator { CharSequence generateClassDiagram(EPackage ePackage); CharSequence generateClassDiagram(EClass eClass); - -// TODO - + } diff --git a/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java b/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java index 4034096d..c9f2607d 100644 --- a/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java +++ b/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java @@ -42,10 +42,7 @@ public class EcoreToHtmlComponent implements EcoreToDocumentationService { */ @Override public boolean canHandleMediaType(String mediaType) { - if(HTML_MEDIA_TYPE.equals(mediaType)) { - return true; - } - return false; + return HTML_MEDIA_TYPE.equals(mediaType); } /* diff --git a/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java b/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java index 3f049bd9..b307589d 100644 --- a/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java +++ b/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java @@ -105,10 +105,7 @@ public OutputStream doGenerateDocumentation(EClass eClass, EcoreToDocumentationO */ @Override public boolean canHandleMediaType(String mediaType) { - if(MD_MEDIA_TYPE.equals(mediaType)) { - return true; - } - return false; + return MD_MEDIA_TYPE.equals(mediaType); } } From ebc7a18227e4aab406bc11ad318dea6ec6c576de Mon Sep 17 00:00:00 2001 From: Ilenia Salvadori Date: Tue, 10 Jan 2023 12:38:41 +0100 Subject: [PATCH 20/21] take care of special html characters Signed-off-by: Ilenia Salvadori --- .../util/documentation/generators/html/HtmlCodeGen.xtend | 2 +- .../util/documentation/generators/html/HtmlCodeGen.java | 4 ++-- .../generators/mermaid/MermaidClassDiagramCodeGen.xtend | 3 +++ .../generators/mermaid/MermaidClassDiagramCodeGen.java | 7 +++++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend b/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend index a0727901..70a12cfb 100644 --- a/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend @@ -152,7 +152,7 @@ None. «"\n"» «mdBlockEnd» «diagramStartSyntax» -«classDiagramCodeGen.generateClassDiagram(eclass)» +«classDiagramCodeGen.generateClassDiagram(eclass).toString().replace("<","<").replace(">", ">")» «diagramEndSyntax» «"\n"» «ENDIF» diff --git a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java index 390c549e..4c8944f3 100644 --- a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java +++ b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java @@ -285,8 +285,8 @@ public CharSequence toClassOverview(final EClass eclass) { _builder.newLineIfNotEmpty(); _builder.append(this.diagramStartSyntax); _builder.newLineIfNotEmpty(); - CharSequence _generateClassDiagram = this.classDiagramCodeGen.generateClassDiagram(eclass); - _builder.append(_generateClassDiagram); + String _replace = this.classDiagramCodeGen.generateClassDiagram(eclass).toString().replace("<", "<").replace(">", ">"); + _builder.append(_replace); _builder.newLineIfNotEmpty(); _builder.append(this.diagramEndSyntax); _builder.newLineIfNotEmpty(); diff --git a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend index ad5961c0..2146e4d7 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend @@ -74,6 +74,9 @@ var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | e def toClassMembers(EClass eclass) ''' +«IF eclass.EAttributes.isEmpty» +«" \n"» +«ENDIF» «FOR attribute: eclass.EAttributes» «" "»«attribute.EType.name» «attribute.name» «ENDFOR» diff --git a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java index d20a13e8..610313d7 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java +++ b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java @@ -141,6 +141,13 @@ public CharSequence toClassDiagram(final EClass eclass) { public CharSequence toClassMembers(final EClass eclass) { StringConcatenation _builder = new StringConcatenation(); + { + boolean _isEmpty = eclass.getEAttributes().isEmpty(); + if (_isEmpty) { + _builder.append(" \n"); + _builder.newLineIfNotEmpty(); + } + } { EList _eAttributes = eclass.getEAttributes(); for(final EAttribute attribute : _eAttributes) { From 7d804ba09094b7afa0c4b7781ad04eea7b031c83 Mon Sep 17 00:00:00 2001 From: ilenia Date: Wed, 22 Mar 2023 10:18:34 +0100 Subject: [PATCH 21/21] doc generation for EClassifier (only EClass and EEnum supported for now) Signed-off-by: ilenia --- .../EcoreToClassDiagramCodeGenerator.java | 11 ++++++ .../EcoreToDocumentationCodeGenerator.java | 10 +++++ .../apis/EcoreToDocumentationService.java | 28 ++++++++++++++ .../html/component/EcoreToHtmlComponent.java | 17 +++++++++ .../generators/html/HtmlCodeGen.xtend | 17 +++++++++ .../generators/html/.HtmlCodeGen.xtendbin | Bin 8441 -> 8762 bytes .../generators/html/HtmlCodeGen.java | 34 +++++++++++++++++ .../component/EcoreToMarkdownComponent.java | 17 +++++++++ .../generators/markdown/MarkdownCodeGen.xtend | 18 +++++++++ .../markdown/.MarkdownCodeGen.xtendbin | Bin 7357 -> 7670 bytes .../generators/markdown/MarkdownCodeGen.java | 36 ++++++++++++++++++ .../mermaid/MermaidClassDiagramCodeGen.xtend | 17 +++++++++ .../.MermaidClassDiagramCodeGen.xtendbin | Bin 6627 -> 6962 bytes .../mermaid/MermaidClassDiagramCodeGen.java | 30 +++++++++++++++ .../PlantumlClassDiagramCodeGen.xtend | 17 +++++++++ .../.PlantumlClassDiagramCodeGen.xtendbin | Bin 7734 -> 8027 bytes .../plantuml/PlantumlClassDiagramCodeGen.java | 33 ++++++++++++++++ 17 files changed, 285 insertions(+) diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java index d200734a..de7112aa 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToClassDiagramCodeGenerator.java @@ -14,6 +14,7 @@ package org.gecko.emf.util.documentation.generators.apis; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.EPackage; /** @@ -25,6 +26,16 @@ public interface EcoreToClassDiagramCodeGenerator { CharSequence generateClassDiagram(EPackage ePackage); + + /** + * + * @param eClass + * @return + * @deprecated use {@link generateClassDiagram(EClassifier eClassifier)} instead + */ + @Deprecated() CharSequence generateClassDiagram(EClass eClass); + + CharSequence generateClassDiagram(EClassifier eClassifier); } diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java index 3ba1581d..58c34eb0 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationCodeGenerator.java @@ -14,6 +14,7 @@ package org.gecko.emf.util.documentation.generators.apis; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.EPackage; /** @@ -25,6 +26,15 @@ public interface EcoreToDocumentationCodeGenerator { CharSequence generateDocumentation(EPackage ePackage, EcoreToDocumentationOptions docGenOption); + /** + * @param eClass + * @param docGenOption + * @return + * @deprecated use {@link generateDocumentation(EClassifier eClassifier, EcoreToDocumentationOptions docGenOption)} instead + */ + @Deprecated CharSequence generateDocumentation(EClass eClass, EcoreToDocumentationOptions docGenOption); + + CharSequence generateDocumentation(EClassifier eClassifier, EcoreToDocumentationOptions docGenOption); } diff --git a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java index eb037b0d..7e80e372 100644 --- a/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java +++ b/org.gecko.emf.util.documentation.generators.apis/src/org/gecko/emf/util/documentation/generators/apis/EcoreToDocumentationService.java @@ -23,6 +23,7 @@ import java.nio.file.Paths; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.EPackage; import org.osgi.annotation.versioning.ProviderType; @@ -33,18 +34,45 @@ public interface EcoreToDocumentationService{ String getOutputFileExtension(); String getOutputFolder(EcoreToDocumentationOptions mode); OutputStream doGenerateDocumentation(EPackage ePackage, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException; + + /** + * @param eClass + * @param mode + * @param outputFolderRoot + * @return + * @throws IOException + * @deprecated use {@link doGenerateDocumentation(EClassifier eClassifier, EcoreToDocumentationOptions mode, String outputFolderRoot)} instead + */ + @Deprecated OutputStream doGenerateDocumentation(EClass eClass, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException; + + OutputStream doGenerateDocumentation(EClassifier eClassifier, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException; default File generateOutputFile(EPackage ePackage, CharSequence generatedDoc, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException { String outputFileName = ePackage.getName().concat(getOutputFileExtension()); return doCreateOutputFile(outputFileName, generatedDoc, mode, outputFolderRoot); } + /** + * @param eClass + * @param generatedDoc + * @param mode + * @param outputFolderRoot + * @return + * @throws IOException + * @deprecated use {@link generateOutputFile(EClassifier eClassifier, CharSequence generatedDoc, EcoreToDocumentationOptions mode, String outputFolderRoot) } instead + */ + @Deprecated default File generateOutputFile(EClass eClass, CharSequence generatedDoc, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException { String outputFileName = eClass.getEPackage().getName().concat("_").concat(eClass.getName()).concat(getOutputFileExtension()); return doCreateOutputFile(outputFileName, generatedDoc, mode, outputFolderRoot); } + default File generateOutputFile(EClassifier eClassifier, CharSequence generatedDoc, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException { + String outputFileName = eClassifier.getEPackage().getName().concat("_").concat(eClassifier.getName()).concat(getOutputFileExtension()); + return doCreateOutputFile(outputFileName, generatedDoc, mode, outputFolderRoot); + } + default File doCreateOutputFile(String outputFileName, CharSequence generatedDoc, EcoreToDocumentationOptions mode, String outputFolderRoot) throws IOException { Path outputPath = Paths.get(outputFolderRoot, getOutputFolder(mode), outputFileName); Files.deleteIfExists(outputPath); diff --git a/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java b/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java index c9f2607d..9195980b 100644 --- a/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java +++ b/org.gecko.emf.util.documentation.generators.html.component/src/org/gecko/emf/util/documentation/generators/html/component/EcoreToHtmlComponent.java @@ -21,6 +21,7 @@ import java.io.OutputStream; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.EPackage; import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationCodeGenerator; import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions; @@ -98,5 +99,21 @@ public OutputStream doGenerateDocumentation(EClass eClass, EcoreToDocumentationO } } + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#doGenerateDocumentation(org.eclipse.emf.ecore.EClassifier, org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions, java.lang.String) + */ + @Override + public OutputStream doGenerateDocumentation(EClassifier eClassifier, EcoreToDocumentationOptions mode, + String outputFolderRoot) throws IOException { + EcoreToDocumentationCodeGenerator mdCodeGenerator = new HtmlCodeGen(); + CharSequence cs = mdCodeGenerator.generateDocumentation(eClassifier, mode); + File outputFile = generateOutputFile(eClassifier, cs, mode, outputFolderRoot); + try(InputStream is = new FileInputStream(outputFile); OutputStream os = new ByteArrayOutputStream();) { + os.write(is.readAllBytes()); + return os; + } + } + } diff --git a/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend b/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend index 70a12cfb..935fd237 100644 --- a/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.html/src/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.xtend @@ -213,4 +213,21 @@ None. } + override generateDocumentation(EClassifier eClassifier, EcoreToDocumentationOptions docGenOption) { + if(EcoreToDocumentationOptions.HTML_WITH_MERMAID_CLASS_DIAGRAM.equals(docGenOption)) { + classDiagramCodeGen = new MermaidClassDiagramCodeGen(); + diagramStartSyntax = "
"; + diagramEndSyntax = "
"; + } + ''' +«docStart» +«IF eClassifier instanceof EClass» +«toClassOverview(eClassifier as EClass)» +«ELSEIF eClassifier instanceof EEnum» +«toEnumOverview(eClassifier as EEnum)» +«ENDIF» +«docEnd» + ''' + } + } \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.HtmlCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/.HtmlCodeGen.xtendbin index b5a8331767fd30d97b208988fb5bdb3f91c3d15f..0d4b06714d305d991a3adc75858a71de14404998 100644 GIT binary patch literal 8762 zcmaJ{RahKKlSKjy?l8Co3GQye-QAtw!5sn&65QS0gS*?{PH-8V1b2dM?$h3Xzum2V z=sqpg{d7vYRODel;6MQY04RMG4=t#F3CiEGrGpidxs#)trK6kcus(v92Dter)4Yc! z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LVS#X4k~5VnYzfR-HXpUF?stSM@B0ugmr+J?mEN zgu^1|-~JKke;yRYV)Kjwvu>5sv(;38NbpvmkBKRn@&6ZWu0Rr-f1H1*}Dak>CjiAJ5h_T ze52)7`(ZQHGRWmV>95ylkO$V&_w;0-Cp%oIoPL{m9qAyK( zGrr1jWQ0@Pg%F1|OO#%q&3D6#!b`jP>*3o(0bh#e z((Jj6fgXEHF)Mt;*z8C@pV6KJ`yhk%lPjFq_Pl--ck<~f8tv??e0z&C0ikR@-X6vD zXexWsZR!$RXk2m??^&Qo`W&!_BORVK$YCuRv{yC}FxH$F|Cf~ifmLslbjY^)op$O3 zYw9a&&EoE568oQ!iet?Dc{8z^vfU5z(M}u$)|SV(iQ^SzuYU z9;P`DalcJ>w!-%a;{DQ~R|9P=M?!v&6&|&^iE59X(S)Vd4~}$Xr`2CdXdix)P+hG1 zYy9=$TfIra$~LP0#>aik>-#=bH2s2nK3@btB6kiL?8FxThJfE!{9!XT8)G_=Ga!fx z6KYEz$YhEYGFm%x8f$mv6M6nD3iBadAFer-@g+3({liVP9@eM^X9O^PEMa2F5AETuv1e!lTw4J1#51-5;{k34 zT9SNugu*}r1CnG*pIB1P7iVh`t2g1yU;xU5#Mt^u92|SriPbBI2!d@e2hwd3VyQC+ zhMv8{3VDwpg-Nj@sRjy2@?{Vn1Ex$!^sNTsrz5*g(K#B>8x}}2k zERVn$$iy~PKd?be|XLRjkWx53;%hp|K9rp&3|L9h6*~yzxGl8X>I@XoDBbJ{|CO2^ilu- diff --git a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java index 4c8944f3..76d09395 100644 --- a/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java +++ b/org.gecko.emf.util.documentation.generators.html/xtend-gen/org/gecko/emf/util/documentation/generators/html/HtmlCodeGen.java @@ -399,4 +399,38 @@ public CharSequence generateDocumentation(final EClass eClass, final EcoreToDocu } return _xblockexpression; } + + @Override + public CharSequence generateDocumentation(final EClassifier eClassifier, final EcoreToDocumentationOptions docGenOption) { + CharSequence _xblockexpression = null; + { + boolean _equals = EcoreToDocumentationOptions.HTML_WITH_MERMAID_CLASS_DIAGRAM.equals(docGenOption); + if (_equals) { + MermaidClassDiagramCodeGen _mermaidClassDiagramCodeGen = new MermaidClassDiagramCodeGen(); + this.classDiagramCodeGen = _mermaidClassDiagramCodeGen; + this.diagramStartSyntax = "
"; + this.diagramEndSyntax = "
"; + } + StringConcatenation _builder = new StringConcatenation(); + _builder.append(this.docStart); + _builder.newLineIfNotEmpty(); + { + if ((eClassifier instanceof EClass)) { + CharSequence _classOverview = this.toClassOverview(((EClass) eClassifier)); + _builder.append(_classOverview); + _builder.newLineIfNotEmpty(); + } else { + if ((eClassifier instanceof EEnum)) { + CharSequence _enumOverview = this.toEnumOverview(((EEnum) eClassifier)); + _builder.append(_enumOverview); + _builder.newLineIfNotEmpty(); + } + } + } + _builder.append(this.docEnd); + _builder.newLineIfNotEmpty(); + _xblockexpression = _builder; + } + return _xblockexpression; + } } diff --git a/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java b/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java index b307589d..bad22f81 100644 --- a/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java +++ b/org.gecko.emf.util.documentation.generators.markdown.component/src/org/gecko/emf/util/documentation/generators/markdown/component/EcoreToMarkdownComponent.java @@ -21,6 +21,7 @@ import java.io.OutputStream; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.EPackage; import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationCodeGenerator; import org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions; @@ -108,4 +109,20 @@ public boolean canHandleMediaType(String mediaType) { return MD_MEDIA_TYPE.equals(mediaType); } + /* + * (non-Javadoc) + * @see org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationService#doGenerateDocumentation(org.eclipse.emf.ecore.EClassifier, org.gecko.emf.util.documentation.generators.apis.EcoreToDocumentationOptions, java.lang.String) + */ + @Override + public OutputStream doGenerateDocumentation(EClassifier eClassifier, EcoreToDocumentationOptions mode, + String outputFolderRoot) throws IOException { + EcoreToDocumentationCodeGenerator mdCodeGenerator = new MarkdownCodeGen(); + CharSequence cs = mdCodeGenerator.generateDocumentation(eClassifier, mode); + File outputFile = generateOutputFile(eClassifier, cs, mode, outputFolderRoot); + try(InputStream is = new FileInputStream(outputFile); OutputStream os = new ByteArrayOutputStream();) { + os.write(is.readAllBytes()); + return os; + } + } + } diff --git a/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend b/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend index 841c1364..5fbece1a 100644 --- a/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.markdown/src/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.xtend @@ -183,4 +183,22 @@ None. toClassOverview(eClass); } + override generateDocumentation(EClassifier eClassifier, EcoreToDocumentationOptions docGenOption) { + if(EcoreToDocumentationOptions.MARKDOWN_WITH_MERMAID_CLASS_DIAGRAM.equals(docGenOption)) { + classDiagramCodeGen = new MermaidClassDiagramCodeGen(); + diagramStartSyntax = "```mermaid"; + } + else if(EcoreToDocumentationOptions.MARKDOWN_WITH_PLANTUML_CLASS_DIAGRAM.equals(docGenOption)) { + classDiagramCodeGen = new PlantumlClassDiagramCodeGen(); + diagramStartSyntax = "```plantuml"; + } + ''' +«IF eClassifier instanceof EClass» +«toClassOverview(eClassifier as EClass)» +«ELSEIF eClassifier instanceof EEnum» +«toEnumOverview(eClassifier as EEnum)» +«ENDIF» + ''' + } + } \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/.MarkdownCodeGen.xtendbin index ea75da6c247f6207ab09bebb501d72473d39c922..91c65c6911e118deb4138189754578dde7cdf37f 100644 GIT binary patch delta 7521 zcmZX(RZyIP5-f~MfMk*2PLQC%-615{vN!~Hx1d2j+!qKg!QEYgyF0<%ArM>^Sm2)X zzx?Oc?V6g0shNK4>Y3>fyc2$_qJWG-fPjI4fuN`2uKDvV1)z)WNj~s?A$jgrt$sgd zAB}Ixqp62j#y>5=jE-)3Fxj5|!_rAxQag;)gK>mG{vAz07!RJ*m!P<~4QV_nDXAZf zAw08R&x3FFI-1++>$UdO#15mxe2eE!Gwxr!d@b(KxW#cJIG_#Ik##%Tjkb&Oq;Dx*BooAIZKeV{bOYLwijSC1Pli$lYbf73U47>&9XQ?3Kqy{qJV89OC-2nD?2_Ah8_T5z?zE>dVoJnl|t_ko!=qf zV>rFbLh4BSm^`ru;vk6B;L@ac6ne8mh5Ev|MI}^B|AH)-ud2hjD7{09UWK_u>VU(m z)WE}(bAK1beX+veU8Z|-L!fz0;C@Y@a>#nL&YVCx_u@D= zV%6#o2j=}L|0BES;3lf+JGvD=sujO?_P_?~Ar8x`xXr6Qf;LSB3&IIWc+&dSYoIPL zN)qx{U2L&y@nM$WR32fqxKxxHn{K=z3ST3P-F^S~GFdXs3LH^JOD3ARX7#b$=wrF$ z`T97FYU{4;;bm?rVF95_H?ftZ&7vCehv}BbOro+6glgIH38GhSg*BvaQre8b{x2Z# zC%>>9^y<>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D*bDHD3ps!yKdUO9QpsTIOkk^gY{8Hhu2xip&$ z69t8k{{Mmc>kB#{j>O=_;6HDkA2nIg)}8s43QP^Er9#V{?(qo&^Qr(+gP-J<#voRJM^ZE(d#(e-L=P}}9M)KNhd&ksc2+ zLaWnxNTRGhStJVS&!~A9a&J6>%?squWtuu#BjDR_qSw?S! zbC!K_+;kj@s5pn6VvT&WHSrb??e`0kZgBa zXKE`i{$OI94wnm<7~6xsFuO`eHXw(GW0zZ0sjW`M4g#I%XTpp3#8nq=Z0a~0wq=*kJY|!E-z5@CrV|MFm2I4&yhN^Z_u7M(Q$CJWw@+xo4)(B| z{hfj$J1I*OD`DT z8cFN#!?(|?@QUX#s9WZ%zUiw!4VM>j*>M58@I%obaTHht36#!kUO6-YA!-z{l8;!r zSLg&{7oR2Wf6%MC3k_NcpMR>a8_%m08egFmyLk0@DFJSY2(MYsTe}N7bm>Qx>y~kq z-?(oad?5n}TA%+OP49(&|BE*;WZCh_xx>m@$|cJO2p?G98z?kZQ4<-qciGVjky%{=^;4z>HqBSVo8CK^K11E>lz~Jh-jCe9_ z70?@c1o377=#)h&*fkU$2sLL#;J}`Ny2IfN04xba$LdeI$pnpK^8W%Sg|UJ1HlTd z{Wo&{mpG&-{~5(ZN%1s{3jY%QXHC5S)S!e=prCy4@Nltm_~7Z_;_RWVhKcnr0s24Z N`#<^YpDs{P{tFUV0)zkn diff --git a/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.java b/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.java index 16b85aba..a85f8612 100644 --- a/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.java +++ b/org.gecko.emf.util.documentation.generators.markdown/xtend-gen/org/gecko/emf/util/documentation/generators/markdown/MarkdownCodeGen.java @@ -343,4 +343,40 @@ public CharSequence generateDocumentation(final EClass eClass, final EcoreToDocu } return _xblockexpression; } + + @Override + public CharSequence generateDocumentation(final EClassifier eClassifier, final EcoreToDocumentationOptions docGenOption) { + CharSequence _xblockexpression = null; + { + boolean _equals = EcoreToDocumentationOptions.MARKDOWN_WITH_MERMAID_CLASS_DIAGRAM.equals(docGenOption); + if (_equals) { + MermaidClassDiagramCodeGen _mermaidClassDiagramCodeGen = new MermaidClassDiagramCodeGen(); + this.classDiagramCodeGen = _mermaidClassDiagramCodeGen; + this.diagramStartSyntax = "```mermaid"; + } else { + boolean _equals_1 = EcoreToDocumentationOptions.MARKDOWN_WITH_PLANTUML_CLASS_DIAGRAM.equals(docGenOption); + if (_equals_1) { + PlantumlClassDiagramCodeGen _plantumlClassDiagramCodeGen = new PlantumlClassDiagramCodeGen(); + this.classDiagramCodeGen = _plantumlClassDiagramCodeGen; + this.diagramStartSyntax = "```plantuml"; + } + } + StringConcatenation _builder = new StringConcatenation(); + { + if ((eClassifier instanceof EClass)) { + CharSequence _classOverview = this.toClassOverview(((EClass) eClassifier)); + _builder.append(_classOverview); + _builder.newLineIfNotEmpty(); + } else { + if ((eClassifier instanceof EEnum)) { + CharSequence _enumOverview = this.toEnumOverview(((EEnum) eClassifier)); + _builder.append(_enumOverview); + _builder.newLineIfNotEmpty(); + } + } + } + _xblockexpression = _builder; + } + return _xblockexpression; + } } diff --git a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend index 2146e4d7..2d2119dd 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.mermaid/src/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.xtend @@ -72,6 +72,15 @@ var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | e «ENDIF» ''' + def toClassDiagram(EClassifier eclassifier) + ''' +«IF eclassifier instanceof EClass» +«toClassDiagram(eclassifier as EClass)» +«ELSEIF eclassifier instanceof EEnum» +«toEnumerator(eclassifier as EEnum)» +«ENDIF» + ''' + def toClassMembers(EClass eclass) ''' «IF eclass.EAttributes.isEmpty» @@ -159,4 +168,12 @@ var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | e «toClassDiagram(eClass)» ''' } + + override generateClassDiagram(EClassifier eClassifier) { + ''' +«startMermaidClassDiagram()» +«toClassDiagram(eClassifier)» + ''' + } + } \ No newline at end of file diff --git a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.MermaidClassDiagramCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/.MermaidClassDiagramCodeGen.xtendbin index 153307d6aa096c7d284c3eafe301c43e4df93b5c..ea8f94ddec6d07763aad6731d28236805b91a1e7 100644 GIT binary patch literal 6962 zcmaKxWl$VSx2|ypcbA~S-Q6L$ySqDq0fL1gz+i#kE(z{V@WDa?1Ro?Yg9HgS2?-2- zv(Nc)_IK*uySl5o`>E>H{p+o_)-upW#~?=m001b~2BBss{|fxSdskmKK4*Ww5LdsD z;3g|<;N~O+B^DPcx!9n~RQD;b{^#@($(Qul*p{LD7TtRk;&d!ZI6|6&D4d&`OX9XP z44NOq7Bd&No^M5RY(>^YUJPz_UNFRtFCj1F3<8;dY#Fciq&ij@zhAy=N>B3U7*Bl*^+5+Z{#>BpQ;s6*_T z9oMSd84c%^7HzE>!)BD|gKXF<2vj{zmI1_4$ z#l~o*n`JZk-?B+*oZy~ShZOwzNCwYX=9!b#EU-@n_1$A-ht&J6HnLacT8o?oLCVhx z3Qg%cY+Brh-iKm!HCWcpELdm24&?uYpq%z>Kno*?xy-&tj{0~zpIZv~q+(y)ZVd)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qZ7SI<+zs&6Y-8%gy7 zFdHoLD`4a`$U7UvWfC2p_w}K}=ys+P&@Iva-;VU{%p6A{y?8ILprgvhUeY+yphZ7p z1sRCc{Lr+aOUen5((2I4Kyh%dR#5#PhkulN{lcKdAOk0)=Y}IdVZ8Y$KA#29p`9hV z8OXal8Jke6E1=V%4e9!6x92cE?%MV4N~2J8v+M~)Rf)a}a!&Q>Gu}Wdrpz7dvCCQ4 z95Ed5@UX}j+;Ng-n50r<%;o3UK}K>EGW^+C&L^UK1A9BJ@L8Jbb?M<#YI~ym26ek+ z^RK~-&z}W;fhB*WYZBWG*Fi}xlvjpLsv)pl9=IeDQHN@b`OPX>fbD)_We1;suzP9{j!!1nrC7zUIM zie{S%4+YVK^jKx}P((wO_(kd{erOV&4NDj;6ac~{d(40z;zg*T0HA)B`{zS8WRFx( zZ#)|n6akbK)JXm%0sdsDlk^b`7ar=wk4S|x4h4}tM)}}CneqQ5!}UNBN+>2M8R(q+ zkrIjvicm*&!ufth{6nBMnLAevEHt!Prhf>8jzNL;pTfw$rOQ7I`k(giGRgnm`ERcM uBW?a;!GERD|4r!p?+E|C*Z({_^KZa^(@-CPjq^`@%)hPU?@UemkN01@>7Zl) diff --git a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java index 610313d7..55714eec 100644 --- a/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java +++ b/org.gecko.emf.util.documentation.generators.mermaid/xtend-gen/org/gecko/emf/util/documentation/generators/mermaid/MermaidClassDiagramCodeGen.java @@ -139,6 +139,24 @@ public CharSequence toClassDiagram(final EClass eclass) { return _builder; } + public CharSequence toClassDiagram(final EClassifier eclassifier) { + StringConcatenation _builder = new StringConcatenation(); + { + if ((eclassifier instanceof EClass)) { + CharSequence _classDiagram = this.toClassDiagram(((EClass) eclassifier)); + _builder.append(_classDiagram); + _builder.newLineIfNotEmpty(); + } else { + if ((eclassifier instanceof EEnum)) { + CharSequence _enumerator = this.toEnumerator(((EEnum) eclassifier)); + _builder.append(_enumerator); + _builder.newLineIfNotEmpty(); + } + } + } + return _builder; + } + public CharSequence toClassMembers(final EClass eclass) { StringConcatenation _builder = new StringConcatenation(); { @@ -316,4 +334,16 @@ public CharSequence generateClassDiagram(final EClass eClass) { _builder.newLineIfNotEmpty(); return _builder; } + + @Override + public CharSequence generateClassDiagram(final EClassifier eClassifier) { + StringConcatenation _builder = new StringConcatenation(); + CharSequence _startMermaidClassDiagram = this.startMermaidClassDiagram(); + _builder.append(_startMermaidClassDiagram); + _builder.newLineIfNotEmpty(); + CharSequence _classDiagram = this.toClassDiagram(eClassifier); + _builder.append(_classDiagram); + _builder.newLineIfNotEmpty(); + return _builder; + } } diff --git a/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.xtend b/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.xtend index 44c8190f..f12bc46d 100644 --- a/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.xtend +++ b/org.gecko.emf.util.documentation.generators.plantuml/src/org/gecko/emf/util/documentation/generators/plantuml/PlantumlClassDiagramCodeGen.xtend @@ -79,6 +79,15 @@ var List enums = eclassifiers.filter[ec | ec instanceof EEnum].map[ec | e «ENDIF» ''' + def toClassDiagram(EClassifier eclassifier) + ''' +«IF eclassifier instanceof EClass» +«toClassDiagram(eclassifier as EClass)» +«ELSEIF eclassifier instanceof EEnum» +«toEnumerator(eclassifier as EEnum)» +«ENDIF» + ''' + def toClassMembers(EClass eclass) ''' «FOR attribute: eclass.EAttributes» @@ -198,6 +207,14 @@ end note ''' «startPlantumlClassDiagram()» «toClassDiagram(eClass)» +«endPlantumlClassDiagram()» + ''' + } + + override generateClassDiagram(EClassifier eClassifier) { + ''' +«startPlantumlClassDiagram()» +«toClassDiagram(eClassifier)» «endPlantumlClassDiagram()» ''' } diff --git a/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.PlantumlClassDiagramCodeGen.xtendbin b/org.gecko.emf.util.documentation.generators.plantuml/xtend-gen/org/gecko/emf/util/documentation/generators/plantuml/.PlantumlClassDiagramCodeGen.xtendbin index f06b12500d7578dc9f3d663c4ba59541d657c6b6..e3e0ae4658b62a41b24c26523c680da34fe4482f 100644 GIT binary patch literal 8027 zcmaKxRahKKv#tjSFoV0h1lPgcA-Fq11}C^?a2SFI3xq*~1$Phb5}W|R-EEKn0TT9F z=Vt$VKj)n4i%Mxsx=LFO01UgD1|jvzvK|rvYjXF7Hi658|>HYr*|b58#HmSuz}5MC)VD=;qclC zk1l@m<4kDK{l?kFSrwDG-^JsQnbTJO$mQh32@&JxSmA`ECDzm?r~F-_gQnJ6iw+^D z;zs*Ep;W{A*5F*oULe|K`f5o4hV%ru@xz+q0fynMiCZ!C{P_3lAK|4n-YZMKr!BL2 zUW=p&)(P)EXX#oL*qN>y9QI3el|j-hYDc{)h1DIC1lr^i^N0Z@?2Tv^g0A~shTXy8 z8@08jFv2ryEg5Ih+rtCO_eG9h>&unaZ}E=u=evua@V;!ijku4cLhREpHCCN4LaWPD zoShjOsLBnBvqq~B>c*LbNGs~!zIUXFd)^gef3$k=4WmVUUb(a0;+ezDc6S8GCm}(p zW=@48!=lp50ZZZZZw8OR0?0YBseo}s--nzRHV%7(4y8tA9CW!PaWz_R)Roypf( zO(+^BrJPSth%#QP)AWz2wJkr*?Y~JHeuH6wDI+xz7VGtKe!4uFehq}%M#k#--Wpx4Wrt!isyBbE zR~lZ#nRWqx*+3-T>!bXdsf3)@4Nj_QQ|pBs`SrtU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