Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » UML/Sysml Profile..
UML/Sysml Profile.. [message #1835661] Wed, 09 December 2020 16:07 Go to next message
Ala Eddine is currently offline Ala EddineFriend
Messages: 5
Registered: November 2020
Junior Member
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 06:15 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7220
Registered: July 2009
Senior Member
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: Fri Jul 30 05:31:49 GMT 2021

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

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

Back to the top