[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.uml2] Re: UML2 migration

Hi David,

Yes adding that entry is fine.
Cheers,

- James.

"David Bonneau" <david.bonneau@xxxxxxx> wrote in message 
news:ganl5t$8bk$1@xxxxxxxxxxxxxxxxxxxx
> Thanks for your reply.
>
> As I say in my previous post I'm working on a standalone app. I wan't to 
> load a UML 2.0.0 model (http://www.eclipse.org/uml2/2.0.0/UML).
>
> When I do this, I have an exception that says : "Package with uri 
> 'http://www.eclipse.org/uml2/2.0.0/UML' not found."
>
> To fix this, I add the line 
> EPackage.Registry.INSTANCE.put("http://www.eclipse.org/uml2/2.0.0/UML";, 
> UMLPackage.eINSTANCE);
>
> This is the good way ? Or there is another solution ?
>
> David
>
> James Bruck a écrit :
>> Hi David,
>>
>> The resource handlers are registered against particular content type 
>> identifiers so they should kick in regardless of the exension.
>> To determine the format of the model you can look at the serialized 
>> nsURI.
>> For example:
>> <uml:Model xmi:version="2.1" 
>> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"; 
>> xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"; 
>> xmi:id="_UXe2UH6gEd2W3e_qmR_CeQ" name="m1">
>>
>>
>> Moving forward, the .uml extension will remain the same even as new 
>> versions of UML come out.      For example, the next version of UML is 
>> 2.2, however the extension will remain .uml.
>>
>> The migration guide you are looking at migrates from UML 1.0.0 to UML 
>> 2.0.0 (the extension changed here from .uml2 to .uml)
>> There was a second migration guide that migrates from UML 2.0.0 to UML 
>> 2.1.2 (the extension remains .uml)
>> The next migration will be from UML 2.1.2 to UML 2.2 - and introduces API 
>> breaking changes ( a new migration guide will be posted ).
>>
>> Cheers,
>>
>> - James.
>>
>>
>> "David Bonneau" <david.bonneau@xxxxxxx> wrote in message 
>> news:galjud$nmq$1@xxxxxxxxxxxxxxxxxxxx
>>> I'm working on a standalone application. This application must load uml 
>>> files whose nsURI are http://www.eclipse.org/uml2/2.0.0/UML.
>>>
>>> Is this nsURI indicates that i'm working on a UML 2.0 file ?
>>>
>>> I try the code given by the article : 
>>> http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_2.0_Migration_Guide/guide.html
>>>
>>> I don't understand all. I want to know if my model to migrate must have 
>>> the extension .uml2 ? When I read this line :
>>>
>>> extensionFactoryMap.put(UML22UMLResource.FILE_EXTENSION,UML22UMLResource.Factory.INSTANCE)
>>>
>>> I assume that my file must be something like model.uml2 ? How can I 
>>> known if my file is a uml2.0 or a uml2.1 if the extension is wrong 
>>> (always .uml) ?
>>>
>>>
>>>
>>> David
>>