Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How to register ecore file and look up for already registered ones in Eclipse
How to register ecore file and look up for already registered ones in Eclipse [message #1235630] Fri, 24 January 2014 21:11 Go to next message
Hamid Qartal is currently offline Hamid QartalFriend
Messages: 33
Registered: December 2013
Member
It happened to me that I alway have problem with eclipse not recognizing my ecore file, since it can not find the appropriate one.

Here is the question :

1- It seems that there is a kind of rep. for the eclipse that ecore file is registered there, so if any program or tool is requiring ecore core file it request eclipse to look for that in that registery and tell him if the file registered or not? Is this true?

2- if 1 is true how I can register my ecore file in this repository (by code and manually, i.e. in eclipse env.)?

3- How can I look up this repository (e.g., list the registered ecore files?


Any clarification is appreciated.

Thanks
Re: How to register ecore file and look up for already registered ones in Eclipse [message #1240940 is a reply to message #1235630] Fri, 07 February 2014 08:49 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
Hamid,

Comments below.

On 24/01/2014 10:11 PM, Hamid Qartal wrote:
> It happened to me that I alway have problem with eclipse not
> recognizing my ecore file, since it can not find the appropriate one.
>
> Here is the question :
>
> 1- It seems that there is a kind of rep. for the eclipse that ecore
> file is registered there, so if any program or tool is requiring ecore
> core file it request eclipse to look for that in that registery and
> tell him if the file registered or not? Is this true?
There's EPackage.Registry.INSTANCE and generated models in the
plugin.xml register the Ecore model there via
org.eclipse.emf.ecore.generated_package.
>
> 2- if 1 is true how I can register my ecore file in this repository
> (by code and manually, i.e. in eclipse env.)?
The generator should just produce the correct registration in the
plugin.xml automatically.
>
> 3- How can I look up this repository (e.g., list the registered ecore
> files?
You can inspect the EPackage.Registry.INSTANCE.
>
>
> Any clarification is appreciated.
>
> Thanks
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to register ecore file and look up for already registered ones in Eclipse [message #1696999 is a reply to message #1240940] Sat, 30 May 2015 16:05 Go to previous messageGo to next message
Hamid Qartal is currently offline Hamid QartalFriend
Messages: 33
Registered: December 2013
Member
Can you please take a look at this question here. I still could not solve this problem. To be honest, I could not follow your answer; I do not want to create a plugin nor I want to generate a code for my ecore file. I just simply want it to be recognized by eclipse, and then I can refer to that by just using its package URI instead of using relative path or something. Is this possible to do?
Re: How to register ecore file and look up for already registered ones in Eclipse [message #1697011 is a reply to message #1696999] Sun, 31 May 2015 05:36 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
Hamid,

Comments below.

On 30/05/2015 6:05 PM, Hamid Qartal wrote:
> Can you please take a look at this question
> http://stackoverflow.com/questions/30548241/register-an-ecore-in-eclipse-environment.
> I still could not solve this problem. To be honest, I could not follow
> your answer; I do not want to create a plugin nor I want to generate a
> code for my ecore file. I just simply want it to be recognized by
> eclipse, and then I can refer to that by just using its package URI
> instead of using relative path or something. Is this possible to do?
No, only registered models (one installed into the running IDE or the
Target platform and registered in the bundle's plugin.xml) are available
via their nsURI.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to register ecore file and look up for already registered ones in Eclipse [message #1697051 is a reply to message #1697011] Mon, 01 June 2015 08:50 Go to previous message
Maximilian Junker is currently offline Maximilian JunkerFriend
Messages: 1
Registered: June 2015
Junior Member
It seems that Epsilon provides a functionality to register EPackages of ecore files in the workspace into the running eclipse instance.
Have a look at this tutorial (section "Register library.ecore"):
https://eclipse.org/epsilon/doc/articles/reflective-emf-tutorial/

I used this function a while ago and it seemed that the registration is persisted.
You will need to install the Epsilon plugin, however (but not create a dedicated plugin yourself).

You can look up registered packages by opening the "EPackage Registry" view.

Regards,
Maximilian
Previous Topic:[CDO] Audit view on branch before base timestamp
Next Topic:XSDEcoreBuilder / EcoreRefletive Editor : Strange behavior with xsd:element without typetype
Goto Forum:
  


Current Time: Tue Apr 23 02:28:59 GMT 2024

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

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

Back to the top