Skip to main content



      Home
Home » Archived » GMT (Generative Modeling Technologies) » [epsilon] Loading of model resources
[epsilon] Loading of model resources [message #378046] Thu, 24 May 2007 07:01 Go to next message
Eclipse UserFriend
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 #378048 is a reply to message #378046] Thu, 24 May 2007 07:17 Go to previous messageGo to next message
Eclipse UserFriend
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 01:44 Go to previous messageGo to next message
Eclipse UserFriend
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 05:54 Go to previous message
Eclipse UserFriend
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 07:17 Go to previous message
Eclipse UserFriend
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 01:44 Go to previous message
Eclipse UserFriend
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 05:54 Go to previous message
Eclipse UserFriend
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
Previous Topic:[epsilon] Loading of model resources
Next Topic:[Xpand] properties with the same name as keywords
Goto Forum:
  


Current Time: Wed Apr 30 04:28:09 EDT 2025

Powered by FUDForum. Page generated in 0.51744 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top