Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Package Registry at Development Time(How to refer to a package which is there in Development time in Development Time itself )
icon5.gif  Package Registry at Development Time [message #656323] Fri, 25 February 2011 06:35 Go to next message
Animesh Kumar is currently offline Animesh KumarFriend
Messages: 79
Registered: September 2010
Location: Bangalore
Member
Hi,
I don't know whether this question has been asked before or not, but i am not sure whether the packages in an Ecore model can accessed in the development time. To ellaborate my problem, Assume that i have an Ecore Model "library.ecore" and it has "library" package in it, whose nsURI is "http://eclipse.org/modeling/emf/librarytest/1.0.0". I have also exposed the package through the "org.eclipse.emf.ecore.generated_package" extension in plugin.xml and have given the same nsURI used above as the URI.
Now if i have some xml files also in the development time:-
<?xml version="1.0" encoding="ASCII"?>
<library:Library xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:library="http://eclipse.org/modeling/emf/librarytest/1.0.0" location="Anshan">
  <books>
    <instanceOf href="../publisher/dpunkt.xmi#//@manuscripts.71"/>
  </books>
</library:Library>

And I have a search framework installed, which is going to search for data, based on the registered packages. But, I think that, my package would not have been registered, as i am still in development workbench. Is there a way by which i can use those packages which are there in the development time at development time itself?

I had seen at some places that we can use the platform:/resource:/<project-name>/<path-to-ecore> to refer to ecore, but i have to refer to the Package inside the Ecore and not just the Ecore. Any suggestions on how to do it??


Regards,
Animesh

[Updated on: Fri, 25 February 2011 06:37]

Report message to a moderator

Re: Package Registry at Development Time [message #656457 is a reply to message #656323] Fri, 25 February 2011 18:12 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Animesh,

Comments below.

Animesh Kumar wrote:
> Hi,
> I don't know whether this question has been asked before or not, but i
> am not sure whether the packages in an Ecore model can accessed in the
> development time. To ellaborate my problem, Assume that i have an
> Ecore Model "library.ecore" and it has "library" package in it, whose
> nsURI is "http://eclipse.org/modeling/emf/librarytest/1.0.0". I have
> also exposed the package through the
> "org.eclipse.emf.ecore.generated_package" extension in plugin.xml and
> have given the same nsURI used above as the URI. Now if i have some
> xml files also in the development time:-
> <?xml version="1.0" encoding="ASCII"?>
> <library:Library xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:library="http://eclipse.org/modeling/emf/query/1.0.0"
> location="Anshan">
> <books>
> <instanceOf href="../publisher/dpunkt.xmi#//@manuscripts.71"/>
> </books>
> </library:Library>
> And I have a search framework installed, which is going to search for
> data, based on the registered packages. But, I think that, my package
> would not have been registered, as i am still in development
> workbench. Is there a way by which i can use those packages which are
> there in the development time at development time itself?
You'd have to find them first. Once you do, you can register them in
the local package registry of the resource set your using to load your
instances. Or you could use an xsi:schemaLocation in the instance
document to point at the physical location of the Ecore resource. I.e.,
try doing Create Dynamic Instance... on the EClass at development time
and look at how the instance resource is formed.
>
> I had seen at some places that we can use the
> platform:/resource:/<project-name>/<path-to-ecore> to refer to ecore,
> but i have to refer to the Package inside the Ecore and not just the
> Ecore. Any suggestions on how to do it??
Some other folks have worked on solutions to this problem (Olivier
Moïses) using the PDE to find all the registered models in the workspace.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Package Registry at Development Time [message #657233 is a reply to message #656457] Wed, 02 March 2011 04:03 Go to previous messageGo to next message
Animesh Kumar is currently offline Animesh KumarFriend
Messages: 79
Registered: September 2010
Location: Bangalore
Member
Ed Merks wrote on Fri, 25 February 2011 23:42

You'd have to find them first. Once you do, you can register them in the local package registry of the resource set your using to load your instances. Or you could use an xsi:schemaLocation in the instance document to point at the physical location of the Ecore resource. I.e.,
try doing Create Dynamic Instance... on the EClass at development time and look at how the instance resource is formed.



I don't want to do it programmatically as i cannot alter the existing code. I would like to register the EPackage inside the Ecore registered either through Extension points or by some other means(directly through the IDE). Isn't there any way to do that?

Quote:

>
> I had seen at some places that we can use the
> platform:/resource:/<project-name>/<path-to-ecore> to refer to ecore,
> but i have to refer to the Package inside the Ecore and not just the
> Ecore. Any suggestions on how to do it??

Some other folks have worked on solutions to this problem (Olivier
Moïses) using the PDE to find all the registered models in the workspace.


Is there any link on this topic, so that i can get an idea about it?


Regards,
Animesh
Re: Package Registry at Development Time [message #657236 is a reply to message #657233] Wed, 02 March 2011 04:56 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Animesh,

Comments below.

Animesh Kumar wrote:
> Ed Merks wrote on Fri, 25 February 2011 23:42
>> You'd have to find them first. Once you do, you can register them in
>> the local package registry of the resource set your using to load
>> your instances. Or you could use an xsi:schemaLocation in the
>> instance document to point at the physical location of the Ecore
>> resource. I.e., try doing Create Dynamic Instance... on the EClass
>> at development time and look at how the instance resource is formed.
>
>
> I don't want to do it programmatically as i cannot alter the existing
> code. I would like to register the EPackage inside the Ecore
> registered either through Extension points or by some other
> means(directly through the IDE). Isn't there any way to do that?
Yes, but that sounds different from your original question. Where
exactly does the package you want used exist? I.e., in the running IDE
(where extension points apply) or in the workspace of the IDE (where
extension pointers don't apply)?
>
> Quote:
>> >
>> > I had seen at some places that we can use the >
>> platform:/resource:/<project-name>/<path-to-ecore> to refer to ecore,
>> > but i have to refer to the Package inside the Ecore and not just
>> the > Ecore. Any suggestions on how to do it??
>>
>> Some other folks have worked on solutions to this problem (Olivier
>> Moïses) using the PDE to find all the registered models in the
>> workspace.
>
>
> Is there any link on this topic, so that i can get an idea about it?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Package Registry at Development Time [message #657238 is a reply to message #657236] Wed, 02 March 2011 05:21 Go to previous message
Animesh Kumar is currently offline Animesh KumarFriend
Messages: 79
Registered: September 2010
Location: Bangalore
Member
Sorry for the confusing reply, but my requirement is still the same. I have an ecore file which has a library package in it in my workspace(development time only). I want to refer to refer to the EPackage(in development time only), but i can't do it programmatically. So i need some other way, directly through the IDE. I guess it is not possible.





Regards,
Animesh
Previous Topic:PropertyView customizing
Next Topic:EMF Spreadsheet Model
Goto Forum:
  


Current Time: Thu Apr 18 14:25:20 GMT 2024

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

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

Back to the top