Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Update language server UI in non UI thread(Update language server UI in non UI thread)
Update language server UI in non UI thread [message #1851297] Fri, 01 April 2022 16:58 Go to next message
Nagaraj Kandoor is currently offline Nagaraj KandoorFriend
Messages: 38
Registered: May 2020
Member
Eclipse has Display.getDefault().asyncExec method for updating UI from non ui thread.

How do we update language server Ui ?


My first request from VS code editor(Cnt + space) is getting failed, subsequent request is getting successful.

Any suggestion how to I investigate this further ?
Looking forward for your reply.

 [Error - 6:05:44 PM] Request textDocument/completion failed.
  Message: Internal error.
  Code: -32603
java.util.concurrent.CompletionException: java.lang.NullPointerException
	at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
	at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
	at java.util.concurrent.CompletableFuture.uniAccept(Unknown Source)
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(Unknown Source)
	at java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
	at java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
	at org.eclipse.xtext.ide.server.concurrent.AbstractRequest.logAndCompleteExceptionally(AbstractRequest.java:73)
	at org.eclipse.xtext.ide.server.concurrent.ReadRequest.lambda$doRun$0(ReadRequest.java:69)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at com.text.dsl.ui.contentassist.BaseTemplateProposal.createSnippet(BaseTemplateProposal.xtend:48)
	at com.text.dsl.ui.contentassist.BaseTemplateProposal.addInstanceProposal(BaseTemplateProposal.xtend:30)
	at com.text.dsl.ui.contentassist.TextDslTemplateProposalProviderUtil.proposeInstanceClasses(TextDslTemplateProposalProviderUtil.xtend:734)
	at com.text.dsl.ui.contentassist.TextDslTemplateProposalProviderUtil.addInstanceOrFeatureTemplate(TextDslTemplateProposalProviderUtil.xtend:672)
	at com.text.dsl.ide.contentassist.TextDslIdeContentTemplateProposalProvider.createTemplates(TextDslIdeContentTemplateProposalProvider.xtend:56)
	at com.text.dsl.ide.contentassist.TextDslIdeContentProposalProvider._createProposals(TextDslIdeContentProposalProvider.xtend:41)
	at com.text.dsl.ide.contentassist.TextDslIdeContentProposalProvider.createProposals(TextDslIdeContentProposalProvider.xtend:31)
	at org.eclipse.xtext.ide.editor.contentassist.IdeContentProposalProvider.createProposals(IdeContentProposalProvider.java:71)
	at org.eclipse.xtext.ide.server.contentassist.ContentAssistService.createProposals(ContentAssistService.java:104)
	at org.eclipse.xtext.ide.server.contentassist.ContentAssistService.createCompletionList(ContentAssistService.java:77)
	at org.eclipse.xtext.ide.server.LanguageServerImpl.lambda$completion$22(LanguageServerImpl.java:551)
	at org.eclipse.xtext.ide.server.WorkspaceManager.doRead(WorkspaceManager.java:438)
	at org.eclipse.xtext.ide.server.LanguageServerImpl.completion(LanguageServerImpl.java:550)
	at org.eclipse.xtext.ide.server.LanguageServerImpl.lambda$completion$21(LanguageServerImpl.java:536)
	at org.eclipse.xtext.ide.server.concurrent.ReadRequest.lambda$doRun$0(ReadRequest.java:66)

[Updated on: Fri, 01 April 2022 19:10]

Report message to a moderator

Re: Update language server UI in non UI thread [message #1851300 is a reply to message #1851297] Fri, 01 April 2022 18:18 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14349
Registered: July 2009
Senior Member
hi, i cannot follow your description
can you explain
you should debug what is null in BaseTemplateProposal


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Fri, 01 April 2022 18:34]

Report message to a moderator

Re: Update language server UI in non UI thread [message #1851306 is a reply to message #1851300] Fri, 01 April 2022 20:06 Go to previous message
Nagaraj Kandoor is currently offline Nagaraj KandoorFriend
Messages: 38
Registered: May 2020
Member
@ Christian Dietrich thank you for your reply.
Found root cause.
Previous Topic:AbstractFormatter2
Next Topic:xtext some .dsl files shall not be checked from grammar
Goto Forum:
  


Current Time: Sun Sep 25 09:24:14 GMT 2022

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

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

Back to the top