Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Search] Problem in wizard
[EMF Search] Problem in wizard [message #125615] Tue, 10 June 2008 13:07 Go to next message
Henrik  önsson is currently offline Henrik önssonFriend
Messages: 53
Registered: July 2009
Member
Hi,

I have a bunch of EMF models that I like to enable search on. When I
right-click on the genmodels for my models and select the generation
wizard for EMF Search, I get the following error:
Querying EString EStructualFeature failed! Didn't found any valid
EStructualFeature.

Any idea what I'm doing wrong?
Are there any constraints on the EMF model I need to fullfill?

Regards

Henrik
Re: [EMF Search] Problem in wizard [message #125649 is a reply to message #125615] Wed, 11 June 2008 01:49 Go to previous messageGo to next message
lucas bigeardel is currently offline lucas bigeardelFriend
Messages: 155
Registered: July 2009
Senior Member
Henrik,

for the moment, the code generation only relies on String/EString
EAttributes.

The wizard actually does a query on genmodel file looking for (and only
for) String/EString EAttributes.

So, in your case EMF Search code generation failure possibilities are :
- the query didn't find any suitable feature (eg, you dont have any
EClass with a String or EString attribute inside)
- Its possibly a bug and I would be interested in getting your ecore
models (or pertinent excerpt) to deeper analysis

Let see if we can find a suitable & reusable solution for your need.

regards,

- Lucas



> Hi,
>
> I have a bunch of EMF models that I like to enable search on. When I
> right-click on the genmodels for my models and select the generation
> wizard for EMF Search, I get the following error:
> Querying EString EStructualFeature failed! Didn't found any valid
> EStructualFeature.
>
> Any idea what I'm doing wrong?
> Are there any constraints on the EMF model I need to fullfill?
>
> Regards
>
> Henrik
>
>
Re: [EMF Search] Problem in wizard [message #125695 is a reply to message #125649] Wed, 11 June 2008 08:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Lucas,

Given that any EAttribute x for which
x.getEAttributeType().isSerializeable() is true, you could always use
EcoreUtil.convertToString on its value (of course considering
multiplicities as well) so that pretty much any type of attribute could
be used for searching. I suppose that string-based ones are the most
likely ones to actually yield more interesting types of searches
though. Are you looking for EDataTypes with java.lang.String as their
instance class name? Even in the general case there, the
createFromString/convertToString could do decoding and encoding...


lucas bigeardel wrote:
> Henrik,
>
> for the moment, the code generation only relies on String/EString
> EAttributes.
>
> The wizard actually does a query on genmodel file looking for (and
> only for) String/EString EAttributes.
>
> So, in your case EMF Search code generation failure possibilities are :
> - the query didn't find any suitable feature (eg, you dont have any
> EClass with a String or EString attribute inside)
> - Its possibly a bug and I would be interested in getting your ecore
> models (or pertinent excerpt) to deeper analysis
>
> Let see if we can find a suitable & reusable solution for your need.
>
> regards,
>
> - Lucas
>
>
>
>> Hi,
>>
>> I have a bunch of EMF models that I like to enable search on. When I
>> right-click on the genmodels for my models and select the generation
>> wizard for EMF Search, I get the following error:
>> Querying EString EStructualFeature failed! Didn't found any valid
>> EStructualFeature.
>>
>> Any idea what I'm doing wrong?
>> Are there any constraints on the EMF model I need to fullfill?
>>
>> Regards
>>
>> Henrik
>>
>>
Re: [EMF Search] Problem in wizard [message #125734 is a reply to message #125695] Wed, 11 June 2008 11:50 Go to previous message
lucas bigeardel is currently offline lucas bigeardelFriend
Messages: 155
Registered: July 2009
Senior Member
Ed,

an ultimate goal with EMF Search is to provide a way to textually query
any kind of typed element like you started to suggest.

I have been short on time for Ganymede release and reduced the scope to
(E)String attributes mainly while lacking time to tune up more complex
templates for my code generation.

So for the moment to propose attributes in the search generation wizard, a
query is ran against GenModelPackage.Literals.GEN_TYPED_ELEMENT meta
elements of a given genmodel model.

A refinement is done given the fact we currently restrict search to be
applied only on EAttributes (known from
GenTypedElement::getEcoreModelElement)

And finally discriminating String/EString EAttributes on
String signature = eAttribute.getEType().getInstanceTypeName();

I will take a look at the EcoreUtil you mentioned to hopefully get a
better code generation for 3.5 M3+. I need to write a roadmap for EMF
Search soon.

So, in conclusion the current code generation is mainly a good bootstrap
working for String attributes with objective to be quickly enhanced with a
complete type support later on.

regards,
Re: [EMF Search] Problem in wizard [message #619230 is a reply to message #125615] Wed, 11 June 2008 01:49 Go to previous message
lucas bigeardel is currently offline lucas bigeardelFriend
Messages: 155
Registered: July 2009
Senior Member
Henrik,

for the moment, the code generation only relies on String/EString
EAttributes.

The wizard actually does a query on genmodel file looking for (and only
for) String/EString EAttributes.

So, in your case EMF Search code generation failure possibilities are :
- the query didn't find any suitable feature (eg, you dont have any
EClass with a String or EString attribute inside)
- Its possibly a bug and I would be interested in getting your ecore
models (or pertinent excerpt) to deeper analysis

Let see if we can find a suitable & reusable solution for your need.

regards,

- Lucas



> Hi,
>
> I have a bunch of EMF models that I like to enable search on. When I
> right-click on the genmodels for my models and select the generation
> wizard for EMF Search, I get the following error:
> Querying EString EStructualFeature failed! Didn't found any valid
> EStructualFeature.
>
> Any idea what I'm doing wrong?
> Are there any constraints on the EMF model I need to fullfill?
>
> Regards
>
> Henrik
>
>
Re: [EMF Search] Problem in wizard [message #619233 is a reply to message #125649] Wed, 11 June 2008 08:24 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
Lucas,

Given that any EAttribute x for which
x.getEAttributeType().isSerializeable() is true, you could always use
EcoreUtil.convertToString on its value (of course considering
multiplicities as well) so that pretty much any type of attribute could
be used for searching. I suppose that string-based ones are the most
likely ones to actually yield more interesting types of searches
though. Are you looking for EDataTypes with java.lang.String as their
instance class name? Even in the general case there, the
createFromString/convertToString could do decoding and encoding...


lucas bigeardel wrote:
> Henrik,
>
> for the moment, the code generation only relies on String/EString
> EAttributes.
>
> The wizard actually does a query on genmodel file looking for (and
> only for) String/EString EAttributes.
>
> So, in your case EMF Search code generation failure possibilities are :
> - the query didn't find any suitable feature (eg, you dont have any
> EClass with a String or EString attribute inside)
> - Its possibly a bug and I would be interested in getting your ecore
> models (or pertinent excerpt) to deeper analysis
>
> Let see if we can find a suitable & reusable solution for your need.
>
> regards,
>
> - Lucas
>
>
>
>> Hi,
>>
>> I have a bunch of EMF models that I like to enable search on. When I
>> right-click on the genmodels for my models and select the generation
>> wizard for EMF Search, I get the following error:
>> Querying EString EStructualFeature failed! Didn't found any valid
>> EStructualFeature.
>>
>> Any idea what I'm doing wrong?
>> Are there any constraints on the EMF model I need to fullfill?
>>
>> Regards
>>
>> Henrik
>>
>>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EMF Search] Problem in wizard [message #619236 is a reply to message #125695] Wed, 11 June 2008 11:50 Go to previous message
lucas bigeardel is currently offline lucas bigeardelFriend
Messages: 155
Registered: July 2009
Senior Member
Ed,

an ultimate goal with EMF Search is to provide a way to textually query
any kind of typed element like you started to suggest.

I have been short on time for Ganymede release and reduced the scope to
(E)String attributes mainly while lacking time to tune up more complex
templates for my code generation.

So for the moment to propose attributes in the search generation wizard, a
query is ran against GenModelPackage.Literals.GEN_TYPED_ELEMENT meta
elements of a given genmodel model.

A refinement is done given the fact we currently restrict search to be
applied only on EAttributes (known from
GenTypedElement::getEcoreModelElement)

And finally discriminating String/EString EAttributes on
String signature = eAttribute.getEType().getInstanceTypeName();

I will take a look at the EcoreUtil you mentioned to hopefully get a
better code generation for 3.5 M3+. I need to write a roadmap for EMF
Search soon.

So, in conclusion the current code generation is mainly a good bootstrap
working for String attributes with objective to be quickly enhanced with a
complete type support later on.

regards,
Previous Topic:Converting from ecore_diagram to ecorediag
Next Topic:Re: Input for generated editor
Goto Forum:
  


Current Time: Thu Sep 26 02:10:26 GMT 2024

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

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

Back to the top