Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » UML/Sysml Profile..
UML/Sysml Profile.. [message #1835661] Wed, 09 December 2020 11:07 Go to next message
Eclipse UserFriend
Hello all together
according to https://wiki.eclipse.org/Acceleo/FAQ
These lines should be added to the "registerPackages(...)" method to access UML/SysML profiles.




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.sysml");
uriMap.put(URI.createURI(SysmlResource.LIBRARIES_PATHMAP), uri.appendSegment("librairies").appendSegment(""));
uriMap.put(URI.createURI("pathmap://SysML_PROFILES/"), uri.appendSegment("model").appendSegment(""));

// For RTSJ (real time Java)
uri = URI.createURI("platform:/plugin/org.topcased.uml2rtsj.thirdparty/");
uriMap.put(URI.createURI("pathmap://RTSJ_PROFILE/rtsj.uml"), uri.appendSegment("profile").appendSegment(""));


I simply added them to the method and changed @Generated to @Generated NOT. But Java does not recongnize the code... I have something like this:

Does anyone know why?
Re: UML/Sysml Profile.. [message #1835736 is a reply to message #1835661] Fri, 11 December 2020 01:15 Go to previous message
Eclipse UserFriend
Hi

Screenshots are a very poor partial way of reporting problems. For instance what is the hover text on your red squiggles. My guess is that you haven't bothered to use an imports quickfix.

Regards

Ed Willink
Previous Topic:[Acceleo][Xbase] Transforming Xbase expression into java
Next Topic:Get XMI: ID of elements in sysml
Goto Forum:
  


Current Time: Sat Jul 19 02:34:43 EDT 2025

Powered by FUDForum. Page generated in 0.03542 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top