Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » problem in the autocomplete method, Xtext bug?
problem in the autocomplete method, Xtext bug? [message #1702813] Fri, 24 July 2015 21:16 Go to next message
David Smith is currently offline David SmithFriend
Messages: 2
Registered: July 2015
Junior Member
Hello ,

I have a small problem. Why do I get the next item in the autocomplete? if the semicolon is set, it works. Can i also query the slash in the grammer?

Thanks for the support!

--------------------------------------------

Model:
	greetings+=Greeting*;
	
Greeting:
	'Hello' name=ID (('\\') allNames+=NameList)* ';'
;

NameList:
	name=ID
;


class MyDslProposalProvider extends AbstractMyDslProposalProvider {
	override complete_NameList(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
		println((context.currentModel as Greeting).name)
		
		for (element : (context.currentModel as Greeting).allNames) {
			println("Name "+element.name)
		}
		println("--------------------------------------------------")
		
		super.complete_NameList(model, ruleCall, context, acceptor)
	}
}


Hello aaaa\bbbb\
Hello ddddddddd;



index.php/fa/22669/0/
index.php/fa/22670/0/
  • Attachment: 1_PIC.jpg
    (Size: 30.82KB, Downloaded 245 times)
  • Attachment: 2_PIC.jpg
    (Size: 28.79KB, Downloaded 231 times)
Re: problem in the autocomplete method, Xtext bug? [message #1703335 is a reply to message #1702813] Thu, 30 July 2015 17:06 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi David,

you could try to inspect the nodes (lastCompleteNode, previousNode) that
are available from the ContentAssistContext. It may be cumbersome,
though the information should be available there.

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Find help at http://xtext.itemis.com or xtext(@)itemis.com
Blog: zarnekow.blogspot.com
Twitter: @szarnekow
Google+: https://www.google.com/+SebastianZarnekow
Re: problem in the autocomplete method, Xtext bug? [message #1703454 is a reply to message #1703335] Fri, 31 July 2015 16:13 Go to previous message
David Smith is currently offline David SmithFriend
Messages: 2
Registered: July 2015
Junior Member
Hi Sebastian, I did it last week solved exactly. Thank you for your response.

regards
David
Previous Topic:Newbie Grammar Question - Quoted Attribute List
Next Topic:How could i parse string and link its model with my files in eclipse project?
Goto Forum:
  


Current Time: Sat Apr 27 20:17:35 GMT 2024

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

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

Back to the top