URI Registering for Registered Profiles in Papyrus [message #1853329] |
Tue, 28 June 2022 01:53  |
Eclipse User |
|
|
|
I appreciate any help provided. I am trying to use a registered UML profile in a Java program in Papyrus. My question is how to define the URI.
I have tried something like the following:
Map<URI,URI> uriMap = resourceSet.getURIConverter().getURIMap();
UMLResourcesUtil.init(resourceSet);
URI ulProfile = URI.createURI("contracts.profile.uml");
URI upProfile = URI.createFileURI("contracts.profile.uml");
ExtensibleURIConverterImpl converter = new ExtensibleURIConverterImpl();
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
.put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap()
.put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);
uriMap.put(ulProfile, upProfile);
But nothing has worked with me. The profile's model file is in a plugin.
Should I use pathmap? platform URIs?
Thank you.
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04708 seconds