Skip to content
Snippets Groups Projects
Commit b78ebce8 authored by Dominique Marcadet's avatar Dominique Marcadet
Browse files

Merge branch '24-option_xml_map-is-a-save-option' into 'master'

Resolve "OPTION_XML_MAP is a save option"

Closes #24

See merge request RiseClipseGroup/RiseClipseMetamodel_Cim!19
parents afe703e8 a547c711
No related branches found
No related tags found
1 merge request!19Resolve "OPTION_XML_MAP is a save option"
Pipeline #1061 passed
......@@ -29,6 +29,7 @@ import org.eclipse.emf.ecore.xmi.impl.XMLMapImpl;
import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
/**
*/
public abstract class CimResourceFactoryImpl extends ResourceFactoryImpl {
......@@ -69,7 +70,7 @@ public abstract class CimResourceFactoryImpl extends ResourceFactoryImpl {
// TODO: find usage
//result.getDefaultLoadOptions().put( XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE );
// <?xml line is set by CimResourceHandler.preSvae
// <?xml line is set by CimResourceHandler.preSave
result.getDefaultSaveOptions().put( XMLResource.OPTION_DECLARE_XML, Boolean.FALSE );
result.getDefaultSaveOptions().put( XMLResource.OPTION_ENCODING, "UTF-8" );
// Keep all values that has been set
......@@ -80,7 +81,7 @@ public abstract class CimResourceFactoryImpl extends ResourceFactoryImpl {
XMLResource.XMLMap map = new XMLMapImpl();
// rdf prefix may be hardcoded because we know we use it for saving
map.setIDAttributeName( CimConstants.qualifiedRdfID );
result.getDefaultLoadOptions().put( XMLResource.OPTION_XML_MAP, map );
result.getDefaultSaveOptions().put( XMLResource.OPTION_XML_MAP, map );
// From https://www.eclipse.org/modeling/emf/docs/performance/EMFPerformanceTips.html
// and https://sdqweb.ipd.kit.edu/wiki/EMF_Model_Loading_Performance_Tweaks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment