|
|
|
|
Re: possible side effect of getAppliedStereotype [message #1767815 is a reply to message #1767786] |
Tue, 11 July 2017 11:43 |
Jiaan Che Messages: 6 Registered: July 2017 |
Junior Member |
|
|
hi,
I have some trouble in getAppliedStereotype. I use papyrus neon and sysml1.4, the following code:
[c.getAppliedStereotype('SysML::Requirements::Requirement')/]
[c.getAppliedStereotypes()/]
returns nothing, c is the model. I search and add the following code in java but it still cannot work:
Map<URI, URI> uriMap = resourceSet.getURIConverter().getURIMap();
// UML2 profiles
URI uri = URI.createURI("platform:/plugin/org.eclipse.uml2.uml.resources");
uriMap.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP), uri.appendSegment("libraries").appendSegment(""));
uriMap.put(URI.createURI(UMLResource.METAMODELS_PATHMAP), uri.appendSegment("metamodels").appendSegment(""));
uriMap.put(URI.createURI(UMLResource.PROFILES_PATHMAP), uri.appendSegment("profiles").appendSegment(""));
// SysML profiles
uri = URI.createURI("platform:/plugin/org.eclipse.papyrus.sysml14");
uriMap.put(URI.createURI(SysMLResource.LIBRARIES_PATHMAP), uri.appendSegment("librairies").appendSegment(""));
uriMap.put(URI.createURI("pathmap://SysML14_PROFILES/"), uri.appendSegment("profiles").appendSegment(""));
Also, the modules are:
[module generate('http://www.eclipse.org/uml2/5.0.0/UML',
'http://www.eclipse.org/papyrus/sysml/1.4/SysML',
'http://www.eclipse.org/papyrus/sysml/1.4/SysML/Blocks',
'http://www.eclipse.org/papyrus/sysml/1.4/SysML/Activities',
'http://www.eclipse.org/papyrus/sysml/1.4/SysML/Requirements',
'http://www.eclipse.org/papyrus/sysml/1.4/SysML/ModelElements')]
I want to know why it cannot work??
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02971 seconds