Skip to content

Commit

Permalink
Added xml as file extension for the UANodeSet genmodel.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasfruehwirth committed Dec 1, 2020
1 parent 71d03bd commit 15cc8d8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
id="org.opcfoundation.ua._2011._03.ua.node.set.presentation.SetEditorID"
name="%_UI_SetEditor_label"
icon="icons/full/obj16/SetModelFile.gif"
extensions="set"
extensions="set,xml"
class="org.opcfoundation.ua._2011._03.ua.node.set.presentation.SetEditor"
contributorClass="org.opcfoundation.ua._2011._03.ua.node.set.presentation.SetActionBarContributor">
</editor>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
complianceLevel="5.0" copyrightFields="false" operationReflection="true" importOrganizing="true">
<foreignModel>file:/C:/Users/user1/Desktop/model-UA/UANodeSet.xsd</foreignModel>
<genPackages prefix="Set" basePackage="org.opcfoundation.ua._2011._03.ua.node" resource="XML"
disposableProviderFactory="true" ecorePackage="set.ecore#/">
disposableProviderFactory="true" fileExtensions="set,xml" ecorePackage="set.ecore#/">
<genEnums typeSafeEnumCompatible="false" ecoreEnum="set.ecore#//DataTypePurpose">
<genEnumLiterals ecoreEnumLiteral="set.ecore#//DataTypePurpose/Normal"/>
<genEnumLiterals ecoreEnumLiteral="set.ecore#//DataTypePurpose/ServicesOnly"/>
Expand Down
3 changes: 3 additions & 0 deletions at.ac.tuwien.auto.modelua.uml2opcua.emf.UANodeSet/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<parser
type="set"
class="org.opcfoundation.ua._2011._03.ua.node.set.util.SetResourceFactoryImpl"/>
<parser
type="xml"
class="org.opcfoundation.ua._2011._03.ua.node.set.util.SetResourceFactoryImpl"/>
</extension>

</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,6 @@ public boolean serialize(ModelExtent opcUaModel, String opcuaNodesetFilePath, Ou
else
informationOutputStreamWriter = new PrintWriter(System.out);

// Register the SetResourceFactory resource factory (the OPC UA nodeset resource factory) for the .xml extension
Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
Map<String, Object> m = reg.getExtensionToFactoryMap();
m.put("xml", new SetResourceFactoryImpl());
// Object setFactory = m.get("set");
// m.put("xml", setFactory);

// Obtain a new resource set
ResourceSet resSet = new ResourceSetImpl();

Expand Down

0 comments on commit 15cc8d8

Please sign in to comment.