Package Registry at Development Time [message #656323] |
Fri, 25 February 2011 01:35  |
Eclipse User |
|
|
|
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??
[Updated on: Fri, 25 February 2011 01:37] by Moderator
|
|
|
Re: Package Registry at Development Time [message #656457 is a reply to message #656323] |
Fri, 25 February 2011 13:12   |
Eclipse User |
|
|
|
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.
|
|
|
|
|
Re: Package Registry at Development Time [message #657238 is a reply to message #657236] |
Wed, 02 March 2011 00:21  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.53911 seconds