Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/pom.xml5
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java2
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/ExportTableDialog.java3
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/ImageFormat.java109
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusImageExportBindings.java (renamed from plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusImageExportBindings.java)9
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusImageExportCommand.java (renamed from plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusImageExportCommand.java)2
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusImageExportCommandHandler.java (renamed from plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusImageExportCommandHandler.java)2
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusImageExporter.java (renamed from plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusImageExporter.java)12
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusNatExporter.java (renamed from plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusNatExporter.java)7
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java2
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/style/configattribute/PapyrusExportConfigAttributes.java19
12 files changed, 111 insertions, 64 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF
index 98d702ef089..70bf8e3d37e 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF
@@ -17,6 +17,7 @@ Export-Package: org.eclipse.papyrus.infra.nattable,
org.eclipse.papyrus.infra.nattable.export,
org.eclipse.papyrus.infra.nattable.export.file,
org.eclipse.papyrus.infra.nattable.export.file.command,
+ org.eclipse.papyrus.infra.nattable.export.image,
org.eclipse.papyrus.infra.nattable.fillhandle.command,
org.eclipse.papyrus.infra.nattable.filter,
org.eclipse.papyrus.infra.nattable.filter.configuration,
@@ -74,7 +75,7 @@ Require-Bundle: org.eclipse.gmf.runtime.emf.type.core;bundle-version="[1.9.0,2.0
org.eclipse.papyrus.infra.architecture.representation;bundle-version="[2.0.0,3.0.0)"
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
-Bundle-Version: 6.1.0.qualifier
+Bundle-Version: 6.2.0.qualifier
Bundle-Name: %Bundle-Name
Bundle-Activator: org.eclipse.papyrus.infra.nattable.Activator
Bundle-ManifestVersion: 2
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/pom.xml b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/pom.xml
index df9bfafd409..4c129903258 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/pom.xml
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/pom.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -8,6 +9,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.nattable</artifactId>
- <version>6.1.0-SNAPSHOT</version>
+ <version>6.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java
index a84a246becb..7218b4d82db 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java
@@ -19,7 +19,7 @@ import org.eclipse.nebula.widgets.nattable.layer.CompositeLayer;
import org.eclipse.papyrus.infra.nattable.applynamedstyle.PapyrusApplyNamedStyleBindings;
import org.eclipse.papyrus.infra.nattable.export.PapyrusExportBindings;
import org.eclipse.papyrus.infra.nattable.export.file.PapyrusFileExportBindings;
-import org.eclipse.papyrus.infra.nattable.export.image.PapyrusImageExportBindings;
+import org.eclipse.papyrus.infra.nattable.internal.export.image.PapyrusImageExportBindings;
/**
* We change the edit configuration
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/ExportTableDialog.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/ExportTableDialog.java
index de0dd4a05cf..c075c3fbe03 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/ExportTableDialog.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/ExportTableDialog.java
@@ -48,6 +48,7 @@ import org.eclipse.ui.dialogs.ContainerSelectionDialog;
/**
* Dialog lets user to export table to image.
+ *
* @since 3.0
*/
public class ExportTableDialog extends Dialog {
@@ -309,7 +310,7 @@ public class ExportTableDialog extends Dialog {
for (String imageFileFormat : defaultFilterExtensions) {
this.outputFormatCb.add(imageFileFormat);
}
- this.outputFormatCb.setText(ImageFormat.getDefaultImageExtension());
+ this.outputFormatCb.setText(ImageFormat.getDefaultImageFormat().getImageExtension());
this.exportFormat = this.outputFormatCb.getText();
this.filterIndex = 0;
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/ImageFormat.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/ImageFormat.java
index 50a581a055e..c2b0db41c8b 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/ImageFormat.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/ImageFormat.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2017 CEA LIST.
+ * Copyright (c) 2017, 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
@@ -10,77 +10,102 @@
*
* Contributors:
* Thanh Liem PHAN (ALL4TEC) <thanhliem.phan@all4tec.net> - Bug 417095
+ * Vincent LORENZO (CEA-LIST) vincent.lorenzo@cea.fr - Bug 546966 (add to API)
*****************************************************************************/
package org.eclipse.papyrus.infra.nattable.export.image;
/**
* Enumeration that is used to configure the image format.
+ *
+ * @since 6.2
*/
public enum ImageFormat {
- BMP, JPG, JPEG, PNG;
-
- private static final String BMP_EXT = "BMP"; //$NON-NLS-1$
- private static final String JPG_EXT = "JPG"; //$NON-NLS-1$
+ BMP("bmp", "BMP files (*.bmp)", "*.bmp"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final String JPEG_EXT = "JPEG"; //$NON-NLS-1$
+ JPG("jpg", "JPG files (*.jpg)", "*.jpg"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final String PNG_EXT = "PNG"; //$NON-NLS-1$
+ JPEG("jpeg", "JPEG files (*.jpeg)", "*.jpeg"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final String BMP_FILTER_NAME = "BMP files (*.bmp)"; //$NON-NLS-1$
+ PNG("png", "PNG files (*.png)", "*.png"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final String JPG_FILTER_NAME = "JPG files (*.jpg)"; //$NON-NLS-1$
+ /** The list of all image extensions. */
+ public static final String[] IMAGE_EXTENSION_LIST = { PNG.getImageExtension(), BMP.getImageExtension(), JPG.getImageExtension(), JPEG.getImageExtension() };
- private static final String JPEG_FILTER_NAME = "JPEG files (*.jpeg)"; //$NON-NLS-1$
+ /** The list of all image filter names. */
+ public static final String[] IMAGE_FILTER_NAME_LIST = { PNG.getImageFilterName(), BMP.getImageFilterName(), JPG.getImageFilterName(), JPEG.getImageFilterName() };
- private static final String PNG_FILTER_NAME = "PNG files (*.png)"; //$NON-NLS-1$
+ /** The list of all image filter extensions. */
+ public static final String[] IMAGE_FILTER_EXTENSION_LIST = { PNG.getImageFilterExtension(), BMP.getImageFilterExtension(), JPG.getImageFilterExtension(), JPEG.getImageFilterExtension() };
- private static final String BMP_FILTER_EXT = "*.bmp"; //$NON-NLS-1$
- private static final String JPG_FILTER_EXT = "*.jpg"; //$NON-NLS-1$
+ /**
+ * an image extension
+ */
+ private final String imageExtension;
- private static final String JPEG_FILTER_EXT = "*.jpeg"; //$NON-NLS-1$
+ /**
+ * the filter name for the extension
+ */
+ private final String imageExtensionFilterName;
- private static final String PNG_FILTER_EXT = "*.png"; //$NON-NLS-1$
+ /**
+ * the filter to use to find files with a such extension
+ */
+ private final String imageFilterExtension;
- public static final String DEFAULT_IMAGE_NAME = "table_export.png"; //$NON-NLS-1$
- /** The list of all image extensions. */
- public static final String[] IMAGE_EXTENSION_LIST = { PNG_EXT, BMP_EXT, JPG_EXT, JPEG_EXT };
+ /**
+ *
+ * Constructor.
+ *
+ * @param imageExtension
+ * the extension of the image
+ * @param imageExtensionFilterName
+ * the filter's name for this extension
+ * @param imageFilterExtension
+ * the filter to use to find this extension
+ */
+ private ImageFormat(final String imageExtension, final String imageExtensionFilterName, final String imageFilterExtension) {
+ this.imageExtension = imageExtension;
+ this.imageExtensionFilterName = imageExtensionFilterName;
+ this.imageFilterExtension = imageFilterExtension;
+ }
- /** The list of all image filter names. */
- public static final String[] IMAGE_FILTER_NAME_LIST = { PNG_FILTER_NAME, BMP_FILTER_NAME, JPG_FILTER_NAME, JPEG_FILTER_NAME };
+ /**
+ *
+ * @return
+ * the image extension represented by the enum instance
+ */
+ public final String getImageExtension() {
+ return this.imageExtension;
+ }
- /** The list of all image filter extensions. */
- public static final String[] IMAGE_FILTER_EXTENSION_LIST = { PNG_FILTER_EXT, BMP_FILTER_EXT, JPG_FILTER_EXT, JPEG_FILTER_EXT };
+ /**
+ *
+ * @return
+ * the filter name for the enum instance
+ */
+ public final String getImageFilterName() {
+ return this.imageExtensionFilterName;
+ }
/**
- * Return the corresponding filter extension string for a given image format.
*
- * @param imageFormat
- * The image format
- * @return The image file extenstion filter string
+ * @return
+ * the image filter to use for the enum instance
*/
- public static String getImageFilterExtension(final ImageFormat imageFormat) {
- switch (imageFormat) {
- case BMP:
- return BMP_FILTER_EXT;
- case JPG:
- return JPG_FILTER_EXT;
- case JPEG:
- return JPEG_FILTER_EXT;
- case PNG:
- return PNG_FILTER_EXT;
- default:
- return null;
- }
+ public final String getImageFilterExtension() {
+ return this.imageFilterExtension;
}
/**
- * @return The default image format string
+ *
+ * @return
+ * the default image format (png)
*/
- public static String getDefaultImageExtension() {
- return PNG_EXT;
+ public static final ImageFormat getDefaultImageFormat() {
+ return PNG;
}
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusImageExportBindings.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusImageExportBindings.java
index 54b8895f80b..d9efac22f39 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusImageExportBindings.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusImageExportBindings.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2017 CEA LIST.
+ * Copyright (c) 2017, 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
@@ -10,13 +10,15 @@
*
* Contributors:
* Thanh Liem PHAN (ALL4TEC) <thanhliem.phan@all4tec.net> - Bug 417095
+ * Vincent LORENZO (CEA-LIST) vincent.lorenzo@cea.fr - Bug 546965
*****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.export.image;
+package org.eclipse.papyrus.infra.nattable.internal.export.image;
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
import org.eclipse.nebula.widgets.nattable.export.ExportConfigAttributes;
import org.eclipse.nebula.widgets.nattable.export.image.config.DefaultImageExportBindings;
import org.eclipse.nebula.widgets.nattable.layer.ILayer;
+import org.eclipse.papyrus.infra.nattable.export.image.ImageFormat;
import org.eclipse.papyrus.infra.nattable.style.configattribute.PapyrusExportConfigAttributes;
/**
@@ -33,11 +35,12 @@ public class PapyrusImageExportBindings extends DefaultImageExportBindings {
configRegistry.registerConfigAttribute(ExportConfigAttributes.TABLE_EXPORTER, new PapyrusImageExporter());
// The Papyrus ExportTableDialog is used by default
- configRegistry.registerConfigAttribute(PapyrusExportConfigAttributes.EXPORT_IMAGE_USE_PAPYRUS_EXPORT_TABLE_DIALOG, new Boolean(true));
+ configRegistry.registerConfigAttribute(PapyrusExportConfigAttributes.EXPORT_IMAGE_USE_PAPYRUS_EXPORT_TABLE_DIALOG, Boolean.TRUE);
// The following attributes are reserved for future use when the engine to export all tables is ready
configRegistry.registerConfigAttribute(PapyrusExportConfigAttributes.EXPORT_IMAGE_FILENAME, "export_table.png"); //$NON-NLS-1$
configRegistry.registerConfigAttribute(PapyrusExportConfigAttributes.EXPORT_IMAGE_FORMAT, ImageFormat.PNG);
+ configRegistry.registerConfigAttribute(PapyrusExportConfigAttributes.OPEN_RESULT_AFTER_EXPORT, Boolean.FALSE);
}
/**
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusImageExportCommand.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusImageExportCommand.java
index e6600fd7d13..e2b0e05160e 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusImageExportCommand.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusImageExportCommand.java
@@ -11,7 +11,7 @@
* Contributors:
* Thanh Liem PHAN (ALL4TEC) <thanhliem.phan@all4tec.net> - Bug 417095
******************************************************************************/
-package org.eclipse.papyrus.infra.nattable.export.image;
+package org.eclipse.papyrus.infra.nattable.internal.export.image;
import org.eclipse.nebula.widgets.nattable.command.AbstractContextFreeCommand;
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusImageExportCommandHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusImageExportCommandHandler.java
index 8909a4e94fe..f35c438a4cd 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusImageExportCommandHandler.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusImageExportCommandHandler.java
@@ -11,7 +11,7 @@
* Contributors:
* Thanh Liem PHAN (ALL4TEC) <thanhliem.phan@all4tec.net> - Bug 417095
******************************************************************************/
-package org.eclipse.papyrus.infra.nattable.export.image;
+package org.eclipse.papyrus.infra.nattable.internal.export.image;
import org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler;
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusImageExporter.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusImageExporter.java
index 6ec0bb2e1f2..fd1343d05c1 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusImageExporter.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusImageExporter.java
@@ -11,7 +11,7 @@
* Contributors:
* Thanh Liem PHAN (ALL4TEC) <thanhliem.phan@all4tec.net> - Bug 417095
*****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.export.image;
+package org.eclipse.papyrus.infra.nattable.internal.export.image;
import java.io.File;
import java.io.IOException;
@@ -23,6 +23,7 @@ import org.eclipse.nebula.widgets.nattable.export.image.ImageExporter;
import org.eclipse.nebula.widgets.nattable.layer.ILayer;
import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.export.image.ImageFormat;
import org.eclipse.papyrus.infra.nattable.export.streamprovider.PapyrusFileOutputStreamProvider;
import org.eclipse.papyrus.infra.nattable.style.configattribute.PapyrusExportConfigAttributes;
import org.eclipse.swt.SWTException;
@@ -55,11 +56,16 @@ public class PapyrusImageExporter extends ImageExporter {
private IOutputStreamProvider outputStreamProvider = null;
/**
+ * The default image name
+ */
+ private static final String DEFAULT_IMAGE_NAME = "table_export.png"; //$NON-NLS-1$
+
+ /**
* Default constructor.
*/
public PapyrusImageExporter() {
// Use a custom file output stream provider, which permits to change the default image name
- this(new PapyrusFileOutputStreamProvider(ImageFormat.DEFAULT_IMAGE_NAME, ImageFormat.IMAGE_FILTER_NAME_LIST, ImageFormat.IMAGE_FILTER_EXTENSION_LIST));
+ this(new PapyrusFileOutputStreamProvider(DEFAULT_IMAGE_NAME, ImageFormat.IMAGE_FILTER_NAME_LIST, ImageFormat.IMAGE_FILTER_EXTENSION_LIST));
}
/**
@@ -102,7 +108,7 @@ public class PapyrusImageExporter extends ImageExporter {
PapyrusExportConfigAttributes.EXPORT_IMAGE_FILENAME,
DisplayMode.NORMAL);
- String imageFormatExtension = ImageFormat.getImageFilterExtension(imageFormat);
+ String imageFormatExtension = imageFormat.getImageFilterExtension();
if (null != this.currentImageName && null != imageFormatExtension) {
final int imageFormatIndex = getImageFormatIndex(imageFormatExtension);
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusNatExporter.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusNatExporter.java
index 9ace1e2e1d2..e9a9aeb3ac3 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/image/PapyrusNatExporter.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/internal/export/image/PapyrusNatExporter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2017 CEA LIST.
+ * Copyright (c) 2017, 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
@@ -10,8 +10,9 @@
*
* Contributors:
* Thanh Liem PHAN (ALL4TEC) <thanhliem.phan@all4tec.net> - Bug 417095
+ * Vincent LORENZO (CEA-LIST) vincent.lorenzo@cea.fr - Bug 546965
******************************************************************************/
-package org.eclipse.papyrus.infra.nattable.export.image;
+package org.eclipse.papyrus.infra.nattable.internal.export.image;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
@@ -65,7 +66,7 @@ public class PapyrusNatExporter extends NatExporter {
*/
@Override
public void exportSingleTable(final ILayer layer, final IConfigRegistry configRegistry) {
-
+ this.openResult = configRegistry.getConfigAttribute(PapyrusExportConfigAttributes.OPEN_RESULT_AFTER_EXPORT, DisplayMode.NORMAL);
final Boolean useNatTableFileDialog = configRegistry.getConfigAttribute(PapyrusExportConfigAttributes.EXPORT_IMAGE_USE_PAPYRUS_EXPORT_TABLE_DIALOG, DisplayMode.NORMAL);
// If the Nattable file dialog is used, get parameters from the default file dialog to do the export
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
index a6dd7337e57..67ffb188fdf 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
@@ -110,10 +110,10 @@ import org.eclipse.papyrus.infra.nattable.dataprovider.CompositeColumnHeaderData
import org.eclipse.papyrus.infra.nattable.dataprovider.CompositeRowHeaderDataProvider;
import org.eclipse.papyrus.infra.nattable.display.converter.ObjectNameAndPathDisplayConverter;
import org.eclipse.papyrus.infra.nattable.export.file.command.PapyrusFileExportCommand;
-import org.eclipse.papyrus.infra.nattable.export.image.PapyrusImageExportCommand;
import org.eclipse.papyrus.infra.nattable.fillhandle.config.PapyrusFillHandleConfiguration;
import org.eclipse.papyrus.infra.nattable.filter.configuration.FilterConfigurationRegistry;
import org.eclipse.papyrus.infra.nattable.filter.configuration.IFilterConfiguration;
+import org.eclipse.papyrus.infra.nattable.internal.export.image.PapyrusImageExportCommand;
import org.eclipse.papyrus.infra.nattable.layer.FilterRowHeaderComposite;
import org.eclipse.papyrus.infra.nattable.layer.PapyrusGridLayer;
import org.eclipse.papyrus.infra.nattable.layerstack.BodyLayerStack;
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/style/configattribute/PapyrusExportConfigAttributes.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/style/configattribute/PapyrusExportConfigAttributes.java
index 8433f7a55b5..30a3e7021f7 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/style/configattribute/PapyrusExportConfigAttributes.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/style/configattribute/PapyrusExportConfigAttributes.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2016, 2017 CEA LIST and others.
+ * Copyright (c) 2016, 2017, 2019 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:
* Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
* Thanh Liem PHAN (ALL4TEC) thanhliem.phan@all4tec.net - Bug 417095
+ * Vincent LORENZO (CEA-LIST) vincent.lorenzo@cea.fr - Bug 546965
*****************************************************************************/
package org.eclipse.papyrus.infra.nattable.style.configattribute;
@@ -30,14 +31,22 @@ public interface PapyrusExportConfigAttributes {
* The configuration attribute for specifying the concrete implementation
* instance of ILayerExporter that should be used for a file export.
*/
- ConfigAttribute<ILayerExporter> SIMPLE_FILE_EXPORTER = new ConfigAttribute<ILayerExporter>();
+ ConfigAttribute<ILayerExporter> SIMPLE_FILE_EXPORTER = new ConfigAttribute<>();
/** The configuration attribute for the export image format. */
- ConfigAttribute<ImageFormat> EXPORT_IMAGE_FORMAT = new ConfigAttribute<ImageFormat>();
+ ConfigAttribute<ImageFormat> EXPORT_IMAGE_FORMAT = new ConfigAttribute<>();
/** The configuration attribute for the export image file name. */
- ConfigAttribute<String> EXPORT_IMAGE_FILENAME = new ConfigAttribute<String>();
+ ConfigAttribute<String> EXPORT_IMAGE_FILENAME = new ConfigAttribute<>();
/** The configuration attribute to use the default Papyrus ExportTableDialog for exporting image. */
- ConfigAttribute<Boolean> EXPORT_IMAGE_USE_PAPYRUS_EXPORT_TABLE_DIALOG = new ConfigAttribute<Boolean>();
+ ConfigAttribute<Boolean> EXPORT_IMAGE_USE_PAPYRUS_EXPORT_TABLE_DIALOG = new ConfigAttribute<>();
+
+ /**
+ * The configuration attribute defining if the export image must be open after the export
+ *
+ * @since 6.2
+ */
+ ConfigAttribute<Boolean> OPEN_RESULT_AFTER_EXPORT = new ConfigAttribute<>();
+
}

Back to the top