Bug 569249 - [Model2Doc] If there is two tables one before the other tables are merged
* add EmptyLine element to the document structure
* add EmptyLine element after each table
Signed-off-by: Pauline DEVILLE <pauline.deville@cea.fr>
Change-Id: I30cba0af919c89fdb0ccb38dbc57ce826cd06d9f
diff --git a/plugins/core/org.eclipse.papyrus.model2doc.core/src/org/eclipse/papyrus/model2doc/core/transcription/Transcription.java b/plugins/core/org.eclipse.papyrus.model2doc.core/src/org/eclipse/papyrus/model2doc/core/transcription/Transcription.java
index cd1f304..e953cbf 100755
--- a/plugins/core/org.eclipse.papyrus.model2doc.core/src/org/eclipse/papyrus/model2doc/core/transcription/Transcription.java
+++ b/plugins/core/org.eclipse.papyrus.model2doc.core/src/org/eclipse/papyrus/model2doc/core/transcription/Transcription.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2019 CEA LIST.
+ * Copyright (c) 2019, 2020 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -11,6 +11,8 @@
* Contributors:
* Yupanqui Munoz (CEA LIST) yupanqui.munozjulho@cea.fr - Initial API and implementation
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Bug 569249
+ *
*****************************************************************************/
package org.eclipse.papyrus.model2doc.core.transcription;
@@ -148,6 +150,11 @@
public void writeImageSubtitle(ImageDescription image);
/**
+ * Insert an empty empty line
+ */
+ public void insertEmptyLine();
+
+ /**
* Save transcription.
*
* @param label
diff --git a/plugins/docx/org.eclipse.papyrus.model2doc.docx/src/org/eclipse/papyrus/model2doc/docx/internal/transcription/DocxTranscription.java b/plugins/docx/org.eclipse.papyrus.model2doc.docx/src/org/eclipse/papyrus/model2doc/docx/internal/transcription/DocxTranscription.java
index 2565e5b..5030964 100755
--- a/plugins/docx/org.eclipse.papyrus.model2doc.docx/src/org/eclipse/papyrus/model2doc/docx/internal/transcription/DocxTranscription.java
+++ b/plugins/docx/org.eclipse.papyrus.model2doc.docx/src/org/eclipse/papyrus/model2doc/docx/internal/transcription/DocxTranscription.java
@@ -11,6 +11,8 @@
* Contributors:
* Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Initial API and implementation
* Vincent LORENZO (CEA LIST) vincent.lorenzo@cea.fr - bug 569059
+ * Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Bug 569249
+ *
*****************************************************************************/
package org.eclipse.papyrus.model2doc.docx.internal.transcription;
@@ -376,6 +378,15 @@
return ecoreURi;
}
+ /**
+ * @see org.eclipse.papyrus.model2doc.core.transcription.Transcription#insertEmptyLine()
+ *
+ */
+ @Override
+ public void insertEmptyLine() {
+ document.createParagraph();
+ }
+
@Override
public IDocumentGeneratorConfiguration getGeneratorConfig() {
// TODO Auto-generated method stub
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/META-INF/MANIFEST.MF b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/META-INF/MANIFEST.MF
index 08dca6f..f9c63f4 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/META-INF/MANIFEST.MF
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/META-INF/MANIFEST.MF
@@ -12,7 +12,7 @@
Export-Package: org.eclipse.papyrus.model2doc.emf.documentstructure.edit.validators,
org.eclipse.papyrus.model2doc.emf.documentstructure.provider
Require-Bundle: org.eclipse.osgi;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.15.0,4.0.0)";resolution:=optional;x-installation:=greedy,
+ org.eclipse.core.runtime;bundle-version="[3.15.0,4.0.0)";x-installation:=greedy;resolution:=optional,
org.eclipse.papyrus.model2doc.emf.documentstructure;bundle-version="[0.7.0,1.0.0)",
org.eclipse.emf.edit;bundle-version="[2.14.0,3.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.17.0,3.0.0)",
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/customIcons/EmptyLine.gif b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/customIcons/EmptyLine.gif
new file mode 100755
index 0000000..d8be8dd
--- /dev/null
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/customIcons/EmptyLine.gif
Binary files differ
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/icons/full/obj16/EmptyLine.gif b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/icons/full/obj16/EmptyLine.gif
new file mode 100755
index 0000000..d8be8dd
--- /dev/null
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/icons/full/obj16/EmptyLine.gif
Binary files differ
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/plugin.properties b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/plugin.properties
index c328450..0414619 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/plugin.properties
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/plugin.properties
@@ -62,3 +62,4 @@
_UI_InsertedFile_type = Inserted File
_UI_TableOfFigures_type = Table Of Figures
_UI_TableOfFigures_tofTitle_feature = Tof Title
+_UI_EmptyLine_type = Empty Line
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/BodyItemProvider.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/BodyItemProvider.java
index 2f6358b..678b494 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/BodyItemProvider.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/BodyItemProvider.java
@@ -197,6 +197,9 @@
newChildDescriptors.add(createChildParameter(DocumentStructurePackage.Literals.BODY__BODY_PART,
DocumentStructureFactory.eINSTANCE.createInsertedFile()));
+
+ newChildDescriptors.add(createChildParameter(DocumentStructurePackage.Literals.BODY__BODY_PART,
+ DocumentStructureFactory.eINSTANCE.createEmptyLine()));
}
/**
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/DocumentStructureItemProviderAdapterFactory.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/DocumentStructureItemProviderAdapterFactory.java
index db357cb..4e1051b 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/DocumentStructureItemProviderAdapterFactory.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/DocumentStructureItemProviderAdapterFactory.java
@@ -468,6 +468,31 @@
}
/**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.model2doc.emf.documentstructure.EmptyLine} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected EmptyLineItemProvider emptyLineItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.model2doc.emf.documentstructure.EmptyLine}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createEmptyLineAdapter() {
+ if (emptyLineItemProvider == null) {
+ emptyLineItemProvider = new EmptyLineItemProvider(this);
+ }
+
+ return emptyLineItemProvider;
+ }
+
+ /**
* This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -655,6 +680,9 @@
if (insertedFileItemProvider != null) {
insertedFileItemProvider.dispose();
}
+ if (emptyLineItemProvider != null) {
+ emptyLineItemProvider.dispose();
+ }
}
/**
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/EmptyLineItemProvider.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/EmptyLineItemProvider.java
new file mode 100755
index 0000000..06f17cc
--- /dev/null
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/EmptyLineItemProvider.java
@@ -0,0 +1,199 @@
+/**
+ * Copyright (c) 2019 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.model2doc.emf.documentstructure.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.model2doc.emf.documentstructure.DocumentStructureFactory;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.DocumentStructurePackage;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.EmptyLine;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.model2doc.emf.documentstructure.EmptyLine} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class EmptyLineItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EmptyLineItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(DocumentStructurePackage.Literals.BODY_PART__DATA_SOURCE);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns EmptyLine.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/EmptyLine")); //$NON-NLS-1$
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_EmptyLine_type"); //$NON-NLS-1$
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(EmptyLine.class)) {
+ case DocumentStructurePackage.NEW_LINE__DATA_SOURCE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(DocumentStructurePackage.Literals.BODY_PART__DATA_SOURCE,
+ DocumentStructureFactory.eINSTANCE.createEMFDataSource()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
+ }
+
+}
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/ParagraphItemProvider.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/ParagraphItemProvider.java
index e9e708b..18a7007 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/ParagraphItemProvider.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/ParagraphItemProvider.java
@@ -253,6 +253,9 @@
newChildDescriptors.add(createChildParameter(DocumentStructurePackage.Literals.COMPOSED_BODY_PART__SUB_BODY_PART,
DocumentStructureFactory.eINSTANCE.createInsertedFile()));
+
+ newChildDescriptors.add(createChildParameter(DocumentStructurePackage.Literals.COMPOSED_BODY_PART__SUB_BODY_PART,
+ DocumentStructureFactory.eINSTANCE.createEmptyLine()));
}
/**
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/TitleItemProvider.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/TitleItemProvider.java
index 5d72ac8..10406a5 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/TitleItemProvider.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.edit/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/provider/TitleItemProvider.java
@@ -253,6 +253,9 @@
newChildDescriptors.add(createChildParameter(DocumentStructurePackage.Literals.COMPOSED_BODY_PART__SUB_BODY_PART,
DocumentStructureFactory.eINSTANCE.createInsertedFile()));
+
+ newChildDescriptors.add(createChildParameter(DocumentStructurePackage.Literals.COMPOSED_BODY_PART__SUB_BODY_PART,
+ DocumentStructureFactory.eINSTANCE.createEmptyLine()));
}
/**
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.editor/META-INF/MANIFEST.MF b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.editor/META-INF/MANIFEST.MF
index b7350d4..c8bbe13 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.editor/META-INF/MANIFEST.MF
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.editor/META-INF/MANIFEST.MF
@@ -19,9 +19,11 @@
org.eclipse.papyrus.model2doc.core.builtintypes.edit;bundle-version="[0.7.0,1.0.0)",
org.eclipse.emf.ecore.edit;bundle-version="[2.12.0,3.0.0)",
org.eclipse.papyrus.model2doc.core.generatorconfiguration.edit;bundle-version="[0.7.0,1.0.0)",
+ org.eclipse.papyrus.model2doc.core.styles.edit;bundle-version="[0.8.0,1.0.0)",
org.eclipse.papyrus.model2doc.emf.documentstructure;bundle-version="[0.7.0,1.0.0)",
org.eclipse.papyrus.model2doc.core.generatorconfiguration;bundle-version="[0.7.0,1.0.0)",
org.eclipse.papyrus.model2doc.core.builtintypes;bundle-version="[0.7.0,1.0.0)",
org.eclipse.papyrus.model2doc.core.author;bundle-version="[0.7.0,1.0.0)",
- org.eclipse.papyrus.model2doc.core.author.edit;bundle-version="[0.7.0,1.0.0)"
+ org.eclipse.papyrus.model2doc.core.author.edit;bundle-version="[0.7.0,1.0.0)",
+ org.eclipse.papyrus.model2doc.core.styles;bundle-version="[0.8.0,1.0.0)"
Bundle-ActivationPolicy: lazy
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.editor/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/presentation/DocumentStructureEditor.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.editor/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/presentation/DocumentStructureEditor.java
index 0192418..d158312 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.editor/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/presentation/DocumentStructureEditor.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.editor/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/presentation/DocumentStructureEditor.java
@@ -164,6 +164,7 @@
import org.eclipse.papyrus.model2doc.core.generatorconfiguration.provider.GeneratorConfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.model2doc.core.styles.provider.StylesItemProviderAdapterFactory;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
@@ -681,6 +682,7 @@
adapterFactory.addAdapterFactory(new BuiltInTypesItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new GeneratorConfigurationItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new StylesItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
// Create the command stack that will notify this editor as commands are executed.
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.editor/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/presentation/DocumentstructureEditorPlugin.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.editor/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/presentation/DocumentstructureEditorPlugin.java
index 75f82df..7bc71e4 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.editor/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/presentation/DocumentstructureEditorPlugin.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure.editor/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/presentation/DocumentstructureEditorPlugin.java
@@ -25,6 +25,7 @@
import org.eclipse.papyrus.model2doc.core.builtintypes.provider.BuiltInTypesEditPlugin;
import org.eclipse.papyrus.model2doc.core.generatorconfiguration.provider.GeneratorconfigurationEditPlugin;
+import org.eclipse.papyrus.model2doc.core.styles.provider.StylesEditPlugin;
/**
* This is the central singleton for the Documentstructure editor plugin.
@@ -65,6 +66,7 @@
BuiltInTypesEditPlugin.INSTANCE,
EcoreEditPlugin.INSTANCE,
GeneratorconfigurationEditPlugin.INSTANCE,
+ StylesEditPlugin.INSTANCE,
});
}
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/META-INF/MANIFEST.MF b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/META-INF/MANIFEST.MF
index f1734fe..7e732bc 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/META-INF/MANIFEST.MF
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/META-INF/MANIFEST.MF
@@ -12,7 +12,7 @@
org.eclipse.papyrus.model2doc.emf.documentstructure.impl,
org.eclipse.papyrus.model2doc.emf.documentstructure.internal.resource,
org.eclipse.papyrus.model2doc.emf.documentstructure.util
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.15.0,4.0.0)";resolution:=optional;x-installation:=greedy,
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.15.0,4.0.0)";x-installation:=greedy;resolution:=optional,
org.eclipse.emf.ecore;bundle-version="[2.17.0,3.0.0)",
org.eclipse.papyrus.model2doc.core.generatorconfiguration;bundle-version="[0.7.0,1.0.0)",
org.eclipse.papyrus.model2doc.core.styles;bundle-version="[0.8.0,1.0.0)",
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.ecore b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.ecore
index f5ffc2b..f6923c8 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.ecore
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.ecore
@@ -142,4 +142,5 @@
<details key="documentation" value="This element reference a file which will be inserted in the final document."/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="EmptyLine" eSuperTypes="#//LeafBodyPart"/>
</ecore:EPackage>
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.genmodel b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.genmodel
index 4e1b7d4..8846915 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.genmodel
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.genmodel
@@ -111,5 +111,6 @@
<genFeatures xsi:type="genmodel:GenFeature" createChild="false" ecoreFeature="ecore:EAttribute documentstructure.ecore#//StringVersion/version"/>
</genClasses>
<genClasses xsi:type="genmodel:GenClass" ecoreClass="documentstructure.ecore#//InsertedFile"/>
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="documentstructure.ecore#//EmptyLine"/>
</genPackages>
</genmodel:GenModel>
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.notation b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.notation
index fed5cff..cad3af2 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.notation
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.notation
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.3/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
<notation:Diagram xmi:id="_-L-nQB4fEemmq_cjeiIGww" type="PapyrusUMLClassDiagram" name="NewClassDiagram" measurementUnit="Pixel">
<children xmi:type="notation:Shape" xmi:id="_A-LCEB4gEemmq_cjeiIGww" type="Class_Shape">
<children xmi:type="notation:DecorationNode" xmi:id="_A-LpIB4gEemmq_cjeiIGww" type="Class_NameLabel"/>
@@ -696,7 +696,7 @@
<layoutConstraint xmi:type="notation:Bounds" xmi:id="__WoKznsMEemUDJPY7edDLg"/>
</children>
<element xmi:type="uml:Class" href="documentstructure.uml#__WYTIHsMEemUDJPY7edDLg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="__WnjsHsMEemUDJPY7edDLg" x="800" y="900" width="161"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__WnjsHsMEemUDJPY7edDLg" x="800" y="940" width="161"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_DBeE0HsNEemUDJPY7edDLg" type="Class_Shape">
<children xmi:type="notation:DecorationNode" xmi:id="_DBer4HsNEemUDJPY7edDLg" type="Class_NameLabel"/>
@@ -868,7 +868,7 @@
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_fUiPL5cXEemjzoOvLRrzSw"/>
</children>
<element xmi:type="uml:Class" href="documentstructure.uml#_fUOtIJcXEemjzoOvLRrzSw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fUhBAZcXEemjzoOvLRrzSw" x="1040" y="900" width="161" height="101"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fUhBAZcXEemjzoOvLRrzSw" x="1040" y="940" width="161" height="101"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_aWLU4Oj_Eem_UoEukOln_g" type="Class_Shape">
<children xmi:type="notation:DecorationNode" xmi:id="_aWNxIOj_Eem_UoEukOln_g" type="Class_NameLabel"/>
@@ -900,6 +900,32 @@
<element xmi:type="uml:Class" href="documentstructure.uml#_Tk-G0Oj_Eem_UoEukOln_g"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_aWLU4ej_Eem_UoEukOln_g" x="480" y="20" width="161"/>
</children>
+ <children xmi:type="notation:Shape" xmi:id="_k_MmYDoHEeutb_jRObmUug" type="Class_Shape">
+ <children xmi:type="notation:DecorationNode" xmi:id="_k_PCoDoHEeutb_jRObmUug" type="Class_NameLabel"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_k_PCoToHEeutb_jRObmUug" type="Class_FloatingNameLabel">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_k_PCojoHEeutb_jRObmUug" y="15"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_k_PpsDoHEeutb_jRObmUug" type="Class_AttributeCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_k_PpsToHEeutb_jRObmUug"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_k_PpsjoHEeutb_jRObmUug"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_k_PpszoHEeutb_jRObmUug"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k_PptDoHEeutb_jRObmUug"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_k_PptToHEeutb_jRObmUug" type="Class_OperationCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_k_PptjoHEeutb_jRObmUug"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_k_PptzoHEeutb_jRObmUug"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_k_PpuDoHEeutb_jRObmUug"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k_PpuToHEeutb_jRObmUug"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_k_QQwDoHEeutb_jRObmUug" type="Class_NestedClassifierCompartment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_k_QQwToHEeutb_jRObmUug"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_k_QQwjoHEeutb_jRObmUug"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_k_QQwzoHEeutb_jRObmUug"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k_QQxDoHEeutb_jRObmUug"/>
+ </children>
+ <element xmi:type="uml:Class" href="documentstructure.uml#_k-65kDoHEeutb_jRObmUug"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k_MmYToHEeutb_jRObmUug" x="800" y="760" width="161"/>
+ </children>
<styles xmi:type="notation:StringValueStyle" xmi:id="_-L-nQR4fEemmq_cjeiIGww" name="diagram_compatibility_version" stringValue="1.4.0"/>
<styles xmi:type="notation:DiagramStyle" xmi:id="_-L-nQh4fEemmq_cjeiIGww"/>
<styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_-L-nQx4fEemmq_cjeiIGww" diagramKindId="org.eclipse.papyrus.uml.diagram.class">
@@ -1253,11 +1279,12 @@
</edges>
<edges xmi:type="notation:Connector" xmi:id="_CTmSMHsNEemUDJPY7edDLg" type="Generalization_Edge" source="__Wm8oHsMEemUDJPY7edDLg" target="_04LO4HsMEemUDJPY7edDLg">
<children xmi:type="notation:DecorationNode" xmi:id="_CTm5QnsNEemUDJPY7edDLg" type="Generalization_StereotypeLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_O8tKIDoIEeutb_jRObmUug" name="IS_UPDATED_POSITION" booleanValue="true"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_CTm5Q3sNEemUDJPY7edDLg" y="40"/>
</children>
<styles xmi:type="notation:FontStyle" xmi:id="_CTm5QHsNEemUDJPY7edDLg"/>
<element xmi:type="uml:Generalization" href="documentstructure.uml#_CSdpwHsNEemUDJPY7edDLg"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_CTm5QXsNEemUDJPY7edDLg" points="[800, 940, -643984, -643984]$[660, 881, -643984, -643984]"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_CTm5QXsNEemUDJPY7edDLg" points="[800, 940, -643984, -643984]$[660, 940, -643984, -643984]$[660, 881, -643984, -643984]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CVRtMHsNEemUDJPY7edDLg" id="(0.0,0.4)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CVRtMXsNEemUDJPY7edDLg" id="(0.5429864253393665,1.0)"/>
</edges>
@@ -1273,14 +1300,16 @@
</edges>
<edges xmi:type="notation:Connector" xmi:id="_GhiSQHsNEemUDJPY7edDLg" type="InterfaceRealization_Edge" source="__Wm8oHsMEemUDJPY7edDLg" target="_vCawAG_VEemJ-foOn68QUw">
<children xmi:type="notation:DecorationNode" xmi:id="_GhiSQ3sNEemUDJPY7edDLg" type="InterfaceRealization_StereotypeLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_PCC9IDoIEeutb_jRObmUug" name="IS_UPDATED_POSITION" booleanValue="true"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_GhiSRHsNEemUDJPY7edDLg" y="40"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_GhiSRXsNEemUDJPY7edDLg" type="InterfaceRealization_NameLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_PLqzMDoIEeutb_jRObmUug" name="IS_UPDATED_POSITION" booleanValue="true"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_GhiSRnsNEemUDJPY7edDLg" y="60"/>
</children>
<styles xmi:type="notation:FontStyle" xmi:id="_GhiSQXsNEemUDJPY7edDLg"/>
<element xmi:type="uml:InterfaceRealization" href="documentstructure.uml#_GgmeIHsNEemUDJPY7edDLg"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_GhiSQnsNEemUDJPY7edDLg" points="[961, 940, -643984, -643984]$[1000, 301, -643984, -643984]"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_GhiSQnsNEemUDJPY7edDLg" points="[961, 940, -643984, -643984]$[1000, 940, -643984, -643984]$[1000, 301, -643984, -643984]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_GjbIoHsNEemUDJPY7edDLg" id="(1.0,0.4)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_GjbIoXsNEemUDJPY7edDLg" id="(0.4968944099378882,1.0)"/>
</edges>
@@ -1374,6 +1403,7 @@
</edges>
<edges xmi:type="notation:Connector" xmi:id="_r0vnYJcXEemjzoOvLRrzSw" type="Generalization_Edge" source="_fUhBAJcXEemjzoOvLRrzSw" target="_XM-SIJcXEemjzoOvLRrzSw">
<children xmi:type="notation:DecorationNode" xmi:id="_r0wOcJcXEemjzoOvLRrzSw" type="Generalization_StereotypeLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_PU7c4DoIEeutb_jRObmUug" name="IS_UPDATED_POSITION" booleanValue="true"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_r0wOcZcXEemjzoOvLRrzSw" y="40"/>
</children>
<styles xmi:type="notation:FontStyle" xmi:id="_r0vnYZcXEemjzoOvLRrzSw"/>
@@ -1384,14 +1414,16 @@
</edges>
<edges xmi:type="notation:Connector" xmi:id="_v4qIwJcXEemjzoOvLRrzSw" type="InterfaceRealization_Edge" source="_fUhBAJcXEemjzoOvLRrzSw" target="_vCawAG_VEemJ-foOn68QUw">
<children xmi:type="notation:DecorationNode" xmi:id="_v4qIw5cXEemjzoOvLRrzSw" type="InterfaceRealization_StereotypeLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_PbvPgDoIEeutb_jRObmUug" name="IS_UPDATED_POSITION" booleanValue="true"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_v4qv0JcXEemjzoOvLRrzSw" y="40"/>
</children>
<children xmi:type="notation:DecorationNode" xmi:id="_v4qv0ZcXEemjzoOvLRrzSw" type="InterfaceRealization_NameLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_PkbRcDoIEeutb_jRObmUug" name="IS_UPDATED_POSITION" booleanValue="true"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_v4qv0pcXEemjzoOvLRrzSw" y="60"/>
</children>
<styles xmi:type="notation:FontStyle" xmi:id="_v4qIwZcXEemjzoOvLRrzSw"/>
<element xmi:type="uml:InterfaceRealization" href="documentstructure.uml#_v3o1EJcXEemjzoOvLRrzSw"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_v4qIwpcXEemjzoOvLRrzSw" points="[1040, 940, -643984, -643984]$[1000, 301, -643984, -643984]"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_v4qIwpcXEemjzoOvLRrzSw" points="[1040, 940, -643984, -643984]$[1000, 940, -643984, -643984]$[1000, 301, -643984, -643984]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_v6swIJcXEemjzoOvLRrzSw" id="(0.0,0.39603960396039606)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_v6swIZcXEemjzoOvLRrzSw" id="(0.4968944099378882,1.0)"/>
</edges>
@@ -1410,6 +1442,21 @@
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_eN6bcOj_Eem_UoEukOln_g" id="(0.4968944099378882,0.0)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_eN6bcej_Eem_UoEukOln_g" id="(0.4975124378109453,1.0)"/>
</edges>
+ <edges xmi:type="notation:Connector" xmi:id="_wWtRMDoHEeutb_jRObmUug" type="InterfaceRealization_Edge" source="_k_MmYDoHEeutb_jRObmUug" target="_vCawAG_VEemJ-foOn68QUw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_wWtRMzoHEeutb_jRObmUug" type="InterfaceRealization_StereotypeLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_MkQsEDoIEeutb_jRObmUug" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_wWt4QDoHEeutb_jRObmUug" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_wWt4QToHEeutb_jRObmUug" type="InterfaceRealization_NameLabel">
+ <styles xmi:type="notation:BooleanValueStyle" xmi:id="_MpslsDoIEeutb_jRObmUug" name="IS_UPDATED_POSITION" booleanValue="true"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_wWt4QjoHEeutb_jRObmUug" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_wWtRMToHEeutb_jRObmUug"/>
+ <element xmi:type="uml:InterfaceRealization" href="documentstructure.uml#_wRFKUDoHEeutb_jRObmUug"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_wWtRMjoHEeutb_jRObmUug" points="[961, 820, -643984, -643984]$[1000, 820, -643984, -643984]$[1000, 301, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_wlf7IDoHEeutb_jRObmUug" id="(1.0,0.6)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_wlf7IToHEeutb_jRObmUug" id="(0.4968944099378882,1.0)"/>
+ </edges>
</notation:Diagram>
<css:ModelStyleSheets xmi:id="_MwqUgB4nEemmq_cjeiIGww">
<stylesheets xmi:type="css:StyleSheetReference" xmi:id="_Mwq7kB4nEemmq_cjeiIGww" path="/org.eclipse.papyrus.model2doc.emf.documentstructure/model/custom.css"/>
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.uml b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.uml
index aa7dff1..be02ff7 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.uml
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/model/documentstructure.uml
@@ -261,6 +261,9 @@
</generalization>
<interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_v3o1EJcXEemjzoOvLRrzSw" client="_fUOtIJcXEemjzoOvLRrzSw" supplier="_vCXFoG_VEemJ-foOn68QUw" contract="_vCXFoG_VEemJ-foOn68QUw"/>
</packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_k-65kDoHEeutb_jRObmUug" name="EmptyLine">
+ <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_wRFKUDoHEeutb_jRObmUug" client="_k-65kDoHEeutb_jRObmUug" supplier="_vCXFoG_VEemJ-foOn68QUw" contract="_vCXFoG_VEemJ-foOn68QUw"/>
+ </packagedElement>
<profileApplication xmi:type="uml:ProfileApplication" xmi:id="_llmqQB4mEemmq_cjeiIGww">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_lln4YB4mEemmq_cjeiIGww" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/DocumentStructureFactory.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/DocumentStructureFactory.java
index b42922f..5eb3775 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/DocumentStructureFactory.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/DocumentStructureFactory.java
@@ -175,6 +175,16 @@
InsertedFile createInsertedFile();
/**
+ * Returns a new object of class '<em>Empty Line</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Empty Line</em>'.
+ * @generated
+ */
+ EmptyLine createEmptyLine();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/DocumentStructurePackage.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/DocumentStructurePackage.java
index e64ccf9..aaf723a 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/DocumentStructurePackage.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/DocumentStructurePackage.java
@@ -1229,6 +1229,48 @@
/**
+ * The meta object id for the '{@link org.eclipse.papyrus.model2doc.emf.documentstructure.impl.EmptyLineImpl <em>Empty Line</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.model2doc.emf.documentstructure.impl.EmptyLineImpl
+ * @see org.eclipse.papyrus.model2doc.emf.documentstructure.impl.DocumentStructurePackageImpl#getEmptyLine()
+ * @generated
+ */
+ int NEW_LINE = 21;
+
+ /**
+ * The feature id for the '<em><b>Data Source</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NEW_LINE__DATA_SOURCE = LEAF_BODY_PART__DATA_SOURCE;
+
+ /**
+ * The number of structural features of the '<em>Empty Line</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NEW_LINE_FEATURE_COUNT = LEAF_BODY_PART_FEATURE_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Empty Line</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NEW_LINE_OPERATION_COUNT = LEAF_BODY_PART_OPERATION_COUNT + 0;
+
+
+ /**
* Returns the meta object for class '{@link org.eclipse.papyrus.model2doc.emf.documentstructure.TextDocument <em>Text Document</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1710,6 +1752,17 @@
EClass getInsertedFile();
/**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.model2doc.emf.documentstructure.EmptyLine <em>Empty Line</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Empty Line</em>'.
+ * @see org.eclipse.papyrus.model2doc.emf.documentstructure.EmptyLine
+ * @generated
+ */
+ EClass getEmptyLine();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2154,6 +2207,17 @@
*/
EClass INSERTED_FILE = eINSTANCE.getInsertedFile();
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.model2doc.emf.documentstructure.impl.EmptyLineImpl <em>Empty Line</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.model2doc.emf.documentstructure.impl.EmptyLineImpl
+ * @see org.eclipse.papyrus.model2doc.emf.documentstructure.impl.DocumentStructurePackageImpl#getEmptyLine()
+ * @generated
+ */
+ EClass NEW_LINE = eINSTANCE.getEmptyLine();
+
}
} // DocumentStructurePackage
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/EmptyLine.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/EmptyLine.java
new file mode 100755
index 0000000..0bce853
--- /dev/null
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/EmptyLine.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2019 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.model2doc.emf.documentstructure;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Empty Line</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.model2doc.emf.documentstructure.DocumentStructurePackage#getEmptyLine()
+ * @model
+ * @generated
+ */
+public interface EmptyLine extends LeafBodyPart {
+} // EmptyLine
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructureFactoryImpl.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructureFactoryImpl.java
index 363875a..364118e 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructureFactoryImpl.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructureFactoryImpl.java
@@ -98,6 +98,8 @@
return createStringVersion();
case DocumentStructurePackage.INSERTED_FILE:
return createInsertedFile();
+ case DocumentStructurePackage.NEW_LINE:
+ return createEmptyLine();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -278,6 +280,18 @@
* @generated
*/
@Override
+ public EmptyLine createEmptyLine() {
+ EmptyLineImpl emptyLine = new EmptyLineImpl();
+ return emptyLine;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
public DocumentStructurePackage getDocumentStructurePackage() {
return (DocumentStructurePackage) getEPackage();
}
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructurePackageImpl.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructurePackageImpl.java
index b5d4707..7505293 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructurePackageImpl.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/DocumentStructurePackageImpl.java
@@ -43,6 +43,7 @@
import org.eclipse.papyrus.model2doc.emf.documentstructure.Image;
import org.eclipse.papyrus.model2doc.emf.documentstructure.InsertedFile;
import org.eclipse.papyrus.model2doc.emf.documentstructure.LeafBodyPart;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.EmptyLine;
import org.eclipse.papyrus.model2doc.emf.documentstructure.Paragraph;
import org.eclipse.papyrus.model2doc.emf.documentstructure.StringVersion;
import org.eclipse.papyrus.model2doc.emf.documentstructure.TableOfContents;
@@ -229,6 +230,14 @@
private EClass insertedFileEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass emptyLineEClass = null;
+
+ /**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
@@ -772,6 +781,17 @@
* @generated
*/
@Override
+ public EClass getEmptyLine() {
+ return emptyLineEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
public DocumentStructureFactory getDocumentStructureFactory() {
return (DocumentStructureFactory) getEFactoryInstance();
}
@@ -861,6 +881,8 @@
createEAttribute(stringVersionEClass, STRING_VERSION__VERSION);
insertedFileEClass = createEClass(INSERTED_FILE);
+
+ emptyLineEClass = createEClass(NEW_LINE);
}
/**
@@ -920,6 +942,7 @@
stringVersionEClass.getESuperTypes().add(this.getVersion());
insertedFileEClass.getESuperTypes().add(theBuiltInTypesPackage.getDefaultFileReference());
insertedFileEClass.getESuperTypes().add(this.getLeafBodyPart());
+ emptyLineEClass.getESuperTypes().add(this.getLeafBodyPart());
// Initialize classes, features, and operations; add parameters
initEClass(textDocumentEClass, TextDocument.class, "TextDocument", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
@@ -994,6 +1017,8 @@
initEClass(insertedFileEClass, InsertedFile.class, "InsertedFile", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEClass(emptyLineEClass, EmptyLine.class, "EmptyLine", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
// Create resource
createResource(eNS_URI);
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/EmptyLineImpl.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/EmptyLineImpl.java
new file mode 100755
index 0000000..b03007a
--- /dev/null
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/impl/EmptyLineImpl.java
@@ -0,0 +1,208 @@
+/**
+ * Copyright (c) 2019 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.model2doc.emf.documentstructure.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.papyrus.model2doc.emf.documentstructure.DataSource;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.DocumentStructurePackage;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.EmptyLine;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Empty Line</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.model2doc.emf.documentstructure.impl.EmptyLineImpl#getDataSource <em>Data Source</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class EmptyLineImpl extends MinimalEObjectImpl.Container implements EmptyLine {
+ /**
+ * The cached value of the '{@link #getDataSource() <em>Data Source</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getDataSource()
+ * @generated
+ * @ordered
+ */
+ protected DataSource dataSource;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected EmptyLineImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DocumentStructurePackage.Literals.NEW_LINE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public DataSource getDataSource() {
+ return dataSource;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NotificationChain basicSetDataSource(DataSource newDataSource, NotificationChain msgs) {
+ DataSource oldDataSource = dataSource;
+ dataSource = newDataSource;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DocumentStructurePackage.NEW_LINE__DATA_SOURCE, oldDataSource, newDataSource);
+ if (msgs == null) {
+ msgs = notification;
+ } else {
+ msgs.add(notification);
+ }
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setDataSource(DataSource newDataSource) {
+ if (newDataSource != dataSource) {
+ NotificationChain msgs = null;
+ if (dataSource != null) {
+ msgs = ((InternalEObject) dataSource).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DocumentStructurePackage.NEW_LINE__DATA_SOURCE, null, msgs);
+ }
+ if (newDataSource != null) {
+ msgs = ((InternalEObject) newDataSource).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DocumentStructurePackage.NEW_LINE__DATA_SOURCE, null, msgs);
+ }
+ msgs = basicSetDataSource(newDataSource, msgs);
+ if (msgs != null) {
+ msgs.dispatch();
+ }
+ } else if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, DocumentStructurePackage.NEW_LINE__DATA_SOURCE, newDataSource, newDataSource));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case DocumentStructurePackage.NEW_LINE__DATA_SOURCE:
+ return basicSetDataSource(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case DocumentStructurePackage.NEW_LINE__DATA_SOURCE:
+ return getDataSource();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case DocumentStructurePackage.NEW_LINE__DATA_SOURCE:
+ setDataSource((DataSource) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DocumentStructurePackage.NEW_LINE__DATA_SOURCE:
+ setDataSource((DataSource) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DocumentStructurePackage.NEW_LINE__DATA_SOURCE:
+ return dataSource != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // EmptyLineImpl
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureAdapterFactory.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureAdapterFactory.java
index 9e80b78..251a1fc 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureAdapterFactory.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureAdapterFactory.java
@@ -199,6 +199,11 @@
}
@Override
+ public Adapter caseEmptyLine(EmptyLine object) {
+ return createEmptyLineAdapter();
+ }
+
+ @Override
public Adapter caseAbstractTable(AbstractTable object) {
return createAbstractTableAdapter();
}
@@ -591,6 +596,21 @@
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.model2doc.emf.documentstructure.EmptyLine <em>Empty Line</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.model2doc.emf.documentstructure.EmptyLine
+ * @generated
+ */
+ public Adapter createEmptyLineAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.papyrus.model2doc.core.builtintypes.AbstractTable <em>Abstract Table</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureSwitch.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureSwitch.java
index 9f7c430..a85644b 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureSwitch.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.documentstructure/src-gen/org/eclipse/papyrus/model2doc/emf/documentstructure/util/DocumentStructureSwitch.java
@@ -355,6 +355,20 @@
}
return result;
}
+ case DocumentStructurePackage.NEW_LINE: {
+ EmptyLine emptyLine = (EmptyLine) theEObject;
+ T result = caseEmptyLine(emptyLine);
+ if (result == null) {
+ result = caseLeafBodyPart(emptyLine);
+ }
+ if (result == null) {
+ result = caseBodyPart(emptyLine);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
default:
return defaultCase(theEObject);
}
@@ -718,6 +732,23 @@
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Empty Line</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Empty Line</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEmptyLine(EmptyLine object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>Abstract Table</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.structure2document/src-api/org/eclipse/papyrus/model2doc/emf/structure2document/generator/transcriber/StructureToTranscriber.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.structure2document/src-api/org/eclipse/papyrus/model2doc/emf/structure2document/generator/transcriber/StructureToTranscriber.java
index 659b9b5..fe94def 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.structure2document/src-api/org/eclipse/papyrus/model2doc/emf/structure2document/generator/transcriber/StructureToTranscriber.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.structure2document/src-api/org/eclipse/papyrus/model2doc/emf/structure2document/generator/transcriber/StructureToTranscriber.java
@@ -11,6 +11,7 @@
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
* Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - bug 568341
+ *
*****************************************************************************/
package org.eclipse.papyrus.model2doc.emf.structure2document.generator.transcriber;
@@ -26,6 +27,7 @@
import org.eclipse.papyrus.model2doc.emf.documentstructure.ComposedBodyPart;
import org.eclipse.papyrus.model2doc.emf.documentstructure.Image;
import org.eclipse.papyrus.model2doc.emf.documentstructure.InsertedFile;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.EmptyLine;
import org.eclipse.papyrus.model2doc.emf.documentstructure.Paragraph;
import org.eclipse.papyrus.model2doc.emf.documentstructure.TableOfContents;
import org.eclipse.papyrus.model2doc.emf.documentstructure.TableOfFigures;
@@ -129,6 +131,8 @@
transcribeList((AbstractList) bodyPart);
} else if (bodyPart instanceof InsertedFile) {
transcribeInsertedFile(((InsertedFile) bodyPart));
+ } else if (bodyPart instanceof EmptyLine) {
+ transcribeEmptyLine();
}
// then we iterate on the children of the bodyPart
@@ -219,4 +223,11 @@
private void transcribeList(final AbstractList list) {
transcription.writeList(list, false);
}
+
+ /**
+ * This method transcribe a {@link EmptyLine} into a new empty line in the document
+ */
+ private void transcribeEmptyLine() {
+ transcription.insertEmptyLine();
+ }
}
diff --git a/plugins/emf/org.eclipse.papyrus.model2doc.emf.template2structure/src/org/eclipse/papyrus/model2doc/emf/template2structure/internal/mapping/EReferenceTableViewMapper.java b/plugins/emf/org.eclipse.papyrus.model2doc.emf.template2structure/src/org/eclipse/papyrus/model2doc/emf/template2structure/internal/mapping/EReferenceTableViewMapper.java
index d8ebbf3..cd9582d 100755
--- a/plugins/emf/org.eclipse.papyrus.model2doc.emf.template2structure/src/org/eclipse/papyrus/model2doc/emf/template2structure/internal/mapping/EReferenceTableViewMapper.java
+++ b/plugins/emf/org.eclipse.papyrus.model2doc.emf.template2structure/src/org/eclipse/papyrus/model2doc/emf/template2structure/internal/mapping/EReferenceTableViewMapper.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2019 CEA LIST and others.
+ * Copyright (c) 2019, 2020 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Bug 569249
*
*****************************************************************************/
@@ -28,6 +29,7 @@
import org.eclipse.papyrus.model2doc.core.builtintypes.CellLocation;
import org.eclipse.papyrus.model2doc.core.builtintypes.TextCell;
import org.eclipse.papyrus.model2doc.emf.documentstructure.BodyPart;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.EmptyLine;
import org.eclipse.papyrus.model2doc.emf.documentstructure.ExtendedBasicTable;
import org.eclipse.papyrus.model2doc.emf.documentstructure.Title;
import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.EReferenceTableView;
@@ -84,11 +86,14 @@
final ExtendedBasicTable table = STRUCTURE_EFACTORY.createExtendedBasicTable();
+ final EmptyLine emptyLine = STRUCTURE_EFACTORY.createEmptyLine(); // Bug 569249
if (title != null) {
title.getSubBodyParts().add(table);
+ title.getSubBodyParts().add(emptyLine);
} else {
returnedElements.add(expectedReturnedClass.cast(table));
+ returnedElements.add(expectedReturnedClass.cast(emptyLine));
}
// column header generation
@@ -143,6 +148,7 @@
}
}
+
return returnedElements;
}
diff --git a/plugins/integration/nattable/org.eclipse.papyrus.model2doc.integration.nattable.template2structure/src/org/eclipse/papyrus/model2doc/integration/nattable/template2structure/internal/mapping/PapyrusTableViewMapper.java b/plugins/integration/nattable/org.eclipse.papyrus.model2doc.integration.nattable.template2structure/src/org/eclipse/papyrus/model2doc/integration/nattable/template2structure/internal/mapping/PapyrusTableViewMapper.java
index f23ccc8..f600c31 100755
--- a/plugins/integration/nattable/org.eclipse.papyrus.model2doc.integration.nattable.template2structure/src/org/eclipse/papyrus/model2doc/integration/nattable/template2structure/internal/mapping/PapyrusTableViewMapper.java
+++ b/plugins/integration/nattable/org.eclipse.papyrus.model2doc.integration.nattable.template2structure/src/org/eclipse/papyrus/model2doc/integration/nattable/template2structure/internal/mapping/PapyrusTableViewMapper.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2019 CEA LIST and others.
+ * Copyright (c) 2019, 2020 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -11,6 +11,7 @@
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
* Vincent Lorenzo (CEA LIST) - bug 549183
+ * Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Bug 569249
*****************************************************************************/
package org.eclipse.papyrus.model2doc.integration.nattable.template2structure.internal.mapping;
@@ -18,6 +19,7 @@
import java.io.File;
import java.io.StringReader;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@@ -58,6 +60,7 @@
import org.eclipse.papyrus.model2doc.core.generatorconfiguration.operations.GeneratorConfigurationOperations;
import org.eclipse.papyrus.model2doc.emf.documentstructure.BodyPart;
import org.eclipse.papyrus.model2doc.emf.documentstructure.DocumentStructureFactory;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.EmptyLine;
import org.eclipse.papyrus.model2doc.emf.documentstructure.ExtendedBasicTable;
import org.eclipse.papyrus.model2doc.emf.documentstructure.ExtendedTextCell;
import org.eclipse.papyrus.model2doc.emf.documentstructure.Image;
@@ -124,17 +127,16 @@
// the table mapping
// we log info, because it can take times
Activator.log.info(NLS.bind("Start the export of the table {0}.", current.getName())); //$NON-NLS-1$
- final BodyPart mapResult = mapTable(papyrusTableView, current);
+ final List<BodyPart> mapResult = mapTable(papyrusTableView, current);
Activator.log.info(NLS.bind("End the export of the table {0}.", current.getName())); //$NON-NLS-1$
-
- if (null == mapResult) {
+ if (null == mapResult || mapResult.isEmpty()) {
Activator.log.warn(NLS.bind("We fail to import the table {0}.", current.getName())); //$NON-NLS-1$
}
if (null == title) {
- returnedValue.add(returnedClassType.cast(mapResult));
+ returnedValue.addAll((Collection<? extends T>) mapResult);
} else {
- title.getSubBodyParts().add(mapResult);
+ title.getSubBodyParts().addAll(mapResult);
}
}
return returnedValue;
@@ -150,7 +152,7 @@
* @return
* a body part representing the table, or <code>null</code> in case of failure
*/
- private BodyPart mapTable(final PapyrusTableView papyrusTableView, final Table table) {
+ private List<BodyPart> mapTable(final PapyrusTableView papyrusTableView, final Table table) {
// 1. get the page manager
final IPageManager pageManager = getIPageManager(table);
if (null == pageManager) {
@@ -179,14 +181,18 @@
}
// 6. call method to create the output BodyPart
- final BodyPart bodyPart;
+ final List<BodyPart> bodyParts = new ArrayList<>();
switch (papyrusTableView.getImportMethod()) {
case IMAGE:
- bodyPart = mapTableAsImage(manager, papyrusTableView, table);
+ bodyParts.add(mapTableAsImage(manager, papyrusTableView, table));
break;
case TABLE: // this is the default case
default:
- bodyPart = mapTableAsTable(manager, papyrusTableView, table);
+ bodyParts.add(mapTableAsTable(manager, papyrusTableView, table));
+
+ // add a empty line (Bug 569249)
+ final EmptyLine emptyLine = DocumentStructureFactory.eINSTANCE.createEmptyLine();
+ bodyParts.add(emptyLine);
}
// 7. close the table if required
@@ -200,7 +206,7 @@
// pageManager.selectPage(DocumentStructureTemplateUtils.getDocumentTemplate(papyrusTableView));
// flushEventLoop();
- return bodyPart;
+ return bodyParts;
}
/**
@@ -260,7 +266,7 @@
columnRowHeader.getCells().add(cell);
}
- // 8. now we will iterate on the clipboard contents, adding row header for each new line
+ // 8. now we will iterate on the clipboard contents, adding row header for each empty line
final RowIterator rowIterator = parser.parse();
final Iterator<Object> rowIter = manager.getRowElementsList().iterator();
@@ -319,6 +325,7 @@
}
}
}
+
return basicTable;
}
diff --git a/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/transcription/ODTTranscription.java b/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/transcription/ODTTranscription.java
index 75db94a..1330c4e 100755
--- a/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/transcription/ODTTranscription.java
+++ b/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/transcription/ODTTranscription.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2019 CEA LIST.
+ * Copyright (c) 2019, 2020 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -11,6 +11,8 @@
* Contributors:
* Yupanqui Munoz (CEA LIST) yupanqui.munozjulho@cea.fr - Initial API and implementation
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Bug 569249
+ *
*****************************************************************************/
package org.eclipse.papyrus.model2doc.odt.internal.transcription;
@@ -412,6 +414,14 @@
this.writeService.insertTextFile(cursor, path);
}
+ /**
+ * @see org.eclipse.papyrus.model2doc.core.transcription.Transcription#insertEmptyLine()
+ *
+ */
+ @Override
+ public void insertEmptyLine() {
+ this.writeService.endParagraph(cursor);
+ }
/**
diff --git a/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/util/ParagraphImageWriter.java b/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/util/ParagraphImageWriter.java
index 66096d2..b507c69 100755
--- a/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/util/ParagraphImageWriter.java
+++ b/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/util/ParagraphImageWriter.java
@@ -52,7 +52,7 @@
private boolean generateCaption;
/**
- * if <code>true</code>, we will end the paragraph (new line) at the end of the insertion
+ * if <code>true</code>, we will end the paragraph (empty line) at the end of the insertion
*/
private boolean endParagraph;
diff --git a/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/util/WriteUtil.java b/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/util/WriteUtil.java
index 1f8b070..3cb6055 100755
--- a/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/util/WriteUtil.java
+++ b/plugins/odt/org.eclipse.papyrus.model2doc.odt/src/org/eclipse/papyrus/model2doc/odt/internal/util/WriteUtil.java
@@ -12,6 +12,8 @@
* Yupanqui Munoz (CEA LIST) yupanqui.munozjulho@cea.fr - Initial API and implementation
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - bug 559826
+ * Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Bug 569249
+ *
*****************************************************************************/
package org.eclipse.papyrus.model2doc.odt.internal.util;
@@ -103,7 +105,7 @@
* @param processRichText
* if <code>true</code> the text represents RichText contents
* @param endParagraph
- * if <code>true</code>, we will add a new line at the end of the paragraph
+ * if <code>true</code>, we will add a empty line at the end of the paragraph
*/
public static void addParagraph(final XTextCursor xTextCursor, final String text, final boolean processRichText, final boolean endParagraph) {
if (processRichText) {
@@ -381,7 +383,6 @@
textTable.initialize(rowsNumber, colNumbers);
Activator.log.info("--Add the new empty table to the the document"); //$NON-NLS-1$
addTextContent(xTextCursor, textTable);
- endParagraph(xTextCursor);
// Set cell's contents
Activator.log.info("--Request Libreoffice to get the cells."); //$NON-NLS-1$
diff --git a/plugins/uml/org.eclipse.papyrus.model2doc.uml.template2structure/src/org/eclipse/papyrus/model2doc/uml/template2structure/internal/mappers/StereotypePropertyReferenceTableViewMapper.java b/plugins/uml/org.eclipse.papyrus.model2doc.uml.template2structure/src/org/eclipse/papyrus/model2doc/uml/template2structure/internal/mappers/StereotypePropertyReferenceTableViewMapper.java
index 34b1d7c..b7ea4a3 100755
--- a/plugins/uml/org.eclipse.papyrus.model2doc.uml.template2structure/src/org/eclipse/papyrus/model2doc/uml/template2structure/internal/mappers/StereotypePropertyReferenceTableViewMapper.java
+++ b/plugins/uml/org.eclipse.papyrus.model2doc.uml.template2structure/src/org/eclipse/papyrus/model2doc/uml/template2structure/internal/mappers/StereotypePropertyReferenceTableViewMapper.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2019 CEA LIST and others.
+ * Copyright (c) 2019, 2020 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -10,6 +10,7 @@
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Pauline DEVILLE (CEA LIST) pauline.deville@cea.fr - Bug 569249
*
*****************************************************************************/
@@ -28,6 +29,7 @@
import org.eclipse.papyrus.model2doc.core.builtintypes.CellLocation;
import org.eclipse.papyrus.model2doc.core.builtintypes.TextCell;
import org.eclipse.papyrus.model2doc.emf.documentstructure.BodyPart;
+import org.eclipse.papyrus.model2doc.emf.documentstructure.EmptyLine;
import org.eclipse.papyrus.model2doc.emf.documentstructure.ExtendedBasicTable;
import org.eclipse.papyrus.model2doc.emf.documentstructure.Title;
import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.IColumn;
@@ -82,11 +84,14 @@
final ExtendedBasicTable table = STRUCTURE_EFACTORY.createExtendedBasicTable();
+ final EmptyLine emptyLine = STRUCTURE_EFACTORY.createEmptyLine(); // Bug 569249
if (title != null) {
title.getSubBodyParts().add(table);
+ title.getSubBodyParts().add(emptyLine);
} else {
returnedElements.add(expectedReturnedClass.cast(table));
+ returnedElements.add(expectedReturnedClass.cast(emptyLine));
}
// column header generation