Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Auto insert single proposals
Auto insert single proposals [message #879485] Thu, 31 May 2012 09:55 Go to next message
Vil Lpz is currently offline Vil LpzFriend
Messages: 24
Registered: April 2012
Junior Member
Hello.

I want to enable insert single proposals automatically in my xtext editor.

My languajeProposalProvider look's like this:
public class MymwDslProposalProvider extends AbstractMymwDslProposalProvider {
        ...
	
	@Override
	protected ConfigurableCompletionProposal doCreateProposal(String proposal,
			StyledString displayString, Image image, int priority,
			ContentAssistContext context) {
		ConfigurableCompletionProposal theproposal = 
				super.doCreateProposal(proposal, displayString, image, priority, context);
		
		theproposal.setAutoInsertable(true);
		
		return theproposal;
	}

}


But it doesnt works.

I need to change any more?

Thanks for your help!

[Updated on: Thu, 31 May 2012 09:55]

Report message to a moderator

Re: Auto insert single proposals [message #879496 is a reply to message #879485] Thu, 31 May 2012 10:14 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Hi,

sounds like a bug to me
org.eclipse.xtext.ui.editor.contentassist.AbstractContentProposalProvider.doCreateProposal(String, StyledString, Image, int, ContentAssistContext)
and
org.eclipse.xtext.ui.editor.contentassist.DefaultCompletionProposalPostProcessor.postProcess(ICompletionProposal[])

dont work properly together.
please file a bugzilla

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Auto insert single proposals [message #879504 is a reply to message #879485] Thu, 31 May 2012 10:25 Go to previous messageGo to next message
Vil Lpz is currently offline Vil LpzFriend
Messages: 24
Registered: April 2012
Junior Member
Thank you very much for the reply.

Is there any way that works?

A greeting.
Re: Auto insert single proposals [message #879505 is a reply to message #879504] Thu, 31 May 2012 10:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
hacking DefaultCompletionProposalPostProcessor. but i cannot say which unwanted sideeffects this may have

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Auto insert single proposals [message #879510 is a reply to message #879505] Thu, 31 May 2012 10:32 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
None.

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

Am 31.05.12 12:26, schrieb Christian Dietrich:
> hacking DefaultCompletionProposalPostProcessor. but i cannot say which
> unwanted sideeffects this may have
Previous Topic:Stop refresh process for outline view if syntax errors are present
Next Topic:Visibility, scoping and imported namespace
Goto Forum:
  


Current Time: Fri Mar 29 05:01:57 GMT 2024

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

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

Back to the top