XTEXT Custom Content Assist [message #1804221] |
Wed, 20 March 2019 15:52 |
Santhiveeran S Messages: 7 Registered: November 2018 |
Junior Member |
|
|
Hi All,
Thanks for reading my queries and help me.
I have a grammar to declare variables,
SetenvInstruction:
'setenv '(name=Variable)' '(value=VariableValue)
;
the grammar is working fine, I am facing one abnormal behavior in content assist. I want to show the full pattern of the syntax so I created MyDSLProposalProvider
and override the setenv
override complete_SetenvInstruction(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
super.complete_SetenvInstruction(model, ruleCall, context, acceptor)
acceptor.accept(this.createCompletionProposal("\t setenv envvar value","SetEnv",null,context))
}
The issue is I am not getting this "SetEnv" at all time. Only if some content already in the line, then I press ctrl + space, I am getting this SetEnv.
If I press enter key and in new fresh line, I press ctrl+space, I am getting normal content assist but this "SetEnv" is missing.
I didnt get any clue to find the problem.
I tried to check the prefix, in both cases the prefix is empty and newline character.
I have removed the space from hidden to fulfill some requirement. Is it any thing impact for this.
Please help me to resolve this.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04368 seconds