Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » locate elements into an EMF generated editor
locate elements into an EMF generated editor [message #778379] Thu, 12 January 2012 16:48 Go to next message
Enrico Randazzo is currently offline Enrico RandazzoFriend
Messages: 13
Registered: July 2009
Junior Member
Hi all,
I have a meta model from which I generate the typical emf model editor (from the genmodel file). In the meta model I have some meta classes that have references to other meta classes. When into the generated editor I select an element with references I can see into the Properties view the name of the referenced items...but I can't locate them, in the sense that I have to look for the referenced element on my own into the model.
I know that this is an already discussed argument but so far I can't be able to find a solution; I tried EMF Search version 0.10.0 with Helios, but it does not seem to work.
Is there any eclipse tool or subproject that can help me? or I have to do the work "by hand" with java code?


Thanks
Enrico
Re: locate elements into an EMF generated editor [message #778451 is a reply to message #778379] Thu, 12 January 2012 17:05 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Enrico,

Comments below.

On 12/01/2012 5:48 PM, Enrico Randazzo wrote:
> Hi all,
> I have a meta model from which I generate the typical emf model editor
> (from the genmodel file). In the meta model I have some meta classes
> that have references to other meta classes. When into the generated
> editor I select an element with references I can see into the
> Properties view the name of the referenced items...but I can't locate
> them, in the sense that I have to look for the referenced element on
> my own into the model.
The property descriptor should scan the entire resource set looking for
instances that are compatible with the type of the reference... Of
course if the things aren't in the resource set, it won't find
anything. You have to use Load Resource... to find them.
> I know that this is an already discussed argument but so far I can't
> be able to find a solution; I tried EMF Search version 0.10.0 with
> Helios, but it does not seem to work.
> Is there any eclipse tool or subproject that can help me? or I have to
> do the work "by hand" with java code?
It's not totally clear what your problem is. It's not finding things
that are there? You're wanting to find things that are in other
resources (which of course requires some mechanism that searches all or
some subset of all resources in the workspace).
>
>
> Thanks
> Enrico
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: locate elements into an EMF generated editor [message #778574 is a reply to message #778451] Fri, 13 January 2012 10:25 Go to previous messageGo to next message
Enrico Randazzo is currently offline Enrico RandazzoFriend
Messages: 13
Registered: July 2009
Junior Member
My problem is not to find objects located in other models, my problem is to find objects referenced by some other objects of the same model.
I try to give you a better explanation of my case. I define a meta model MetaModelA with emf, then I generate the editor from the genmodel file using EMF fetures "Generete Model Code", "Generate Edit Code" and "Generate Editor Code"; with the newly created plugins I run a new instance of eclipse and I create a new model conforming to MetaModelA using the just generated editor. So far it is all ok, a task that I do many times. The question now is how given an object that has references to another object of the same model I can locate (and select) the referenced object into the editor.

A practical example:

MetaModelA:

MetaClassOne
{
...
}

MetaClassTwo
{
...
link1 : MetaClassOne; <---EReference
}

suppose that using tha EMF generated editor I build a model:

MetaClassOne object_one;

MetaClassTwo object_two
{
link1 = object_one;
}

I need to locate object_one into the editor, starting from the link1 reference.
Re: locate elements into an EMF generated editor [message #778580 is a reply to message #778574] Fri, 13 January 2012 10:44 Go to previous messageGo to next message
Tim Schaefer is currently offline Tim SchaeferFriend
Messages: 49
Registered: June 2011
Location: Marburg, Germany
Member
Hi Enrico,

the properties view has a button "Locate Value" (near the minimize/maximize buttons)
that brings you to the referenced object.


Regards,
Tim
Re: locate elements into an EMF generated editor [message #778607 is a reply to message #778580] Fri, 13 January 2012 13:55 Go to previous message
Enrico Randazzo is currently offline Enrico RandazzoFriend
Messages: 13
Registered: July 2009
Junior Member
Tim Schaefer wrote on Fri, 13 January 2012 05:44
Hi Enrico,

the properties view has a button "Locate Value" (near the minimize/maximize buttons)
that brings you to the referenced object.


Regards,
Tim


Shocked Perfect! it is exactly what I was looking for Very Happy
It has always been right there and I never noticed it before.
Thank you very much!!!


Enrico
Previous Topic:EMF / GWT RPC Serialization
Next Topic:Changing MyEnumType.get(String) to throw an exception
Goto Forum:
  


Current Time: Thu Apr 25 00:36:00 GMT 2024

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

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

Back to the top