problem in the autocomplete method, Xtext bug? [message #1702813] |
Fri, 24 July 2015 21:16 |
David Smith 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;
-
Attachment: 1_PIC.jpg
(Size: 30.82KB, Downloaded 266 times) -
Attachment: 2_PIC.jpg
(Size: 28.79KB, Downloaded 256 times)
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04871 seconds