Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo](i can't get Requirement id,text in Acceleo)
[Acceleo] [message #1782501] Sat, 24 February 2018 22:21 Go to next message
karim Boudaoud is currently offline karim BoudaoudFriend
Messages: 3
Registered: February 2018
Junior Member
Hi
In eclipse (Papyrus) i have drawn SysML Requirement diagram and now i want to get requirement id and text in acceleo template.
Please help me ?
Re: [Acceleo] [message #1782616 is a reply to message #1782501] Tue, 27 February 2018 07:31 Go to previous messageGo to next message
Frank Poppen is currently offline Frank PoppenFriend
Messages: 21
Registered: February 2018
Junior Member
This is something that could help you for a start ...

[template public doForAllRequirements(aClass : Class)]

[if (aClass.getAppliedStereotype('SysML::Requirements::Requirement')->notEmpty())]
[let aRequirement : Requirement = aClass.getStereotypeApplication(aClass.getAppliedStereotype('SysML::Requirements::Requirement'))]
[file (aRequirement.base_Class.name.concat('.txt'), false, 'UTF-8')]
This is a REQUIREMENT named "[aRequirement.base_Class.name/]".
  [aRequirement.satisfiedBy.name/] shall fulfill the contract
[aRequirement.text.trim()/]
Parseing contract becomes: [parse(aRequirement.text.trim())/]

[/file]
[/let]
[/if]
[/template]


I'm completely new to all of this, too, but this is my first start that could help you as well.
Re: [Acceleo] [message #1782646 is a reply to message #1782616] Tue, 27 February 2018 11:12 Go to previous message
karim Boudaoud is currently offline karim BoudaoudFriend
Messages: 3
Registered: February 2018
Junior Member
thank you so much

[Updated on: Tue, 27 February 2018 11:15]

Report message to a moderator

Previous Topic:[Acceleo] Bad behaviour with Java classes with Acceleo runner
Next Topic:Accelleo project does not recompile changed Java code
Goto Forum:
  


Current Time: Mon Sep 24 19:57:53 GMT 2018

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

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

Back to the top