Home » Archived » GMT (Generative Modeling Technologies) » [epsilon] Loading of model resources
|
Re: [epsilon] Loading of model resources [message #378048 is a reply to message #378046] |
Thu, 24 May 2007 11:17 |
Dimitrios Kolovos Messages: 1776 Registered: July 2009 |
Senior Member |
|
|
Hi Aleksander,
Thanks for sharing this!
In the latest - uncommitted - version of Epsilon, loading file-based
ECore metamodels is no longer supported. Instead, you need to
right-click the metamodel and select "Register metamodel" (the metamodel
is then registered every time Eclipse starts and it is re-registered in
case it is modified in the workbench). Then, in launch configurations,
instead of selecting the actual Ecore file, you can select its nsUri.
The new code also fixes the problem of loading models (and metamodels)
that span over different files.
Do you think preventing the user from using file-based metamodels
directly (as opposed to by nsUri) is a limitation in some sense?
Cheers,
Dimitrios
Aleksander Bandelj wrote:
> Epsilon seems to load EMF resources through FileInputStreams with
> absolute paths. This breaks resolving of EMF proxies (EMF can't match
> resolved URIs of resources in resource set). In other words, dynamic
> models, composed of several ecore files don't work. I managed to fix
> that by replacing
>
> metamodel.load(getInputStream(metamodelFile), Collections.EMPTY_MAP);
>
> with
>
> metamodel=
> resourceSet.getResource(URI.createPlatformResourceURI(metamo delFile,
> false), true);
>
> in EmfModel.java.
>
> - a
|
|
|
Re: [epsilon] Loading of model resources [message #378051 is a reply to message #378048] |
Fri, 25 May 2007 05:44 |
Aleksander Bandelj Messages: 98 Registered: July 2009 |
Member |
|
|
Could be, if you are comparing several versions of same model (they
would have same nsUri). I also think most users would be more
comfortable with workspace resources. After all, EMF tooling uses
workspace resources, EMF GenModel for example. So, I would support both
workspace resources and registered models, just as GenModel interface does.
-a
Dimitrios Kolovos wrote:
> Hi Aleksander,
>
> Thanks for sharing this!
>
> In the latest - uncommitted - version of Epsilon, loading file-based
> ECore metamodels is no longer supported. Instead, you need to
> right-click the metamodel and select "Register metamodel" (the
> metamodel is then registered every time Eclipse starts and it is
> re-registered in case it is modified in the workbench). Then, in
> launch configurations, instead of selecting the actual Ecore file, you
> can select its nsUri. The new code also fixes the problem of loading
> models (and metamodels) that span over different files.
>
> Do you think preventing the user from using file-based metamodels
> directly (as opposed to by nsUri) is a limitation in some sense?
>
> Cheers,
> Dimitrios
>
> Aleksander Bandelj wrote:
>> Epsilon seems to load EMF resources through FileInputStreams with
>> absolute paths. This breaks resolving of EMF proxies (EMF can't match
>> resolved URIs of resources in resource set). In other words, dynamic
>> models, composed of several ecore files don't work. I managed to fix
>> that by replacing
>>
>> metamodel.load(getInputStream(metamodelFile), Collections.EMPTY_MAP);
>>
>> with
>>
>> metamodel=
>> resourceSet.getResource(URI.createPlatformResourceURI(metamo delFile,
>> false), true);
>>
>> in EmfModel.java.
>>
>> - a
|
|
|
Re: [epsilon] Loading of model resources [message #378053 is a reply to message #378051] |
Fri, 25 May 2007 09:54 |
Dimitrios Kolovos Messages: 1776 Registered: July 2009 |
Senior Member |
|
|
True. It makes sense for different versions of the same metamodel. I'll
fix this and commit asap. Thanks a lot for your feedback :)
Cheers,
Dimitrios
Aleksander Bandelj wrote:
> Could be, if you are comparing several versions of same model (they
> would have same nsUri). I also think most users would be more
> comfortable with workspace resources. After all, EMF tooling uses
> workspace resources, EMF GenModel for example. So, I would support both
> workspace resources and registered models, just as GenModel interface does.
>
> -a
>
> Dimitrios Kolovos wrote:
>> Hi Aleksander,
>>
>> Thanks for sharing this!
>>
>> In the latest - uncommitted - version of Epsilon, loading file-based
>> ECore metamodels is no longer supported. Instead, you need to
>> right-click the metamodel and select "Register metamodel" (the
>> metamodel is then registered every time Eclipse starts and it is
>> re-registered in case it is modified in the workbench). Then, in
>> launch configurations, instead of selecting the actual Ecore file, you
>> can select its nsUri. The new code also fixes the problem of loading
>> models (and metamodels) that span over different files.
>>
>> Do you think preventing the user from using file-based metamodels
>> directly (as opposed to by nsUri) is a limitation in some sense?
>>
>> Cheers,
>> Dimitrios
>>
>> Aleksander Bandelj wrote:
>>> Epsilon seems to load EMF resources through FileInputStreams with
>>> absolute paths. This breaks resolving of EMF proxies (EMF can't match
>>> resolved URIs of resources in resource set). In other words, dynamic
>>> models, composed of several ecore files don't work. I managed to fix
>>> that by replacing
>>>
>>> metamodel.load(getInputStream(metamodelFile), Collections.EMPTY_MAP);
>>>
>>> with
>>>
>>> metamodel=
>>> resourceSet.getResource(URI.createPlatformResourceURI(metamo delFile,
>>> false), true);
>>>
>>> in EmfModel.java.
>>>
>>> - a
|
|
|
Re: [epsilon] Loading of model resources [message #599700 is a reply to message #378046] |
Thu, 24 May 2007 11:17 |
Dimitrios Kolovos Messages: 1776 Registered: July 2009 |
Senior Member |
|
|
Hi Aleksander,
Thanks for sharing this!
In the latest - uncommitted - version of Epsilon, loading file-based
ECore metamodels is no longer supported. Instead, you need to
right-click the metamodel and select "Register metamodel" (the metamodel
is then registered every time Eclipse starts and it is re-registered in
case it is modified in the workbench). Then, in launch configurations,
instead of selecting the actual Ecore file, you can select its nsUri.
The new code also fixes the problem of loading models (and metamodels)
that span over different files.
Do you think preventing the user from using file-based metamodels
directly (as opposed to by nsUri) is a limitation in some sense?
Cheers,
Dimitrios
Aleksander Bandelj wrote:
> Epsilon seems to load EMF resources through FileInputStreams with
> absolute paths. This breaks resolving of EMF proxies (EMF can't match
> resolved URIs of resources in resource set). In other words, dynamic
> models, composed of several ecore files don't work. I managed to fix
> that by replacing
>
> metamodel.load(getInputStream(metamodelFile), Collections.EMPTY_MAP);
>
> with
>
> metamodel=
> resourceSet.getResource(URI.createPlatformResourceURI(metamo delFile,
> false), true);
>
> in EmfModel.java.
>
> - a
|
|
|
Re: [epsilon] Loading of model resources [message #599715 is a reply to message #378048] |
Fri, 25 May 2007 05:44 |
Aleksander Bandelj Messages: 98 Registered: July 2009 |
Member |
|
|
Could be, if you are comparing several versions of same model (they
would have same nsUri). I also think most users would be more
comfortable with workspace resources. After all, EMF tooling uses
workspace resources, EMF GenModel for example. So, I would support both
workspace resources and registered models, just as GenModel interface does.
-a
Dimitrios Kolovos wrote:
> Hi Aleksander,
>
> Thanks for sharing this!
>
> In the latest - uncommitted - version of Epsilon, loading file-based
> ECore metamodels is no longer supported. Instead, you need to
> right-click the metamodel and select "Register metamodel" (the
> metamodel is then registered every time Eclipse starts and it is
> re-registered in case it is modified in the workbench). Then, in
> launch configurations, instead of selecting the actual Ecore file, you
> can select its nsUri. The new code also fixes the problem of loading
> models (and metamodels) that span over different files.
>
> Do you think preventing the user from using file-based metamodels
> directly (as opposed to by nsUri) is a limitation in some sense?
>
> Cheers,
> Dimitrios
>
> Aleksander Bandelj wrote:
>> Epsilon seems to load EMF resources through FileInputStreams with
>> absolute paths. This breaks resolving of EMF proxies (EMF can't match
>> resolved URIs of resources in resource set). In other words, dynamic
>> models, composed of several ecore files don't work. I managed to fix
>> that by replacing
>>
>> metamodel.load(getInputStream(metamodelFile), Collections.EMPTY_MAP);
>>
>> with
>>
>> metamodel=
>> resourceSet.getResource(URI.createPlatformResourceURI(metamo delFile,
>> false), true);
>>
>> in EmfModel.java.
>>
>> - a
|
|
|
Re: [epsilon] Loading of model resources [message #599722 is a reply to message #378051] |
Fri, 25 May 2007 09:54 |
Dimitrios Kolovos Messages: 1776 Registered: July 2009 |
Senior Member |
|
|
True. It makes sense for different versions of the same metamodel. I'll
fix this and commit asap. Thanks a lot for your feedback :)
Cheers,
Dimitrios
Aleksander Bandelj wrote:
> Could be, if you are comparing several versions of same model (they
> would have same nsUri). I also think most users would be more
> comfortable with workspace resources. After all, EMF tooling uses
> workspace resources, EMF GenModel for example. So, I would support both
> workspace resources and registered models, just as GenModel interface does.
>
> -a
>
> Dimitrios Kolovos wrote:
>> Hi Aleksander,
>>
>> Thanks for sharing this!
>>
>> In the latest - uncommitted - version of Epsilon, loading file-based
>> ECore metamodels is no longer supported. Instead, you need to
>> right-click the metamodel and select "Register metamodel" (the
>> metamodel is then registered every time Eclipse starts and it is
>> re-registered in case it is modified in the workbench). Then, in
>> launch configurations, instead of selecting the actual Ecore file, you
>> can select its nsUri. The new code also fixes the problem of loading
>> models (and metamodels) that span over different files.
>>
>> Do you think preventing the user from using file-based metamodels
>> directly (as opposed to by nsUri) is a limitation in some sense?
>>
>> Cheers,
>> Dimitrios
>>
>> Aleksander Bandelj wrote:
>>> Epsilon seems to load EMF resources through FileInputStreams with
>>> absolute paths. This breaks resolving of EMF proxies (EMF can't match
>>> resolved URIs of resources in resource set). In other words, dynamic
>>> models, composed of several ecore files don't work. I managed to fix
>>> that by replacing
>>>
>>> metamodel.load(getInputStream(metamodelFile), Collections.EMPTY_MAP);
>>>
>>> with
>>>
>>> metamodel=
>>> resourceSet.getResource(URI.createPlatformResourceURI(metamo delFile,
>>> false), true);
>>>
>>> in EmfModel.java.
>>>
>>> - a
|
|
|
Goto Forum:
Current Time: Thu Mar 28 23:14:22 GMT 2024
Powered by FUDForum. Page generated in 0.02495 seconds
|