Empty comments in imported XMI-based UML [message #1690636] |
Mon, 30 March 2015 05:24  |
Eclipse User |
|
|
|
Hi,
we observed empty comments in the XMI-imported UML model in the newest Eclipse 4.4.2 with UML2 Extender SDK 5.0.2.v20150202-0947.
The comments where fine with UML2 SDK 4.x.
I tried to isolate and guess the problem as good as I can. I think, the problem is the XMI-version:
<xmi:XMI xmi:version="20131001" xmlns:xmi=".../XMI/20131001"
With this detected XMI version the Eclipse Importer doesn't accept anymore ownedComments with a direct body-attribute like this:
<ownedComment xmi:id="_18_0_2_617020b_1427462788135_117706_3985" annotatedElement="eee_1045467100313_135436_1" body="Author:andre.
Created:27.03.15 14:26.
Title:.
Comment:.
"/>
The Eclipse Importer works fine with body as sub-element, which I observed through changing/saving the comment in Eclipse Ecore Viewer:
<ownedComment xmi:id="_18_0_2_617020b_1427462788135_117706_3985" annotatedElement="eee_1045467100313_135436_1" >
<body>Author:andre.
Created:27.03.15 14:26.
Title:.
Comment:.
</body>
</ownedComment>
Is this a known problem?
Best regards,
André Pankraz
|
|
|
|
|
|
Re: Empty comments in imported XMI-based UML [message #1690690 is a reply to message #1690680] |
Mon, 30 March 2015 11:55   |
Eclipse User |
|
|
|
You are right, this was uncalled for. Someone tries to copy Linus-attitude here.
I just have a MagicDraw Export, which has the feature: Export Eclipse UML2 v4. Internally they use org.eclipse.uml2.uml_4.0.1 for writing the attached XMI export from a minimal Model with a comment.
It could be possible to just do this in Eclipse with same UML2 SDK, just create Model with Model element, attach comment, save.
Comment text should be "body"-attribute in XMI.
Same with SDK v4: "body"-subelement.
But I have no old Eclipse with SDK v4.0.1 und I'm not an UML-XMI expert.
Ed Willink wrote on Mon, 30 March 2015 15:08Hi
To be brutally honest.
"The interesting problem here is"
There is nothing interesting here without a complete file.
Regards
Ed Willink
On 30/03/2015 15:19, André Pankraz wrote:
> Hi,
>
> Might be a problem with your client? I used #xA and can see it in my
> post.
>
> To avoid confusion, I reduced the example to:
>
> Doesn't work:
> <ownedComment xmi:id="_18_0_2_617020b_1427462788135_117706_3985"
> annotatedElement="eee_1045467100313_135436_1" body="TEST"/>
>
> Works:
> <ownedComment xmi:id="_18_0_2_617020b_1427462788135_117706_3985"
> annotatedElement="eee_1045467100313_135436_1" >
> <body>TEST</body>
> </ownedComment>
>
>
> The interesting problem here is, that MD18 with Eclipse UML2 SDK v4.x
> exports the ownedComment-text as body-attribute, and Eclipse UML2 v5.x
> SDK cannot read this (it wants it as a sub element <body>).
>
> Best regards,
> André
>
> Ed Willink wrote on Mon, 30 March 2015 13:56
>> Hi
>>
>> That looks correct to me. I don't think that you are allowed to have
>> new-lines in non-data elements (in any XML version). Use &xA;
>>
>> Regards
>>
>> Ed Willink
>
>
Attachment: v4.zip
(Size: 631.54KB, Downloaded 298 times)
|
|
|
|
Re: Empty comments in imported XMI-based UML [message #1690817 is a reply to message #1690690] |
Tue, 31 March 2015 09:24   |
Eclipse User |
|
|
|
Hi
You are right. I couldn't really believe that comments could go so
wrong. But with a concrete example it's difficult to argue.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=463551 raised.
Workaround: just change all your "http://www.eclipse.org/uml2/4.0.0/UML"
nsURIs to "http://www.eclipse.org/uml2/5.0.0/UML".
Regards
Ed Willink
On 30/03/2015 16:55, André Pankraz wrote:
> You are right, this was uncalled for. Someone tries to copy Linus-attitude here.
>
> I just have a MagicDraw Export, which has the feature: Export Eclipse UML2 v4. Internally they use org.eclipse.uml2.uml_4.0.1 for writing the attached XMI export from a minimal Model with a comment.
>
>
> It could be possible to just do this in Eclipse with same UML2 SDK, just create Model with Model element, attach comment, save.
> Comment text should be "body"-attribute in XMI.
> Same with SDK v4: "body"-subelement.
> But I have no old Eclipse with SDK v4.0.1 und I'm not an UML-XMI expert.
>
>
> Ed Willink wrote on Mon, 30 March 2015 15:08
>> Hi
>>
>> To be brutally honest.
>>
>> "The interesting problem here is"
>>
>> There is nothing interesting here without a complete file.
>>
>> Regards
>>
>> Ed Willink
>>
>>
>> On 30/03/2015 15:19, André Pankraz wrote:
>>> Hi,
>>>
>>> Might be a problem with your client? I used #xA and can see it in my
>>> post.
>>>
>>> To avoid confusion, I reduced the example to:
>>>
>>> Doesn't work:
>>> <ownedComment xmi:id="_18_0_2_617020b_1427462788135_117706_3985"
>>> annotatedElement="eee_1045467100313_135436_1" body="TEST"/>
>>>
>>> Works:
>>> <ownedComment xmi:id="_18_0_2_617020b_1427462788135_117706_3985"
>>> annotatedElement="eee_1045467100313_135436_1" >
>>> <body>TEST</body>
>>> </ownedComment>
>>>
>>>
>>> The interesting problem here is, that MD18 with Eclipse UML2 SDK v4.x
>>> exports the ownedComment-text as body-attribute, and Eclipse UML2 v5.x
>>> SDK cannot read this (it wants it as a sub element <body>).
>>>
>>> Best regards,
>>> André
>>>
>>> Ed Willink wrote on Mon, 30 March 2015 13:56
>>>> Hi
>>>>
>>>> That looks correct to me. I don't think that you are allowed to have
>>>> new-lines in non-data elements (in any XML version). Use &xA;
>>>>
>>>> Regards
>>>>
>>>> Ed Willink
>>>
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05384 seconds