Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Content assist inserting common prefixes automatically
Content assist inserting common prefixes automatically [message #673448] Mon, 23 May 2011 16:51 Go to next message
Jérôme Fouletier is currently offline Jérôme FouletierFriend
Messages: 39
Registered: September 2010
Location: France
Member
Some strings available through content assist in our DSL are quite long and, like java packages, can have whole sub-strings in common.
The eclipse java editor has the "insert common prefixes automatically" option, and I wondered whether that behaviour was implementable with an XText-generated editor.
Any thoughts on the matter?
Re: Content assist inserting common prefixes automatically [message #673475 is a reply to message #673448] Mon, 23 May 2011 17:55 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Sure, that's possible.
If you override
DefaultContentAssistantFactory.configureContentAssistant(ContentAssistant,
SourceViewerConfiguration, ISourceViewer)
and enable prefix completion on the given assistant, it should work out
of the box.

super.configureContentAssistant(..)
assistant.enablePrefixCompletion(true);

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

Am 23.05.11 18:51, schrieb forums-noreply@eclipse.org:
> Some strings available through content assist in our DSL are quite long
> and, like java packages, can have whole sub-strings in common.
> The eclipse java editor has the "insert common prefixes automatically"
> option, and I wondered whether that behaviour was implementable with an
> XText-generated editor.
> Any thoughts on the matter?
Previous Topic:(no subject)
Next Topic:trouble with cross references and constants
Goto Forum:
  


Current Time: Thu Apr 25 01:54:33 GMT 2024

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

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

Back to the top