|
|
|
|
Re: Feature annotation not found [message #478425 is a reply to message #478422] |
Tue, 19 May 2009 22:07 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Hi John,
The problem does not seem to exist in opensource UML2 and neither in RSM
7.6.
I'll try to reproduce using 7.5.
Cheers,
- James.
"John T.E. Timm" <johntimm@us.ibm.com> wrote in message
news:4525054396e06b52ff80b5ada5a69fdf$1@www.eclipse.org...
> James:
>
> I investigated this issue a bit more and it looks like the Eclipse MDT
> UML2 .uml file format uses the same "<annotation></annotation>" elements
> as the RSM .emx file. This would seem to indicate that the problem doesn't
> occur in the .emx file format but instead somewhere in the custom Resource
> implementation or XML Handler that is used to extend the UML-to-Ecore
> model importer to handle RSM .emx files. For some reason, this
> RSM-specific extension is expecting elements named "annotations" in the
> emx file.
>
> If the .emx file looks like this:
>
> <Ecore:EClass xmi:id="_7Mg3UESPEd66ToKxWS_1fg"
> base_Class="_4t0AQESPEd66ToKxWS_1fg">
> <annotation>http://www.example.org/MySpecialAnnotation
> p1='v1'</annotation>
> </Ecore:EClass>
>
> it doesn't work. If I manually change the .emx file to this:
>
> <Ecore:EClass xmi:id="_7Mg3UESPEd66ToKxWS_1fg"
> base_Class="_4t0AQESPEd66ToKxWS_1fg">
> <annotations>http://www.example.org/MySpecialAnnotation
> p1='v1'</annotations>
> </Ecore:EClass>
>
> everything works fine. I would export the .emx file to .uml first, but the
> model exporter for .emx file completely ignores the annotations and
> doesn't appear to give me an option to turn them on. Interestingly enough,
> the RSM model exporter seems to ignore Ecore stereotypes in general.
>
> Thanks,
>
> JT
>
> James Bruck wrote:
>
>> Hi John,
>
>> If I'm not mistaken, RSA has it's own way of dealing with annotations and
>> documentation (separate API).
>> Dave Steinberg (of EMF team) is looking at import/export issues
>> currently. He may be able to shed some light on the issue.
>
>> - James.
>
>> "John T.E. Timm" <johntimm@us.ibm.com> wrote in message
>> news:6de9ceb46107d5aa0451fbd894c978eb$1@www.eclipse.org...
>>>I found the problem. The issue is in the RSM-specific code that saves the
>>>UML model to an EMX file. It is incorrectly naming the "annotations"
>>>element "annotation" which is not recognized on import (from UML to
>>>Ecore). If I fix-up the EMX file and rename "annotation" elements to
>>>"annotations", then everything works fine. I will follow up with Rational
>>>team to get a more permanent fix in place.
>>>
>>> Thanks,
>>>
>>> JT
>>>
>
>
|
|
|
Re: Feature annotation not found [message #478438 is a reply to message #478422] |
Wed, 20 May 2009 14:15 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Yes, the intended serialization for these elements is with the name
'annotation', as per the XML name setting (via the EAttribute stereotype) on
the "annotations" stereotype property. Since the intended XML name is
different from the feature name, deserialization will only work if/when
extended metadata is specified as a load option (see
XMLResource.OPTION_EXTENDED_META_DATA). You should check whether this is the
case for the resource that's being used to load your model...
Kenn
"John T.E. Timm" <johntimm@us.ibm.com> wrote in message
news:4525054396e06b52ff80b5ada5a69fdf$1@www.eclipse.org...
> James:
>
> I investigated this issue a bit more and it looks like the Eclipse MDT
> UML2 .uml file format uses the same "<annotation></annotation>" elements
> as the RSM .emx file. This would seem to indicate that the problem doesn't
> occur in the .emx file format but instead somewhere in the custom Resource
> implementation or XML Handler that is used to extend the UML-to-Ecore
> model importer to handle RSM .emx files. For some reason, this
> RSM-specific extension is expecting elements named "annotations" in the
> emx file.
>
> If the .emx file looks like this:
>
> <Ecore:EClass xmi:id="_7Mg3UESPEd66ToKxWS_1fg"
> base_Class="_4t0AQESPEd66ToKxWS_1fg">
> <annotation>http://www.example.org/MySpecialAnnotation
> p1='v1'</annotation>
> </Ecore:EClass>
>
> it doesn't work. If I manually change the .emx file to this:
>
> <Ecore:EClass xmi:id="_7Mg3UESPEd66ToKxWS_1fg"
> base_Class="_4t0AQESPEd66ToKxWS_1fg">
> <annotations>http://www.example.org/MySpecialAnnotation
> p1='v1'</annotations>
> </Ecore:EClass>
>
> everything works fine. I would export the .emx file to .uml first, but the
> model exporter for .emx file completely ignores the annotations and
> doesn't appear to give me an option to turn them on. Interestingly enough,
> the RSM model exporter seems to ignore Ecore stereotypes in general.
>
> Thanks,
>
> JT
>
> James Bruck wrote:
>
>> Hi John,
>
>> If I'm not mistaken, RSA has it's own way of dealing with annotations and
>> documentation (separate API).
>> Dave Steinberg (of EMF team) is looking at import/export issues
>> currently. He may be able to shed some light on the issue.
>
>> - James.
>
>> "John T.E. Timm" <johntimm@us.ibm.com> wrote in message
>> news:6de9ceb46107d5aa0451fbd894c978eb$1@www.eclipse.org...
>>>I found the problem. The issue is in the RSM-specific code that saves the
>>>UML model to an EMX file. It is incorrectly naming the "annotations"
>>>element "annotation" which is not recognized on import (from UML to
>>>Ecore). If I fix-up the EMX file and rename "annotation" elements to
>>>"annotations", then everything works fine. I will follow up with Rational
>>>team to get a more permanent fix in place.
>>>
>>> Thanks,
>>>
>>> JT
>>>
>
>
|
|
|
|
|
|
|
|
Re: Feature annotation not found [message #627611 is a reply to message #478422] |
Tue, 19 May 2009 22:07 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Hi John,
The problem does not seem to exist in opensource UML2 and neither in RSM
7.6.
I'll try to reproduce using 7.5.
Cheers,
- James.
"John T.E. Timm" <johntimm@us.ibm.com> wrote in message
news:4525054396e06b52ff80b5ada5a69fdf$1@www.eclipse.org...
> James:
>
> I investigated this issue a bit more and it looks like the Eclipse MDT
> UML2 .uml file format uses the same "<annotation></annotation>" elements
> as the RSM .emx file. This would seem to indicate that the problem doesn't
> occur in the .emx file format but instead somewhere in the custom Resource
> implementation or XML Handler that is used to extend the UML-to-Ecore
> model importer to handle RSM .emx files. For some reason, this
> RSM-specific extension is expecting elements named "annotations" in the
> emx file.
>
> If the .emx file looks like this:
>
> <Ecore:EClass xmi:id="_7Mg3UESPEd66ToKxWS_1fg"
> base_Class="_4t0AQESPEd66ToKxWS_1fg">
> <annotation>http://www.example.org/MySpecialAnnotation
> p1='v1'</annotation>
> </Ecore:EClass>
>
> it doesn't work. If I manually change the .emx file to this:
>
> <Ecore:EClass xmi:id="_7Mg3UESPEd66ToKxWS_1fg"
> base_Class="_4t0AQESPEd66ToKxWS_1fg">
> <annotations>http://www.example.org/MySpecialAnnotation
> p1='v1'</annotations>
> </Ecore:EClass>
>
> everything works fine. I would export the .emx file to .uml first, but the
> model exporter for .emx file completely ignores the annotations and
> doesn't appear to give me an option to turn them on. Interestingly enough,
> the RSM model exporter seems to ignore Ecore stereotypes in general.
>
> Thanks,
>
> JT
>
> James Bruck wrote:
>
>> Hi John,
>
>> If I'm not mistaken, RSA has it's own way of dealing with annotations and
>> documentation (separate API).
>> Dave Steinberg (of EMF team) is looking at import/export issues
>> currently. He may be able to shed some light on the issue.
>
>> - James.
>
>> "John T.E. Timm" <johntimm@us.ibm.com> wrote in message
>> news:6de9ceb46107d5aa0451fbd894c978eb$1@www.eclipse.org...
>>>I found the problem. The issue is in the RSM-specific code that saves the
>>>UML model to an EMX file. It is incorrectly naming the "annotations"
>>>element "annotation" which is not recognized on import (from UML to
>>>Ecore). If I fix-up the EMX file and rename "annotation" elements to
>>>"annotations", then everything works fine. I will follow up with Rational
>>>team to get a more permanent fix in place.
>>>
>>> Thanks,
>>>
>>> JT
>>>
>
>
|
|
|
Re: Feature annotation not found [message #627616 is a reply to message #478422] |
Wed, 20 May 2009 14:15 |
Kenn Hussey Messages: 1620 Registered: July 2009 |
Senior Member |
|
|
Yes, the intended serialization for these elements is with the name
'annotation', as per the XML name setting (via the EAttribute stereotype) on
the "annotations" stereotype property. Since the intended XML name is
different from the feature name, deserialization will only work if/when
extended metadata is specified as a load option (see
XMLResource.OPTION_EXTENDED_META_DATA). You should check whether this is the
case for the resource that's being used to load your model...
Kenn
"John T.E. Timm" <johntimm@us.ibm.com> wrote in message
news:4525054396e06b52ff80b5ada5a69fdf$1@www.eclipse.org...
> James:
>
> I investigated this issue a bit more and it looks like the Eclipse MDT
> UML2 .uml file format uses the same "<annotation></annotation>" elements
> as the RSM .emx file. This would seem to indicate that the problem doesn't
> occur in the .emx file format but instead somewhere in the custom Resource
> implementation or XML Handler that is used to extend the UML-to-Ecore
> model importer to handle RSM .emx files. For some reason, this
> RSM-specific extension is expecting elements named "annotations" in the
> emx file.
>
> If the .emx file looks like this:
>
> <Ecore:EClass xmi:id="_7Mg3UESPEd66ToKxWS_1fg"
> base_Class="_4t0AQESPEd66ToKxWS_1fg">
> <annotation>http://www.example.org/MySpecialAnnotation
> p1='v1'</annotation>
> </Ecore:EClass>
>
> it doesn't work. If I manually change the .emx file to this:
>
> <Ecore:EClass xmi:id="_7Mg3UESPEd66ToKxWS_1fg"
> base_Class="_4t0AQESPEd66ToKxWS_1fg">
> <annotations>http://www.example.org/MySpecialAnnotation
> p1='v1'</annotations>
> </Ecore:EClass>
>
> everything works fine. I would export the .emx file to .uml first, but the
> model exporter for .emx file completely ignores the annotations and
> doesn't appear to give me an option to turn them on. Interestingly enough,
> the RSM model exporter seems to ignore Ecore stereotypes in general.
>
> Thanks,
>
> JT
>
> James Bruck wrote:
>
>> Hi John,
>
>> If I'm not mistaken, RSA has it's own way of dealing with annotations and
>> documentation (separate API).
>> Dave Steinberg (of EMF team) is looking at import/export issues
>> currently. He may be able to shed some light on the issue.
>
>> - James.
>
>> "John T.E. Timm" <johntimm@us.ibm.com> wrote in message
>> news:6de9ceb46107d5aa0451fbd894c978eb$1@www.eclipse.org...
>>>I found the problem. The issue is in the RSM-specific code that saves the
>>>UML model to an EMX file. It is incorrectly naming the "annotations"
>>>element "annotation" which is not recognized on import (from UML to
>>>Ecore). If I fix-up the EMX file and rename "annotation" elements to
>>>"annotations", then everything works fine. I will follow up with Rational
>>>team to get a more permanent fix in place.
>>>
>>> Thanks,
>>>
>>> JT
>>>
>
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05845 seconds