Skip to content

Commit

Permalink
Issue #67 - Updated XML version to 1.1 for saving to .uml file.
Browse files Browse the repository at this point in the history
  • Loading branch information
seidewitz committed Oct 11, 2018
1 parent 020cf80 commit a19ef32
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
package org.modeldriven.alf.eclipse.fuml.execution;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import org.modeldriven.alf.eclipse.units.RootNamespaceImpl;
import org.modeldriven.alf.syntax.units.UnitDefinition;
import org.modeldriven.alf.uml.ElementFactory;
import org.modeldriven.alf.uml.StereotypeApplication;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.xmi.XMLResource;

public class AlfCompiler extends org.modeldriven.alf.fuml.execution.AlfCompiler {

Expand Down Expand Up @@ -52,7 +55,9 @@ public void saveModel(String name, org.modeldriven.alf.uml.Package model)
StereotypeApplication.applyStereotypes();

try {
resource.save(null);
Map<String, String> options = new HashMap<String, String>();
options.put(XMLResource.OPTION_XML_VERSION, "1.1");
resource.save(options);
this.printVerbose("Saved to " + resource.getURI());
} catch (IOException ioe) {
this.println("Error saving model to " + resource.getURI() +
Expand Down

0 comments on commit a19ef32

Please sign in to comment.