Corrupted .docx file at output [message #1489653] |
Thu, 27 November 2014 15:08 |
|
<gendoc> <drop/>
[for (p:Activity | Activity.allInstances())]
[for(d:Diagram|p.getPapyrusDiagrams())] [d.name.clean()/]
<image object='[d.getDiagram()/]' maxW='true' keepH='false'>
</image>
This diagram contains the following elements :[for (e: ecore::EObject | getElementsInDiagram(d))]<drop/>
• [clean(getText(e))/] [if(e.getText(e).contains('Call Behavior Action'))]</drop>
o [e.eContents(Comment)/]
o [e.eAllContents()/]
[else] </drop>
o Zyx [/if]</drop>
[/for]<drop/> [/for] [/for]
</gendoc><drop/>
The Addition of e.AllContents() corrupts the output file. It works if e.eAllContents() is removed.
The Error on output file is:
Is there any fix?
|
|
|
|
Re: Corrupted .docx file at output [message #1490624 is a reply to message #1490477] |
Fri, 28 November 2014 09:40 |
|
I have tested the toString function but unfortunately the problem still continued.
After digging into the Word document XML I encountered <unset> </unset> tags, which when removed uncorrupt the word file.
According to Microsoft, due to some court orders they depreciated use of custom tags.
The tag unset appears after property which is not set. For eg. visibility: <unset>.
The output is somewhat like: org.eclipse.uml2.uml.internal.impl.InputPinImpl@90256d5 (name: AMN, visibility: <unset>)(isLeaf:false)(isControlType:false, ordering: FIFO)(isOrdered: false, isUnique: true, isControl:false)</unset>
Intent: I was trying to extract Pins on Call Behaviour Action in this case by using e.eContents(Pin).
Still an issue for me. I hope this will help you to reach root of problem.
Is there any alternate way to get Pins of Action? I already tried e.eGet('argument'), e.eGet('result'), e.eGet('input'), e.eGet('output'). resulted in the above kind of output with <unset> tags.
|
|
|
|
Re: Corrupted .docx file at output [message #1490726 is a reply to message #1490713] |
Fri, 28 November 2014 11:36 |
|
Thanks a lot. The clean()function works.
I Tried 2 combinations:
a.[e.eGet('result').clean()/] _________FAILED
b. [e.eGet('result').toString().clean()/] ____Success
The output of the 'b' is:
org.eclipse.uml2.uml.internal.impl.OutputPinImpl@38215985(name:AMNOutput, visibility: <unset>) (isLeaf: false) (isControlType: false, ordering: FIFO) (isOrdered:false, isUnique: true, isControl: false)
However What I actually wish to get is just the name of pin instead entire String "org.eclipse.........false".
Any suggestions for this now? Thanks in advance.
|
|
|
|
Re: Corrupted .docx file at output [message #1494335 is a reply to message #1490828] |
Mon, 01 December 2014 11:32 |
|
Adding
[e.eGet('result').oclAsType(uml::OutputPin).name.clean()/] returns nothing (blank).
[e.eGet('result').oclAsType(uml::OutputPin).name/] returns "invalid" as string
Apart form these I tried combinations of following:
[clean(getText(e.eGet('result').oclAsType(uml::OutputPin)))/] returned nothing
[getText(e.eGet('result').oclAsType(uml::OutputPin)))/] returned nothing as well
|
|
|
|
Re: Corrupted .docx file at output [message #1693945 is a reply to message #1693933] |
Wed, 29 April 2015 12:22 |
|
Yes, I found the solution and prepared a small handy guide and some test templates. However, there is no way I found, both, in user guide and in ACCELEO which was capable of reading the object pointed by an HREF set on property of an element (this is a separate issue).
For example, if I had an object of type "x" and if this object x is defined in other .uml file, papyrus puts an href property of an element as "pathoffile/ElementID", which in turn read by eclipse to display what's in it. If the object x is defined in local .uml file then there is no problems at all. The template does read the href link but can't do further out of it.
The GenDoc stuff should read this href and bring up the details about it when requested (I understand that the project is in incubation phase). There were some more issue which I clearly don't remember at the moment.
So far, the scripts have been very unreliable and require excessive efforts to produce an output. (More time spent on debugging because ACCELEO is way more symbolic than textual languages)
SUGGESTIONS
A word Add-in (Microsoft lang)/plugin (General lang) that does automatic code creation could really make a big difference.
The user guide is helpful for beginners. Some more professional examples would create a significant difference and interest in continuing with the GenDoc. It's always worth sharing the experiences of errors.
Conclusion
Summing all the above things, I have stopped using it because my output requirements were different which the current GenDoc version was falling short of fulfilling them.
However, I am interested in seeing how well the upcoming versions would do.
|
|
|
Re: Corrupted .docx file at output [message #1693954 is a reply to message #1693945] |
Wed, 29 April 2015 13:11 |
Tristan Faure Messages: 460 Registered: July 2009 |
Senior Member |
|
|
Thank you for your feedback
When you say : "The GenDoc stuff should read this href and bring up the details about it when requested (I understand that the project is in incubation phase). There were some more issue which I clearly don't remember at the moment."
do you have an example ? Gendoc should work correctly with this
|
|
|
Powered by
FUDForum. Page generated in 0.05194 seconds