Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Content assist with Xbase grammars
Content assist with Xbase grammars [message #843958] Fri, 13 April 2012 14:40 Go to next message
Jochen Schmich is currently offline Jochen SchmichFriend
Messages: 29
Registered: July 2009
Junior Member
Hi there,

As a newbie to Xbase-based grammars I have to ask this rather simple question:

Consider the following pretty straightforward case in which I use the JvmTypeReference to assign a type to a property.

I think most readers should be familiar with this Smile

Property: 'property' name=ID ':' type=JvmTypeReference


I've also implemented the JvmModelInferrer as proposed in the documentation. The linking stuff works nicely.

I didn't achieve to make the elements declared in the model (they don't exist as Java classes yet) appear in content assist.

Of course I only mean those elements being propagated as a JvmGenericType to the JvmModel in the JvmModelInferrer.

I guess that, after digging deeper into the Xtext codebase, I'll be able to get them to appear - but is there a nice out-of-the-box way to do this in my ProposalProvider?

I've tried whether the Entity-example project supports this - without success.

Can someone give me a hint on this, please?

Cheers,
Jochen
Re: Content assist with Xbase grammars [message #844052 is a reply to message #843958] Fri, 13 April 2012 16:28 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Jochen,

I think you are facing this one:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=350823

After you save your dsl file (and put the src-gen onto the source-path
of your project), you'll most likely see the proposals.
Did you face other problems with content proposals, too?

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 13.04.12 16:40, schrieb Jochen Schmich:
> Hi there,
>
> As a newbie to Xbase-based grammars I have to ask this rather simple
> question:
>
> Consider the following pretty straightforward case in which I use the
> JvmTypeReference to assign a type to a property.
>
> I think most readers should be familiar with this :)
>
> Property: 'property' name=ID ':' type=JvmTypeReference
>
> I've also implemented the JvmModelInferrer as proposed in the
> documentation. The linking stuff works nicely.
>
> I didn't achieve to make the elements declared in the model (they don't
> exist as Java classes yet) appear in content assist.
>
> Of course I only mean those elements being propagated as a
> JvmGenericType to the JvmModel in the JvmModelInferrer.
>
> I guess that, after digging deeper into the Xtext codebase, I'll be able
> to get them to appear - but is there a nice out-of-the-box way to do
> this in my ProposalProvider?
>
> I've tried whether the Entity-example project supports this - without
> success.
>
> Can someone give me a hint on this, please?
>
> Cheers,
> Jochen
Re: Content assist with Xbase grammars [message #849991 is a reply to message #844052] Thu, 19 April 2012 16:52 Go to previous message
Jochen Schmich is currently offline Jochen SchmichFriend
Messages: 29
Registered: July 2009
Junior Member
Hi Sebastian,

sorry for responding that late.

Thanks for pointing me to the bug report - that exactly addresses exactly my problem.

Following your advice makes my stuff work, at least for tool development purposes. This approach doesn't work out in our environment yet - our generators are too slow for that (we currently generate from UML models from context menu).

I didn't have any other problems with content proposals...

Cheers & thanks,
Jochen
Previous Topic:compiling Xtext sources
Next Topic:Validation errors in Xpand template for project wizard
Goto Forum:
  


Current Time: Fri Apr 19 18:26:13 GMT 2024

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

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

Back to the top