You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
Hello,
I'm stuck with a problem on RTF Templates and cannot figure out how to fix it.
Quite simply, i'd like to write a RTF template that would write for each method : its name, all of its parameters (and their types) between parenthesis (repdoduicing the methods appearance in the code), the methods notes and then a list of the parameters and their notes.
Basically, it would generate a portion of RTF looking like :
"public void doSomething(int anInt, int anotherOne) : Does Something
- int anInt : the first parameter - int anotherOne : the second parameter"
Problem is, once the parameters are written, and the section "parameter >" is closed, it cannot be re-opened, so this cannot be done as simply as i would like, or expect :
So I tried with a fragment Template, but it didn't work either, since the fragment template call seems to make every other field within the same section fail.
The Template Fragment is ok and its content is correctly written, but what i put first is simply re-written as if it was plain text in my RTF document. It gives, in the RTF document :
- int anInt : the first parameter - int anotherOne : the second parameter"
Even worse, the description of the method is just written once, followed by every parameters of every method of this element, instead of once for every method followed by its parameters. But this - i guess - should be fixed by solving my original problem.
Thanks in advance for any piece of advice/solution you could give me.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
Hello,
you can insert a fragment template in the method section. The fragment template calls an fragment script. The fragment script is called with the operationID and simply returns the text you want to print.
You find an example in the EAExample.eap: - Template Main (calls Fragment Template) - Fragment Template: DocProperties � - FragmentScript: DocProperties
I havent't tried to go any further yet, since this doesn't work at all, but eventually, i'd like to have more informations about the method in my XML and my RTF, including the method's parameters.
But this doesn't work, error while generating, the method name, or anything i put in my xml elements is never written in the RTF file. I tried a plain text directly in my field Method_Name, didn't work, i tried any syntax for operationID (operationID, OperationID, OPERATIONID, ObjectID, OBJECTID, objectID), didn't work, I tried to remove any call to the operationID in the script, and just writing plain text in xmlName.text, didn't work either. I tried to find any kind of documentation, explanation or tutoriel on how this works, on your website or anywhere in the web, I only found unapplicable examples.
[original message]
Ortmann@localhost Helmut Ortmann
unread,
Nov 4, 2013, 5:16:00 AM11/4/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
Hello Xavier,
the example from the Example.eap file and my one works. I only tried it with elements (class, activity, etc.).
I don't know if this works only with elements (#OBJECTID#) or with things like operations/attributes or so.
I would try: - Set a breakpoint in your script/output the operationID
Be aware: In the current implementation of SPARX is a bug. On some PC's it works fine and on other mysterious things happens. You also find an entry in the forum to this behavior.
[original message]
Xavier
unread,
Nov 4, 2013, 5:33:00 AM11/4/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparx-enterprise-archite...@googlegroups.com
Hello,
The problem is clearly in the parameter of my function. I can pass objectID, and use it, it's the elements ID.
I don't understand why operationID doesn't work, why objectID is not simply called elementID, or why i have to put it in the method section (if i put it in the element section, i cannot use the attributes section, since inserting a template fragment brakes every other section on its level).
I will try it with the elementID i have now, but a true and complete documentation on this would be really appreciable.
[original message]