From 6c1e91009781c5b9efb60c13c5db26d737c88e4e Mon Sep 17 00:00:00 2001 From: jbsarrodie Date: Wed, 9 Sep 2015 21:07:37 +0200 Subject: [PATCH] [Exporter] Make exported XML files easier to read And sets version to 0.2 --- org.archicontribs.grafico/META-INF/MANIFEST.MF | 2 +- .../src/org/archicontribs/grafico/MyExporter.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/org.archicontribs.grafico/META-INF/MANIFEST.MF b/org.archicontribs.grafico/META-INF/MANIFEST.MF index 7c42176..726a3eb 100644 --- a/org.archicontribs.grafico/META-INF/MANIFEST.MF +++ b/org.archicontribs.grafico/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: GRAFICO Import and Export Plugin Bundle-SymbolicName: org.archicontribs.grafico;singleton:=true -Bundle-Version: 0.1 +Bundle-Version: 0.2 Bundle-Vendor: Jean-Baptiste Sarrodie / Quentin Varquet / Phil Beauvoir Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/org.archicontribs.grafico/src/org/archicontribs/grafico/MyExporter.java b/org.archicontribs.grafico/src/org/archicontribs/grafico/MyExporter.java index 8e9ae36..3fd21ee 100644 --- a/org.archicontribs.grafico/src/org/archicontribs/grafico/MyExporter.java +++ b/org.archicontribs.grafico/src/org/archicontribs/grafico/MyExporter.java @@ -141,6 +141,10 @@ private void createResource(File file, EObject object) throws IOException { // Create a new resource for selected file and add object to persist XMLResource resource = (XMLResource) resourceSet.createResource(URI.createFileURI(file.getAbsolutePath())); resource.getDefaultSaveOptions().put(XMLResource.OPTION_ENCODING, "UTF-8"); //$NON-NLS-1$ + resource.getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer(5)); + resource.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE,Boolean.TRUE); + resource.getDefaultSaveOptions().put(XMLResource.OPTION_DECLARE_XML,Boolean.FALSE); + resource.getDefaultSaveOptions().put(XMLResource.OPTION_CONFIGURATION_CACHE,Boolean.TRUE); resource.getContents().add(object); }