Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Completion from POJO
Completion from POJO [message #895397] Thu, 12 July 2012 17:11 Go to next message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
Hi,

(I'm a total newbie to Xtext.) I have created a grammar and have successfully generated the editor. So far so good.
Now I would like for the editor to offer completion of some identifiers. Now the trick is that these identifiers are not defined in the edited file itself (nor any other file) but are coming from a POJO "model" that I have.
Of linking and scoping, what is the most appropriate way to achieve this, or am I totally not in the right place?

Thx

Pascal
Re: Completion from POJO [message #895400 is a reply to message #895397] Thu, 12 July 2012 17:18 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Can you bit more precise what you want to do? Is the pojothing static
or written by the user? Did you have a look at the proposal provider
class?

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Completion from POJO [message #895418 is a reply to message #895400] Thu, 12 July 2012 19:04 Go to previous messageGo to next message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
In full details Smile
I'm trying to build a replacement for the PDE category editor where users would be able to use completion to refer to p2 IUs contained in some identified p2 repositories.

Therefore the model would be IUs loaded from IMetadataRepository (http://git.eclipse.org/c/equinox/rt.equinox.p2.git/tree/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/IMetadataRepository.java)

Re: Completion from POJO [message #895419 is a reply to message #895418] Thu, 12 July 2012 19:15 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
hmmm,

so did you have a look at the complete.... methods in your proposal provider and tried to override/customize them?

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Completion from POJO [message #895680 is a reply to message #895419] Sat, 14 July 2012 20:24 Go to previous message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
I will look into it and report progress. Thx for the help.
Previous Topic:problems for JvmType references when executing tests with Tycho
Next Topic:how to get access to global scope inside a AbstractDeclarativeScopeProvider method?
Goto Forum:
  


Current Time: Tue Apr 23 17:30:53 GMT 2024

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

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

Back to the top