|TemplateProposalProvider for webapplication [message #1834752]
||Tue, 17 November 2020 12:13
| Michiel Jonckheere
Registered: November 2020
I am currently trying to use Xtext to create a structured editor. The reason that I chose Xtext is that it has also a web editor.
I have been experimenting with it, and one of the main features that it should have is the auto-completion, by using some templates. I was able to create templates that can be used in the eclipse application, but these don't work in the web editor. The templates are located in `<package>.ui/templates/templates.xml`.
I also found another way to create the templates, which is used in the statemachine web example (https://github.com/eclipse/xtext-web/tree/8edb0503934e7e649317097de8558cdfa9ec9102). In the ide/src folder, they have a class which extends the AbstractIdeTemplateProposalProvider. I have tried to create the same classes as they have done (a TemplateProposalProvider and a ContentProposalProvider) and in the IdeModule.java class, I added the bindIdeContentProposalProvider method. When I build the web editor again, it wouldn't load properly (no editor, only the title is visible) and in the eclipse editor the new template I made was not available.
In the attachments I added some screenshots of the code I currently have.
Does someone know how I should use the AbstractIdeTemplateProposalProvider properly so it will work in the web editor? I can not find a tutorial that makes use of it... Or is there another possible way to provide auto-compete templates in the web editor?
Thanks in advance for your response.
Powered by FUDForum
. Page generated in 0.02152 seconds