diff --git a/plugins/org.obeonetwork.m2doc.sirius/src/org/obeonetwork/m2doc/sirius/services/M2DocSiriusServices.java b/plugins/org.obeonetwork.m2doc.sirius/src/org/obeonetwork/m2doc/sirius/services/M2DocSiriusServices.java index 8e331c740..f487bc728 100644 --- a/plugins/org.obeonetwork.m2doc.sirius/src/org/obeonetwork/m2doc/sirius/services/M2DocSiriusServices.java +++ b/plugins/org.obeonetwork.m2doc.sirius/src/org/obeonetwork/m2doc/sirius/services/M2DocSiriusServices.java @@ -1,8 +1,19 @@ +/******************************************************************************* + * Copyright (c) 2017, 2024 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ package org.obeonetwork.m2doc.sirius.services; import java.io.File; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.LinkedHashSet; import java.util.List; @@ -57,6 +68,13 @@ @SuppressWarnings({"checkstyle:javadocmethod", "checkstyle:javadoctype"}) public class M2DocSiriusServices { + /** + * The default image format. + */ + private static final String JPG = "JPG"; + + private static final Set VALID_IMAGE_FORMATS = initializeValidImageFormats(); + /** * Registry of cleaning jobs. * @@ -98,12 +116,6 @@ public void clean(Object key) { } - /** - * The {@link ExportFormat}. - */ - private static final ExportFormat FORMAT = new ExportFormat(ExportFormat.ExportDocumentFormat.NONE, - ImageFileFormat.JPG); - /** * The Sirius {@link Session}. */ @@ -169,6 +181,19 @@ public M2DocSiriusServices(Session session, boolean forceRefresh) { } } + private static Set initializeValidImageFormats() { + final Set res = new LinkedHashSet<>(); + + res.add(ImageFileFormat.BMP.getName()); + res.add(ImageFileFormat.GIF.getName()); + res.add(ImageFileFormat.JPG.getName()); + res.add(ImageFileFormat.JPEG.getName()); + res.add(ImageFileFormat.PNG.getName()); + res.add(ImageFileFormat.SVG.getName()); + + return res; + } + // @formatter:off @Documentation( value = "Returns true if the arguments are not null, the eObject is in a session and there's a representation description with the specified name in it that is associated to the specified eObject. Returns false otherwise.", @@ -301,6 +326,26 @@ public boolean isRepresentationName(String representationName) { // @formatter:on public MImage asImage(DRepresentation representation, boolean refresh, Set layerNames) throws SizeTooLargeException, IOException { + return asImage(representation, JPG, refresh, layerNames); + } + + // @formatter:off + @Documentation( + value = "Insert the image of the given representation if it's a diagram.", + params = { + @Param(name = "representation", value = "the DRepresentation"), + @Param(name = "format", value = "the image format: BMP, GIF, JPG, JPEG, PNG, SVG"), + @Param(name = "refresh", value = "true to refresh the representation"), + @Param(name = "layerNames", value = "the OrderedSet of layer names to activate"), + }, + result = "insert the image of the given representation if it's a diagram.", + examples = { + @Example(expression = "dRepresentation.asImage('JPG', true, OrderedSet{'Layer 1', 'Layer 2'})", result = "insert the image of the given representation if it's a diagram"), + } + ) + // @formatter:on + public MImage asImage(DRepresentation representation, String format, boolean refresh, Set layerNames) + throws SizeTooLargeException, IOException { final MImage res; if (representation instanceof DDiagram) { @@ -313,13 +358,13 @@ public MImage asImage(DRepresentation representation, boolean refresh, Set layerNames = getActivatedLayerNames(representation); res = asImage(representation, forceRefresh || refresh, layerNames); } else { - res = internalAsImage(representation); + res = internalAsImage(representation, format); } return res; @@ -396,13 +478,23 @@ private Set getActivatedLayerNames(final DRepresentation representation) * * @param representation * the {@link DRepresentation} to export + * @param format + * the image format * @return the exported {@link MImage} * @throws IOException * if the image can't be serialized */ - protected MImage internalAsImage(final DRepresentation representation) throws IOException { + protected MImage internalAsImage(final DRepresentation representation, String format) throws IOException { final MImage res; - final File tmpFile = File.createTempFile(sanitize(representation.getName()) + "-m2doc", ".jpg"); + + if (!VALID_IMAGE_FORMATS.contains(format)) { + final String validFormatString = Arrays.toString(VALID_IMAGE_FORMATS.toArray()); + throw new IllegalArgumentException(format + " is not a valide format: " + validFormatString); + } + final ExportFormat exportFormat = new ExportFormat(ExportFormat.ExportDocumentFormat.NONE, + ImageFileFormat.resolveImageFormat(format)); + final File tmpFile = File.createTempFile(sanitize(representation.getName()) + "-m2doc", + "." + format.toLowerCase()); tmpFiles.add(tmpFile); // Make sure to run the Sirius image export in the UI thread. @@ -411,7 +503,7 @@ protected MImage internalAsImage(final DRepresentation representation) throws IO public void run() { try { DialectUIManager.INSTANCE.export(representation, session, new Path(tmpFile.getAbsolutePath()), - FORMAT, new NullProgressMonitor()); + exportFormat, new NullProgressMonitor()); } catch (SizeTooLargeException e) { throw new RuntimeException(e); } @@ -491,20 +583,20 @@ public List representationByDescriptionName(EObject eObj, Strin } // @formatter:off - @Documentation( - value = "Gets the Sequence of images for the diagrams associated to the given EObject with the given description name.", - params = { - @Param(name = "eObject", value = "Any eObject that is in the session where to search"), - @Param(name = "representationDescriptionName", value = "the name of the searched representation description"), - @Param(name = "refresh", value = "true to refresh the representation"), - @Param(name = "layerNames", value = "the OrderedSet of layer names to activate"), - }, - result = "the Sequence of images for the diagrams associated to the given EObject with the given description name.", - examples = { - @Example(expression = "ePackage.asImageByRepresentationDescriptionName('class diagram', true, OrderedSet{'Layer 1', 'Layer 2'})", result = "Sequence{image1, image2}"), - } - ) - // @formatter:on + @Documentation( + value = "Gets the Sequence of images for the diagrams associated to the given EObject with the given description name.", + params = { + @Param(name = "eObject", value = "Any eObject that is in the session where to search"), + @Param(name = "representationDescriptionName", value = "the name of the searched representation description"), + @Param(name = "refresh", value = "true to refresh the representation"), + @Param(name = "layerNames", value = "the OrderedSet of layer names to activate"), + }, + result = "the Sequence of images for the diagrams associated to the given EObject with the given description name.", + examples = { + @Example(expression = "ePackage.asImageByRepresentationDescriptionName('class diagram', true, OrderedSet{'Layer 1', 'Layer 2'})", result = "Sequence{image1, image2}"), + } + ) + // @formatter:on public List asImageByRepresentationDescriptionName(EObject eObj, String descriptionName, boolean refresh, Set layerNames) throws SizeTooLargeException, IOException { final List res = new ArrayList<>(); @@ -518,6 +610,35 @@ public List asImageByRepresentationDescriptionName(EObject eObj, String return res; } + // @formatter:off + @Documentation( + value = "Gets the Sequence of images for the diagrams associated to the given EObject with the given description name.", + params = { + @Param(name = "eObject", value = "Any eObject that is in the session where to search"), + @Param(name = "representationDescriptionName", value = "the name of the searched representation description"), + @Param(name = "format", value = "the image format: BMP, GIF, JPG, JPEG, PNG, SVG"), + @Param(name = "refresh", value = "true to refresh the representation"), + @Param(name = "layerNames", value = "the OrderedSet of layer names to activate"), + }, + result = "the Sequence of images for the diagrams associated to the given EObject with the given description name.", + examples = { + @Example(expression = "ePackage.asImageByRepresentationDescriptionName('class diagram', 'JPG', true, OrderedSet{'Layer 1', 'Layer 2'})", result = "Sequence{image1, image2}"), + } + ) + // @formatter:on + public List asImageByRepresentationDescriptionName(EObject eObj, String descriptionName, String format, + boolean refresh, Set layerNames) throws SizeTooLargeException, IOException { + final List res = new ArrayList<>(); + + List representations = new ArrayList<>(SiriusRepresentationUtils + .getRepresentationByRepresentationDescriptionName(session, eObj, descriptionName)); + for (DRepresentation representation : representations) { + res.add(asImage(representation, format, refresh, layerNames)); + } + + return res; + } + // @formatter:off @Documentation( value = "Gets the Sequence of images for the diagrams associated to the given EObject with the given description name.", @@ -537,19 +658,19 @@ public List asImageByRepresentationDescriptionName(EObject eObj, String } // @formatter:off - @Documentation( - value = "Gets the Sequence of images for the diagrams associated to the given EObject with the given description name.", - params = { - @Param(name = "eObject", value = "Any eObject that is in the session where to search"), - @Param(name = "representationDescriptionName", value = "the name of the searched representation description"), - @Param(name = "refresh", value = "true to refresh the representation"), - }, - result = "the Sequence of images for the diagrams associated to the given EObject with the given description name.", - examples = { - @Example(expression = "ePackage.asImageByRepresentationDescriptionName('class diagram', true)", result = "Sequence{image1, image2}"), - } - ) - // @formatter:on + @Documentation( + value = "Gets the Sequence of images for the diagrams associated to the given EObject with the given description name.", + params = { + @Param(name = "eObject", value = "Any eObject that is in the session where to search"), + @Param(name = "representationDescriptionName", value = "the name of the searched representation description"), + @Param(name = "refresh", value = "true to refresh the representation"), + }, + result = "the Sequence of images for the diagrams associated to the given EObject with the given description name.", + examples = { + @Example(expression = "ePackage.asImageByRepresentationDescriptionName('class diagram', true)", result = "Sequence{image1, image2}"), + } + ) + // @formatter:on public List asImageByRepresentationDescriptionName(EObject eObj, String descriptionName, boolean refresh) throws SizeTooLargeException, IOException { final List res = new ArrayList<>(); @@ -564,18 +685,46 @@ public List asImageByRepresentationDescriptionName(EObject eObj, String } // @formatter:off - @Documentation( - value = "Gets the Sequence of tables for the tables associated to the given EObject with the given description name (with header styles).", - params = { - @Param(name = "eObject", value = "Any eObject that is in the session where to search"), - @Param(name = "representationDescriptionName", value = "the name of the searched representation description (with header styles)"), - }, - result = "the Sequence of tables for the tables associated to the given EObject with the given description name (with header styles).", - examples = { - @Example(expression = "ePackage.asTableByRepresentationDescriptionName('dependency table')", result = "Sequence{table1, table2}"), + @Documentation( + value = "Gets the Sequence of images for the diagrams associated to the given EObject with the given description name.", + params = { + @Param(name = "eObject", value = "Any eObject that is in the session where to search"), + @Param(name = "representationDescriptionName", value = "the name of the searched representation description"), + @Param(name = "format", value = "the image format: BMP, GIF, JPG, JPEG, PNG, SVG"), + @Param(name = "refresh", value = "true to refresh the representation"), + }, + result = "the Sequence of images for the diagrams associated to the given EObject with the given description name.", + examples = { + @Example(expression = "ePackage.asImageByRepresentationDescriptionName('class diagram', 'JPG', true)", result = "Sequence{image1, image2}"), + } + ) + // @formatter:on + public List asImageByRepresentationDescriptionName(EObject eObj, String descriptionName, String format, + boolean refresh) throws SizeTooLargeException, IOException { + final List res = new ArrayList<>(); + + List representations = new ArrayList<>(SiriusRepresentationUtils + .getRepresentationByRepresentationDescriptionName(session, eObj, descriptionName)); + for (DRepresentation representation : representations) { + res.add(asImage(representation, format, refresh)); } - ) - // @formatter:on + + return res; + } + + // @formatter:off + @Documentation( + value = "Gets the Sequence of tables for the tables associated to the given EObject with the given description name (with header styles).", + params = { + @Param(name = "eObject", value = "Any eObject that is in the session where to search"), + @Param(name = "representationDescriptionName", value = "the name of the searched representation description (with header styles)"), + }, + result = "the Sequence of tables for the tables associated to the given EObject with the given description name (with header styles).", + examples = { + @Example(expression = "ePackage.asTableByRepresentationDescriptionName('dependency table')", result = "Sequence{table1, table2}"), + } + ) + // @formatter:on public List asTableByRepresentationDescriptionName(EObject eObj, String descriptionName) { return asTableByRepresentationDescriptionName(eObj, descriptionName, true); } @@ -646,19 +795,19 @@ public DRepresentation representationByName(String representationName) { } // @formatter:off - @Documentation( - value = "Insert the image of the given representation name.", - params = { - @Param(name = "representationName", value = "the name of the searched representation"), - @Param(name = "refresh", value = "true to refresh the representation"), - @Param(name = "layerNames", value = "the OrderedSet of layer names to activate"), - }, - result = "Insert the image of the given representation name", - examples = { - @Example(expression = "'MyEPackage class diagram'.asImageByRepresentationName(true, OrderedSet{'Layer 1', 'Layer 2'})", result = "insert the image"), - } - ) - // @formatter:on + @Documentation( + value = "Insert the image of the given representation name.", + params = { + @Param(name = "representationName", value = "the name of the searched representation"), + @Param(name = "refresh", value = "true to refresh the representation"), + @Param(name = "layerNames", value = "the OrderedSet of layer names to activate"), + }, + result = "Insert the image of the given representation name", + examples = { + @Example(expression = "'MyEPackage class diagram'.asImageByRepresentationName(true, OrderedSet{'Layer 1', 'Layer 2'})", result = "insert the image"), + } + ) + // @formatter:on public MImage asImageByRepresentationName(String representationName, boolean refresh, Set layerNames) throws SizeTooLargeException, IOException { final MImage res; @@ -675,21 +824,69 @@ public MImage asImageByRepresentationName(String representationName, boolean ref } // @formatter:off - @Documentation( - value = "Insert the image of the given representation name.", - params = { - @Param(name = "representationName", value = "the name of the searched representation"), - }, - result = "Insert the image of the given representation name", - examples = { - @Example(expression = "'MyEPackage class diagram'.asImageByRepresentationName()", result = "insert the image"), - } - ) - // @formatter:on + @Documentation( + value = "Insert the image of the given representation name.", + params = { + @Param(name = "representationName", value = "the name of the searched representation"), + @Param(name = "format", value = "the image format: BMP, GIF, JPG, JPEG, PNG, SVG"), + @Param(name = "refresh", value = "true to refresh the representation"), + @Param(name = "layerNames", value = "the OrderedSet of layer names to activate"), + }, + result = "Insert the image of the given representation name", + examples = { + @Example(expression = "'MyEPackage class diagram'.asImageByRepresentationName('JPG, 'true, OrderedSet{'Layer 1', 'Layer 2'})", result = "insert the image"), + } + ) + // @formatter:on + public MImage asImageByRepresentationName(String representationName, String format, boolean refresh, + Set layerNames) throws SizeTooLargeException, IOException { + final MImage res; + + final DRepresentationDescriptor description = SiriusRepresentationUtils + .getAssociatedRepresentationByName(representationName, session); + if (description != null) { + res = asImage(description.getRepresentation(), format, refresh, layerNames); + } else { + res = MImage.EMPTY; + } + + return res; + } + + // @formatter:off + @Documentation( + value = "Insert the image of the given representation name.", + params = { + @Param(name = "representationName", value = "the name of the searched representation"), + }, + result = "Insert the image of the given representation name", + examples = { + @Example(expression = "'MyEPackage class diagram'.asImageByRepresentationName()", result = "insert the image"), + } + ) + // @formatter:on public MImage asImageByRepresentationName(String representationName) throws SizeTooLargeException, IOException { return asImageByRepresentationName(representationName, false); } + // @formatter:off + @Documentation( + value = "Insert the image of the given representation name.", + params = { + @Param(name = "representationName", value = "the name of the searched representation"), + @Param(name = "format", value = "the image format: BMP, GIF, JPG, JPEG, PNG, SVG"), + }, + result = "Insert the image of the given representation name", + examples = { + @Example(expression = "'MyEPackage class diagram'.asImageByRepresentationName('JPG')", result = "insert the image"), + } + ) + // @formatter:on + public MImage asImageByRepresentationName(String representationName, String format) + throws SizeTooLargeException, IOException { + return asImageByRepresentationName(representationName, format, false); + } + // @formatter:off @Documentation( value = "Insert the image of the given representation name.", @@ -718,6 +915,35 @@ public MImage asImageByRepresentationName(String representationName, boolean ref return res; } + // @formatter:off + @Documentation( + value = "Insert the image of the given representation name.", + params = { + @Param(name = "representationName", value = "the name of the searched representation"), + @Param(name = "format", value = "the image format: BMP, GIF, JPG, JPEG, PNG, SVG"), + @Param(name = "refresh", value = "true to refresh the representation"), + }, + result = "Insert the image of the given representation name", + examples = { + @Example(expression = "'MyEPackage class diagram'.asImageByRepresentationName('JPG', true)", result = "insert the image after refreshing the representation"), + } + ) + // @formatter:on + public MImage asImageByRepresentationName(String representationName, String format, boolean refresh) + throws SizeTooLargeException, IOException { + final MImage res; + + final DRepresentationDescriptor descriptor = SiriusRepresentationUtils + .getAssociatedRepresentationByName(representationName, session); + if (descriptor != null) { + res = asImage(descriptor.getRepresentation(), format, refresh); + } else { + res = MImage.EMPTY; + } + + return res; + } + // @formatter:off @Documentation( value = "Insert the table of the given representation name (with header styles).", diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/anydsl.ecore b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/anydsl.ecore new file mode 100644 index 000000000..ad603845a --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/anydsl.ecore @@ -0,0 +1,167 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP-expected-ast.txt b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP-expected-ast.txt new file mode 100644 index 000000000..d35d8744c --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP-expected-ast.txt @@ -0,0 +1,13 @@ + +=== HEADER === + + +=== BODY === + + This demonstrate the simple usage of representationByName serviceĀ : + [query: .fit(.asImage(.representationByName('anydsl class diagram'), 'BMP'), 400, 400)] + End of demonstration. +=== FOOTER === + + +=== TEMPLATES === \ No newline at end of file diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP-expected-generation-messages.txt b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP-expected-generation-messages.txt new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP-expected-generation.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP-expected-generation.docx new file mode 100644 index 000000000..cc9fa1b84 Binary files /dev/null and b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP-expected-validation.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP-expected-validation.docx new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP-template.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP-template.docx new file mode 100644 index 000000000..5e264844e Binary files /dev/null and b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP-template.docx differ diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP.aird b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP.aird new file mode 100644 index 000000000..94370dbd5 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP.aird @@ -0,0 +1,1386 @@ + + + + anydsl.ecore + http://www.eclipse.org/emf/2002/Ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP.genconf b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP.genconf new file mode 100644 index 000000000..5a85a417e --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/asImageBMP.genconf @@ -0,0 +1,4 @@ + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/description/ecore.odesign b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/description/ecore.odesign new file mode 100644 index 000000000..48b964402 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageBMP/description/ecore.odesign @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/anydsl.ecore b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/anydsl.ecore new file mode 100644 index 000000000..ad603845a --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/anydsl.ecore @@ -0,0 +1,167 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF-expected-ast.txt b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF-expected-ast.txt new file mode 100644 index 000000000..686ffc5f4 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF-expected-ast.txt @@ -0,0 +1,13 @@ + +=== HEADER === + + +=== BODY === + + This demonstrate the simple usage of representationByName serviceĀ : + [query: .fit(.asImage(.representationByName('anydsl class diagram'), 'GIF'), 400, 400)] + End of demonstration. +=== FOOTER === + + +=== TEMPLATES === \ No newline at end of file diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF-expected-generation-messages.txt b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF-expected-generation-messages.txt new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF-expected-generation.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF-expected-generation.docx new file mode 100644 index 000000000..ea51d526d Binary files /dev/null and b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF-expected-validation.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF-expected-validation.docx new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF-template.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF-template.docx new file mode 100644 index 000000000..9a97fa6f8 Binary files /dev/null and b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF-template.docx differ diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF.aird b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF.aird new file mode 100644 index 000000000..94370dbd5 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF.aird @@ -0,0 +1,1386 @@ + + + + anydsl.ecore + http://www.eclipse.org/emf/2002/Ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF.genconf b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF.genconf new file mode 100644 index 000000000..5a85a417e --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/asImageGIF.genconf @@ -0,0 +1,4 @@ + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/description/ecore.odesign b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/description/ecore.odesign new file mode 100644 index 000000000..48b964402 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageGIF/description/ecore.odesign @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/anydsl.ecore b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/anydsl.ecore new file mode 100644 index 000000000..ad603845a --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/anydsl.ecore @@ -0,0 +1,167 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat-expected-ast.txt b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat-expected-ast.txt new file mode 100644 index 000000000..b7ed0dc67 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat-expected-ast.txt @@ -0,0 +1,13 @@ + +=== HEADER === + + +=== BODY === + + This demonstrate the simple usage of representationByName serviceĀ : + [query: .asImage(.representationByName('anydsl class diagram'), 'INVALID_FORMAT')] + End of demonstration. +=== FOOTER === + + +=== TEMPLATES === \ No newline at end of file diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat-expected-generation-messages.txt b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat-expected-generation-messages.txt new file mode 100644 index 000000000..69699fd7d --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat-expected-generation-messages.txt @@ -0,0 +1,4 @@ +ERROR - asImage(org.eclipse.sirius.viewpoint.DRepresentation,java.lang.String) with arguments [org.eclipse.sirius.diagram.model.business.internal.spec.DSemanticDiagramSpec@00000000 (uid: _CbYCALe3EeadeJgQTriozQ) (synchronized: true, isInLayoutingMode: false, isInShowingMode: false, headerHeight: 1), INVALID_FORMAT] failed: + INVALID_FORMAT is not a valide format: [BMP, GIF, JPG, JPEG, PNG, SVG] +java.lang.IllegalArgumentException: INVALID_FORMAT is not a valide format: [BMP, GIF, JPG, JPEG, PNG, SVG] +...STACK... diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat-expected-generation.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat-expected-generation.docx new file mode 100644 index 000000000..a80f68c70 Binary files /dev/null and b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat-expected-validation.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat-expected-validation.docx new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat-template.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat-template.docx new file mode 100644 index 000000000..e8df280b0 Binary files /dev/null and b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat-template.docx differ diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat.aird b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat.aird new file mode 100644 index 000000000..94370dbd5 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat.aird @@ -0,0 +1,1386 @@ + + + + anydsl.ecore + http://www.eclipse.org/emf/2002/Ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat.genconf b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat.genconf new file mode 100644 index 000000000..5a85a417e --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/asImageInvalidFormat.genconf @@ -0,0 +1,4 @@ + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/description/ecore.odesign b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/description/ecore.odesign new file mode 100644 index 000000000..48b964402 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageInvalidFormat/description/ecore.odesign @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/anydsl.ecore b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/anydsl.ecore new file mode 100644 index 000000000..ad603845a --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/anydsl.ecore @@ -0,0 +1,167 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG-expected-ast.txt b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG-expected-ast.txt new file mode 100644 index 000000000..362f3fe53 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG-expected-ast.txt @@ -0,0 +1,13 @@ + +=== HEADER === + + +=== BODY === + + This demonstrate the simple usage of representationByName serviceĀ : + [query: .fit(.asImage(.representationByName('anydsl class diagram'), 'JPEG'), 400, 400)] + End of demonstration. +=== FOOTER === + + +=== TEMPLATES === \ No newline at end of file diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG-expected-generation-messages.txt b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG-expected-generation-messages.txt new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG-expected-generation.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG-expected-generation.docx new file mode 100644 index 000000000..1a31a3f3e Binary files /dev/null and b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG-expected-validation.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG-expected-validation.docx new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG-template.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG-template.docx new file mode 100644 index 000000000..b6cf02c3f Binary files /dev/null and b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG-template.docx differ diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG.aird b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG.aird new file mode 100644 index 000000000..94370dbd5 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG.aird @@ -0,0 +1,1386 @@ + + + + anydsl.ecore + http://www.eclipse.org/emf/2002/Ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG.genconf b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG.genconf new file mode 100644 index 000000000..5a85a417e --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/asImageJPEG.genconf @@ -0,0 +1,4 @@ + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/description/ecore.odesign b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/description/ecore.odesign new file mode 100644 index 000000000..48b964402 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPEG/description/ecore.odesign @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/anydsl.ecore b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/anydsl.ecore new file mode 100644 index 000000000..ad603845a --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/anydsl.ecore @@ -0,0 +1,167 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG-expected-ast.txt b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG-expected-ast.txt new file mode 100644 index 000000000..3569824ca --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG-expected-ast.txt @@ -0,0 +1,13 @@ + +=== HEADER === + + +=== BODY === + + This demonstrate the simple usage of representationByName serviceĀ : + [query: .fit(.asImage(.representationByName('anydsl class diagram'), 'JPG'), 400, 400)] + End of demonstration. +=== FOOTER === + + +=== TEMPLATES === \ No newline at end of file diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG-expected-generation-messages.txt b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG-expected-generation-messages.txt new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG-expected-generation.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG-expected-generation.docx new file mode 100644 index 000000000..e49525bdc Binary files /dev/null and b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG-expected-validation.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG-expected-validation.docx new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG-template.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG-template.docx new file mode 100644 index 000000000..345e25c53 Binary files /dev/null and b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG-template.docx differ diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG.aird b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG.aird new file mode 100644 index 000000000..94370dbd5 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG.aird @@ -0,0 +1,1386 @@ + + + + anydsl.ecore + http://www.eclipse.org/emf/2002/Ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG.genconf b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG.genconf new file mode 100644 index 000000000..5a85a417e --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/asImageJPG.genconf @@ -0,0 +1,4 @@ + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/description/ecore.odesign b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/description/ecore.odesign new file mode 100644 index 000000000..48b964402 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageJPG/description/ecore.odesign @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/anydsl.ecore b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/anydsl.ecore new file mode 100644 index 000000000..ad603845a --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/anydsl.ecore @@ -0,0 +1,167 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG-expected-ast.txt b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG-expected-ast.txt new file mode 100644 index 000000000..39ff729b4 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG-expected-ast.txt @@ -0,0 +1,13 @@ + +=== HEADER === + + +=== BODY === + + This demonstrate the simple usage of representationByName serviceĀ : + [query: .fit(.asImage(.representationByName('anydsl class diagram'), 'PNG'), 400, 400)] + End of demonstration. +=== FOOTER === + + +=== TEMPLATES === \ No newline at end of file diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG-expected-generation-messages.txt b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG-expected-generation-messages.txt new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG-expected-generation.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG-expected-generation.docx new file mode 100644 index 000000000..b423f3927 Binary files /dev/null and b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG-expected-validation.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG-expected-validation.docx new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG-template.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG-template.docx new file mode 100644 index 000000000..13399a74e Binary files /dev/null and b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG-template.docx differ diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG.aird b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG.aird new file mode 100644 index 000000000..94370dbd5 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG.aird @@ -0,0 +1,1386 @@ + + + + anydsl.ecore + http://www.eclipse.org/emf/2002/Ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG.genconf b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG.genconf new file mode 100644 index 000000000..5a85a417e --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/asImagePNG.genconf @@ -0,0 +1,4 @@ + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/description/ecore.odesign b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/description/ecore.odesign new file mode 100644 index 000000000..48b964402 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImagePNG/description/ecore.odesign @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/anydsl.ecore b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/anydsl.ecore new file mode 100644 index 000000000..ad603845a --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/anydsl.ecore @@ -0,0 +1,167 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG-expected-ast.txt b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG-expected-ast.txt new file mode 100644 index 000000000..3502fb29e --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG-expected-ast.txt @@ -0,0 +1,13 @@ + +=== HEADER === + + +=== BODY === + + This demonstrate the simple usage of representationByName serviceĀ : + [query: .fit(.asImage(.representationByName('anydsl class diagram'), 'SVG'), 400, 400)] + End of demonstration. +=== FOOTER === + + +=== TEMPLATES === \ No newline at end of file diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG-expected-generation-messages.txt b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG-expected-generation-messages.txt new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG-expected-generation.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG-expected-generation.docx new file mode 100644 index 000000000..e7911ba81 Binary files /dev/null and b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG-expected-generation.docx differ diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG-expected-validation.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG-expected-validation.docx new file mode 100644 index 000000000..e69de29bb diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG-template.docx b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG-template.docx new file mode 100644 index 000000000..71409d275 Binary files /dev/null and b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG-template.docx differ diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG.aird b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG.aird new file mode 100644 index 000000000..94370dbd5 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG.aird @@ -0,0 +1,1386 @@ + + + + anydsl.ecore + http://www.eclipse.org/emf/2002/Ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG.genconf b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG.genconf new file mode 100644 index 000000000..5a85a417e --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/asImageSVG.genconf @@ -0,0 +1,4 @@ + + + + diff --git a/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/description/ecore.odesign b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/description/ecore.odesign new file mode 100644 index 000000000..48b964402 --- /dev/null +++ b/tests/org.obeonetwork.m2doc.sirius.tests/resources/m2DocSiriusServices/asImageSVG/description/ecore.odesign @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + +