Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » How .ecore references types from target platform - resolved projects?(How to reference ecore types from a project which is in the target platform but not in the workspace.)
How .ecore references types from target platform - resolved projects? [message #750887] Tue, 25 October 2011 23:34 Go to next message
Dimitar Donchev is currently offline Dimitar DonchevFriend
Messages: 1
Registered: October 2009
Junior Member
Hi,

I'm trying to reuse emf models from existing plug-ins in a new emf project.
I can add the plug-ins in the target platform but don't want to import their source in the workspace as I am not going to edit it (I might not have the source at all).

Since the plug-ins are in the target platform, compilation against them is fine, but referencing them in the new .ecore model is not.

The tooling does not seem to find the types defined in the existing plug-ins.

I tried to set a reference element's EType with the following value:
ecore:EClass platform:/plugin/<Existing Plug-in>/<model Dir>#//<ModelElement>
but it did not do any good.

Could someone give mi a hint how this scenario would work?

Thank you!
Dimitar

[Updated on: Tue, 25 October 2011 23:34]

Report message to a moderator

Re: How .ecore references types from target platform - resolved projects [message #751525 is a reply to message #750887] Wed, 26 October 2011 04:45 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6875
Registered: July 2009
Senior Member
Hi Dimitar

The Sample Ecore Editor often provides a good way to practice and some
XMI to analyze.

Open your new Ecore file, Load your old resource and select your class
as the relevant type.

This gives you something that will work.

The editor will deresolve the references so you will seesomething like
.../../../existing-plugin/model/Model.ecore#/something, which you can
change to platform:/plugin/existing-plugin/model/Model.ecore#/something
if you want.

In a plugin environment platform:/plugin accesses should just work. In a
standalone environment you need to initialise
EcorePlugin.platformResourcemap[ correctly. See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=361063 for example code.

Regards

Ed Willink


On 26/10/2011 00:34, Dimitar Donchev wrote:
> Hi,
>
> I'm trying to reuse emf models from existing plug-ins in a new emf
> project.
> I can add the plug-ins in the target platform but don't want to import
> their source in the workspace as I am not going to edit it (I might
> not have the source at all).
>
> Since the plug-ins are in the target platform, compilation against
> them is fine, but referencing them in the new .ecore model is not.
>
> The tooling does not seem to find the types defined in the existing
> plug-ins.
>
> I tried to set a reference element's EType with the following value:
> ecore:EClass platform:/plugin/<Existing Plug-in>/<model
> Dir>#//<ModelElement>
> but it did not do any good.
>
> Could someone give mi a hint how this scenario would work?
>
> Thank you!
> Dimitar
Previous Topic:[EEF] procedure to generate context help documenation?
Next Topic:[Announce] Texo generates JPA Annotated Source Code
Goto Forum:
  


Current Time: Tue Oct 27 16:31:47 GMT 2020

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

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

Back to the top