Giter VIP home page Giter VIP logo

lsp4e's People

Contributors

ahmedneilhussain avatar akurtakov avatar andrewl-avlq avatar angelozerr avatar apupier avatar basilevs avatar bastiandoetsch avatar boereck avatar boykoalex avatar briandealwis avatar christophkaser avatar dependabot[bot] avatar geraldmit avatar ghentschke avatar guw avatar jankoehnlein avatar jeffmaury avatar joaodinissf avatar jonahgraham avatar kdvolder avatar markz3 avatar martinlippert avatar mickaelistria avatar mofterdinger avatar pyvesb avatar rubenporras avatar sebthom avatar si-so avatar travkin79 avatar vrubezhny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lsp4e's Issues

[Debug] Ui freeze DSPThread.getStackFrames(DSPThread.java:257)

Name: main
State: WAITING on java.util.concurrent.CompletableFuture$Signaller@489ce15c
Total blocked: 21,192  Total waited: 2,758

Stack trace: 
[email protected]/jdk.internal.misc.Unsafe.park(Native Method)
[email protected]/java.util.concurrent.locks.LockSupport.park(LockSupport.java:211)
[email protected]/java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1864)
[email protected]/java.util.concurrent.ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3463)
[email protected]/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3434)
[email protected]/java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1898)
[email protected]/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2072)
org.eclipse.lsp4e.debug.debugmodel.DSPThread.getStackFrames(DSPThread.java:257)
org.eclipse.lsp4e.debug.debugmodel.DSPThread.getTopStackFrame(DSPThread.java:221)
org.eclipse.debug.internal.ui.DelegatingModelPresentation.getInstructionPointerAnnotation(DelegatingModelPresentation.java:378)
org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.display(SourceLookupFacility.java:434)
org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility$SourceDisplayJob.runInUIThread(SourceLookupFacility.java:740)
org.eclipse.ui.progress.UIJob.lambda$0(UIJob.java:95)
org.eclipse.ui.progress.UIJob$$Lambda$888/0x00000001009b9000.run(Unknown Source)
org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
   - locked org.eclipse.swt.widgets.RunnableLock@7399e0b3
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:5101)
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4584)
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1154)
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1045)
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
org.eclipse.ui.internal.Workbench$$Lambda$190/0x00000001002bd120.run(Unknown Source)
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
[email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[email protected]/java.lang.reflect.Method.invoke(Method.java:568)
app//org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
app//org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
app//org.eclipse.equinox.launcher.Main.run(Main.java:1467)
app//org.eclipse.equinox.launcher.Main.main(Main.java:1440)

of course, no steps to reproduce, it would be too easy otherwise.

Deadlock with code minings

Found one Java-level deadlock:

"main":
waiting to lock monitor 0x00007fd0c03d4230 (object 0x00000000df66e3e8, a java.util.HashSet),
which is held by "org.eclipse.jface.text.codemining.CodeMiningReconciler"

"org.eclipse.jface.text.codemining.CodeMiningReconciler":
waiting to lock monitor 0x00007fd16802ff90 (object 0x00000000b63025c0, a java.lang.Object),
which is held by "main"

Java stack information for the threads listed above:

"main":
at org.eclipse.lsp4e.LanguageServiceAccessor.getLSWrappers(LanguageServiceAccessor.java:350)
- waiting to lock <0x00000000df66e3e8> (a java.util.HashSet)
at org.eclipse.lsp4e.LanguageServiceAccessor.getLanguageServers(LanguageServiceAccessor.java:588)
at org.eclipse.lsp4e.operations.linkedediting.LSPLinkedEditingBase.collectLinkedEditingRanges(LSPLinkedEditingBase.java:71)
at org.eclipse.lsp4e.operations.linkedediting.LSPLinkedEditingReconcilingStrategy.updateLinkedEditingHighlights(LSPLinkedEditingReconcilingStrategy.java:185)
at org.eclipse.lsp4e.operations.linkedediting.LSPLinkedEditingReconcilingStrategy.documentChanged(LSPLinkedEditingReconcilingStrategy.java:174)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged2(AbstractDocument.java:748)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:717)
at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:701)
at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:775)
at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1100)
at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:176)
- locked <0x00000000b63025c0> (a java.lang.Object)
at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1118)
at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:164)
- locked <0x00000000b63025c0> (a java.lang.Object)
at org.eclipse.jface.text.projection.ProjectionTextStore.replace(ProjectionTextStore.java:106)
at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1093)
at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1118)
at org.eclipse.jface.text.projection.ProjectionDocument.replace(ProjectionDocument.java:627)
at org.eclipse.jface.text.DefaultDocumentAdapter.replaceTextRange(DefaultDocumentAdapter.java:223)
at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:7639)
at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:8539)
at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2540)
at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:6222)
at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:6253)
at org.eclipse.swt.custom.StyledText.lambda$28(StyledText.java:5932)
at org.eclipse.swt.custom.StyledText$$Lambda$1404/0x0000000100f8cfb8.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5895)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1516)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1542)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1525)
at org.eclipse.swt.widgets.Widget.sendIMKeyEvent(Widget.java:1621)
at org.eclipse.swt.widgets.Control.gtk_commit(Control.java:3617)
at org.eclipse.swt.widgets.Canvas.gtk_commit(Canvas.java:168)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2396)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:6833)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:6197)
at org.eclipse.swt.internal.gtk3.GTK3.gtk_im_context_filter_keypress(Native Method)
at org.eclipse.swt.widgets.Control.filterKey(Control.java:2811)
at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3985)
at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:921)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2410)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:6833)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:6197)
at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_do_event(Native Method)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1565)
at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_iteration_do(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4578)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1154)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1045)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.ui.internal.Workbench$$Lambda$228/0x000000010028adb0.run(Unknown Source)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0([email protected]/Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke([email protected]/NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke([email protected]/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke([email protected]/Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
"org.eclipse.jface.text.codemining.CodeMiningReconciler":
at org.eclipse.core.internal.filebuffers.SynchronizableDocument.getChar(SynchronizableDocument.java:140)
- waiting to lock <0x00000000b63025c0> (a java.lang.Object)
at org.eclipse.core.internal.filebuffers.DocumentReader$DocumentCharSequence.charAt(DocumentReader.java:66)
at org.eclipse.core.internal.filebuffers.DocumentReader.read(DocumentReader.java:171)
at java.io.Reader.read([email protected]/Reader.java:250)
at org.eclipse.core.internal.content.LazyReader.loadBlock(LazyReader.java:100)
at org.eclipse.core.internal.content.LazyReader.ensureAvailable(LazyReader.java:64)
at org.eclipse.core.internal.content.LazyReader.read(LazyReader.java:138)
at java.io.BufferedReader.fill([email protected]/BufferedReader.java:162)
at java.io.BufferedReader.readLine([email protected]/BufferedReader.java:329)
- locked <0x00000000fdeb4e28> (a org.eclipse.core.internal.content.LazyReader)
at java.io.BufferedReader.readLine([email protected]/BufferedReader.java:396)
at org.eclipse.core.runtime.content.XMLContentDescriber.readXMLDecl(XMLContentDescriber.java:180)
at org.eclipse.core.runtime.content.XMLContentDescriber.describe2(XMLContentDescriber.java:78)
at org.eclipse.core.runtime.content.XMLRootElementContentDescriber.describe(XMLRootElementContentDescriber.java:127)
at org.eclipse.core.internal.content.ContentTypeCatalog.describe(ContentTypeCatalog.java:246)
at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:226)
at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:440)
at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:499)
at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:381)
at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:399)
at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:87)
at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.getContentType(ResourceTextFileBuffer.java:196)
at org.eclipse.lsp4e.LSPEclipseUtils.getDocumentContentTypes(LSPEclipseUtils.java:857)
at org.eclipse.lsp4e.LanguageServersRegistry.matches(LanguageServersRegistry.java:394)
at org.eclipse.lsp4e.LanguageServiceAccessor.lambda$5(LanguageServiceAccessor.java:355)
at org.eclipse.lsp4e.LanguageServiceAccessor$$Lambda$1544/0x000000010114eaa8.test(Unknown Source)
at java.util.stream.ReferencePipeline$2$1.accept([email protected]/ReferencePipeline.java:178)
at java.util.HashMap$KeySpliterator.forEachRemaining([email protected]/HashMap.java:1707)
at java.util.stream.AbstractPipeline.copyInto([email protected]/AbstractPipeline.java:509)
at java.util.stream.AbstractPipeline.wrapAndCopyInto([email protected]/AbstractPipeline.java:499)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential([email protected]/ReduceOps.java:921)
at java.util.stream.AbstractPipeline.evaluate([email protected]/AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect([email protected]/ReferencePipeline.java:682)
at org.eclipse.lsp4e.LanguageServiceAccessor.getLSWrappers(LanguageServiceAccessor.java:362)
- locked <0x00000000df66e3e8> (a java.util.HashSet)
at org.eclipse.lsp4e.LanguageServiceAccessor.getLanguageServers(LanguageServiceAccessor.java:588)
at org.eclipse.lsp4e.operations.codelens.CodeLensProvider.provideCodeMinings(CodeLensProvider.java:41)
at org.eclipse.lsp4e.operations.codelens.CodeLensProvider.provideCodeMinings(CodeLensProvider.java:73)
at org.eclipse.jface.internal.text.codemining.CodeMiningManager.lambda$2(CodeMiningManager.java:189)
at org.eclipse.jface.internal.text.codemining.CodeMiningManager$$Lambda$1662/0x0000000101202ef0.apply(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept([email protected]/ReferencePipeline.java:197)
at java.util.Spliterators$ArraySpliterator.forEachRemaining([email protected]/Spliterators.java:992)
at java.util.stream.AbstractPipeline.copyInto([email protected]/AbstractPipeline.java:509)
at java.util.stream.AbstractPipeline.wrapAndCopyInto([email protected]/AbstractPipeline.java:499)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential([email protected]/ReduceOps.java:921)
at java.util.stream.AbstractPipeline.evaluate([email protected]/AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect([email protected]/ReferencePipeline.java:682)
at org.eclipse.jface.internal.text.codemining.CodeMiningManager.getCodeMinings(CodeMiningManager.java:195)
at org.eclipse.jface.internal.text.codemining.CodeMiningManager.updateCodeMinings(CodeMiningManager.java:140)
at org.eclipse.jface.internal.text.codemining.CodeMiningManager.run(CodeMiningManager.java:129)
at org.eclipse.jface.text.source.SourceViewer.updateCodeMinings(SourceViewer.java:1313)
at org.eclipse.jface.text.codemining.CodeMiningStrategy.reconcile(CodeMiningStrategy.java:56)
at org.eclipse.jface.text.reconciler.Reconciler.process(Reconciler.java:149)
at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:210)

Found 1 deadlock.

Command button shown but clicking does not generate a notification to server

I've got an LSP server that seems to work. It gets called for document changes and it shows command buttons at the right places in the code. (Where button is like a line above the code with the title of the command.)

image

However, clicking on the command button has no effect. I ran the server in the debugger and I verified that there are no notifications received, not a single character. I also made a log, which is included.

Bit lost how to debug this?

This is the log:


[t=1643969563104] LSP4E to AlloyLanguageServer:
Content-Length: 3193


[t=1643969563104] LSP4E to AlloyLanguageServer:
{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":5113,"rootPath":"/Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.classic.test/","rootUri":"file:///Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.classic.test/","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","delete","rename"],"failureHandling":"undo"},"symbol":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"workspaceFolders":true},"textDocument":{"synchronization":{"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"completionItem":{"snippetSupport":true,"documentationFormat":["markdown","plaintext"]}},"hover":{"contentFormat":["markdown","plaintext"]},"signatureHelp":{},"references":{},"documentHighlight":{},"documentSymbol":{"symbolKind":{"valueSet":[18,17,5,14,9,10,22,24,8,1,12,11,20,6,2,3,21,16,19,25,4,7,15,23,26,13]},"hierarchicalDocumentSymbolSupport":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{},"definition":{"linkSupport":true},"typeDefinition":{"linkSupport":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true},"codeLens":{},"documentLink":{},"colorProvider":{},"rename":{},"foldingRange":{}}},"clientName":"Eclipse IDE","trace":"off","workspaceFolders":[{"uri":"file:/Users/aqute/Ws/alloy/org.alloytools.alloy/.metadata/.plugins/bndtools.jareditor/.BndtoolsJAREditorTempFiles","name":".BndtoolsJAREditorTempFiles"},{"uri":"file:/Users/aqute/Ws/alloy/org.alloytools.alloy/cnf","name":"cnf"},{"uri":"file:/Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.application","name":"org.alloytools.alloy.application"},{"uri":"file:/Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.classic.provider","name":"org.alloytools.alloy.classic.provider"},{"uri":"file:/Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.classic.test","name":"org.alloytools.alloy.classic.test"},{"uri":"file:/Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.core","name":"org.alloytools.alloy.core"},{"uri":"file:/Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.dist","name":"org.alloytools.alloy.dist"},{"uri":"file:/Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.extra","name":"org.alloytools.alloy.extra"},{"uri":"file:/Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.lsp","name":"org.alloytools.alloy.lsp"},{"uri":"file:/Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.shell","name":"org.alloytools.alloy.shell"},{"uri":"file:/Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.test","name":"org.alloytools.alloy.test"},{"uri":"file:/Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.wrappers","name":"org.alloytools.alloy.wrappers"},{"uri":"file:/Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.api","name":"org.alloytools.api"},{"uri":"file:/Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.util","name":"org.alloytools.util"}]}}
[t=1643969563534] AlloyLanguageServer to LSP4E:
{"jsonrpc":"2.0","id":"1","result":{"capabilities":{"textDocumentSync":1,"hoverProvider":true,"definitionProvider":true,"referencesProvider":true,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"codeLensProvider":{"resolveProvider":false},"renameProvider":true,"documentLinkProvider":{}}}}
[t=1643969563536] LSP4E to AlloyLanguageServer:
Content-Length: 52


[t=1643969563536] LSP4E to AlloyLanguageServer:
{"jsonrpc":"2.0","method":"initialized","params":{}}
[t=1643969563537] LSP4E to AlloyLanguageServer:
Content-Length: 434


[t=1643969563537] LSP4E to AlloyLanguageServer:
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.classic.test/src/test/resources/alloy.tests/weird.als","languageId":"als","version":1,"text":"\n\nsig A {}\nsig B extends A {}\n\n--\n-- A function defined to be total that is actually partial\n--\nfun foo[x:B] :  one A {none}\n\nrun { some x : B | no foo[x] } for 4 expect 1\n"}}}
[t=1643969563538] LSP4E to AlloyLanguageServer:
Content-Length: 220


[t=1643969563538] LSP4E to AlloyLanguageServer:
{"jsonrpc":"2.0","id":"2","method":"textDocument/codeLens","params":{"textDocument":{"uri":"file:///Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.classic.test/src/test/resources/alloy.tests/weird.als"}}}
[t=1643969563647] AlloyLanguageServer to LSP4E:
{"jsonrpc":"2.0","id":"2","result":[{"range":{"start":{"line":10,"character":0},"end":{"line":10,"character":36}},"command":{"title":"run","command":"ExecuteAlloyCommand","arguments":["file:///Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.classic.test/src/test/resources/alloy.tests/weird.als",0,10,0]}}]}
[t=1643969570628] LSP4E to AlloyLanguageServer:
Content-Length: 440


[t=1643969570628] LSP4E to AlloyLanguageServer:
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"version":2,"uri":"file:///Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.classic.test/src/test/resources/alloy.tests/weird.als"},"contentChanges":[{"text":"\n\nsig A {}\nsig B extends A {}\n\n--\n-- A function defined to be total that is actually partial\n--\nfun foo[x:B] :  one A {none}\n\nrun { some x : B | no foo[x] } for 4 expect 1\n\n"}]}}
[t=1643969572917] LSP4E to AlloyLanguageServer:
Content-Length: 405


[t=1643969572917] LSP4E to AlloyLanguageServer:
{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///Users/aqute/Ws/alloy/org.alloytools.alloy/org.alloytools.alloy.classic.test/src/test/resources/alloy.tests/weird.als"},"text":"\n\nsig A {}\nsig B extends A {}\n\n--\n-- A function defined to be total that is actually partial\n--\nfun foo[x:B] :  one A {none}\n\nrun { some x : B | no foo[x] } for 4 expect 1\n\n"}}

getDocument(ITextEditor) incorrectly assumes an implementation of AbstractTextEditor

Method getSourceViewerMethod= AbstractTextEditor.class.getDeclaredMethod("getSourceViewer"); //$NON-NLS-1$

(Note that this is for older version of code but issue still remains)
java.lang.IllegalArgumentException: java.lang.ClassCastException@1466e463
at jdk.internal.reflect.GeneratedMethodAccessor130.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.lsp4e.LSPEclipseUtils.getDocument(LSPEclipseUtils.java:604)
at org.eclipse.lsp4e.operations.rename.LSPRenameHandler.setEnabled(LSPRenameHandler.java:110)
at org.eclipse.ui.internal.handlers.HandlerProxy.setEnabled(HandlerProxy.java:229)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.setEnabled(E4HandlerProxy.java:133)
at jdk.internal.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:317)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:251)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.setEnabled(HandlerServiceHandler.java:84)
at org.eclipse.core.commands.Command.setEnabled(Command.java:856)
at org.eclipse.ui.menus.CommandContributionItem.isEnabled(CommandContributionItem.java:916)
at org.eclipse.ui.menus.CommandContributionItem.updateMenuItem(CommandContributionItem.java:531)
at org.eclipse.ui.menus.CommandContributionItem.update(CommandContributionItem.java:484)
at org.eclipse.jface.action.MenuManager.update(MenuManager.java:858)
at org.eclipse.jface.action.MenuManager.update(MenuManager.java:858)
at org.eclipse.ui.internal.Workbench.updateActiveWorkbenchWindowMenuManager(Workbench.java:3152)
at org.eclipse.ui.internal.Workbench.lambda$0(Workbench.java:3134)
at .bindingManagerChanged(Unknown Source)
at org.eclipse.jface.bindings.BindingManager.fireBindingManagerChanged(BindingManager.java:901)
at org.eclipse.jface.bindings.BindingManager.setActiveBindings(BindingManager.java:2181)
at org.eclipse.jface.bindings.BindingManager.recomputeBindings(BindingManager.java:1742)
at org.eclipse.jface.bindings.BindingManager.contextManagerChanged(BindingManager.java:691)
at org.eclipse.core.commands.contexts.ContextManager.fireContextManagerChanged(ContextManager.java:164)
at org.eclipse.core.commands.contexts.ContextManager.setEventCaching(ContextManager.java:323)
at org.eclipse.core.commands.contexts.ContextManager.deferUpdates(ContextManager.java:85)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:778)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:680)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:675)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3216)
at org.eclipse.ui.internal.WorkbenchPage.lambda$9(WorkbenchPage.java:3112)
at .run(Unknown Source)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3110)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3080)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3063)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:636)

...

The current getDocument(ITextEditor) assumes that the ITextEditor implementation is only default installed Eclipse Editor.

However LSPRenameHandler setEnabled() path can be triggered from any Editor, including ones not using AbstractTextEditor to build an implementation, resulting in an error in the log.

I am unsure as to the technical reason for using the reflection to access the document, other than to assure only an existing ITextViewer is used.

I do note that openFileLocationInEditor uses ITextEditor via getDocumentProvider().getDocument(IEditorInput) and getEditorInput() to get the document, or that getTextViewer(IEditorPart) also seems that it could be used by getDocument, as ITextEditor extends IEditorPart.

I have a proposed change set cc762b4 to keep the section for which I do not have a greater understanding of the technical reasoning and add a class type check to assure AbstractTextEditor, and then adds the other technique to get the IDocument as backup, which is very much over-compensation. Likely a better long-term solution is to find the most performant and go with that.

[Debug] Sometimes cannot start debugger because this.capabilities is null

I do nto have clear steps to reproduce as it is not always happening.
I'm providing a non-null Capabilities from the server: https://github.com/camel-tooling/camel-debug-adapter/blob/d474d488e86889ac3397a4c12315ed351ac60647/src/main/java/com/github/cameltooling/dap/internal/CamelDebugAdapterServer.java#L89

java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "org.eclipse.lsp4j.debug.Capabilities.getSupportsConfigurationDoneRequest()" because "this.capabilities" is null
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
	at org.eclipse.lsp4e.debug.debugmodel.DSPDebugElement.monitorGet(DSPDebugElement.java:86)
	at org.eclipse.lsp4e.debug.debugmodel.DSPDebugTarget.initialize(DSPDebugTarget.java:186)
	at org.eclipse.lsp4e.debug.launcher.DSPLaunchDelegate.createDebugTarget(DSPLaunchDelegate.java:370)
	at org.eclipse.lsp4e.debug.launcher.DSPLaunchDelegate.launch(DSPLaunchDelegate.java:350)
	at org.eclipse.lsp4e.debug.launcher.DSPLaunchDelegate.launch(DSPLaunchDelegate.java:195)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:803)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:716)
	at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1021)
	at org.eclipse.debug.internal.ui.DebugUIPlugin$2.run(DebugUIPlugin.java:1224)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.NullPointerException: Cannot invoke "org.eclipse.lsp4j.debug.Capabilities.getSupportsConfigurationDoneRequest()" because "this.capabilities" is null
	at org.eclipse.lsp4e.debug.debugmodel.DSPDebugTarget.lambda$8(DSPDebugTarget.java:266)
	at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
	at org.eclipse.lsp4e.debug.debugmodel.DSPDebugTarget.initialized(DSPDebugTarget.java:302)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
	at org.eclipse.lsp4j.jsonrpc.validation.ReflectiveMessageValidator.consume(ReflectiveMessageValidator.java:68)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

Marker resolutions "Computing..." not being updated automatically

Due to a bug report that we got for the Spring tooling (spring-projects/sts4#593) I analyzed the marker resolution mechanism a bit to see what is going on here. To me it seems like the mechanism that is used in LSPCodeActionMarkerResolution.checkMarkerResoultion at the end first sets the COMPUTING attribute to the marker, then triggers the computation of the code actions for the marker via the language server - and returns after this computation completed (or times out). Then, the marker attribute is changed from the COMPUTING to the actions in an async action. That results is that on first invocation, the marker resolutions are most likely "COMPUTING..." (because the async "set actions to marker" hasn't beed executed yet) and that "COMPUTING..." doesn't get changed on the UI. You have to invoke the quick fix action again. Then it shows up the right actions, since they got added to the marker in the meantime. I thought about fixing this my including the "set actions to marker" future in the timeout instead of the codeAction future, but I am worried about this not being executed if a timeout occurs on one of the codeAction futures. Any thoughts on this? Or should we instead update the quick fix popup as soon as actions are set to a marker - in case that is possible?

Due to a bug report that we got for the Spring tooling (spring-projects/sts4#593) I analyzed the marker resolution mechanism a bit to see what is going on here. To me it seems like the mechanism that is used in

LSPCodeActionMarkerResolution.checkMarkerResoultion

at the end first sets the COMPUTING attribute to the marker, then triggers the computation of the code actions for the marker via the language server - and returns after this computation completed (or times out).

Then, the marker attribute is changed from the COMPUTING to the actions in an async action. That results is that on first invocation, the marker resolutions are most likely "COMPUTING..." (because the async "set actions to marker" hasn't beed executed yet) and that "COMPUTING..." doesn't get changed on the UI. You have to invoke the quick fix action again. Then it shows up the right actions, since they got added to the marker in the meantime.

I thought about fixing this my including the "set actions to marker" future in the timeout instead of the codeAction future, but I am worried about this not being executed if a timeout occurs on one of the codeAction futures.

Any thoughts on this?

Or should we instead update the quick fix popup as soon as actions are set to a marker - in case that is possible?

textDocument/documentLink should be renderered with hyperlink style.

textDocument/documentLink should be renderered with hyperlink style.

Given this HTML file;

<h2>Absolute URLs</h2>
<p><a href="https://www.w3.org/">W3C</a></p>
<p><a href="https://www.google.com/">Google</a></p>

<h2>Relative URLs</h2>
<p><a href="html_images.asp">HTML Images</a></p>
<p><a href="/css/default.asp">CSS Tutorial</a></p>

The HTML LS returns documentLink for a/@ref. Those document link should be underlined like this:

image

Every Outline view now has an extra "Sort Outline" toggle

org.eclipse.lsp4e 0.13.8.202111241523 bundle in the Enterprise Java and Web 2021-12 Release package.

Every editor I open is getting an additional "Sort Outline" toggle in its Outline view, even ones that already have their own sort option, and editors that don't even have outlines. From what I can tell, it's been added to the View itself, not just to the ContentOutlinePages' site's actionbars where it makes sense.

Screen Shot 2022-01-15 at 12 43 36 AM

Additionally, the label does not need to include the word, "Outline", and it does not appear to be properly externalized.

closing all editors and then opening a ts (angular) file (that was open before) results in a lot of not property disposed exceptions

!ENTRY org.eclipse.ui.ide 4 4 2022-02-02 15:52:18.519
!MESSAGE Not properly disposed SWT resource
!STACK 0
java.lang.Error: SWT Resource was not properly disposed
at org.eclipse.swt.graphics.Resource.initNonDisposeTracking(Resource.java:172)
at org.eclipse.swt.graphics.Resource.(Resource.java:120)
at org.eclipse.swt.graphics.Image.(Image.java:728)
at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:341)
at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:290)
at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:268)
at org.eclipse.lsp4e.outline.SymbolsLabelProvider.getOverlay(SymbolsLabelProvider.java:224)
at org.eclipse.lsp4e.outline.SymbolsLabelProvider.getImage(SymbolsLabelProvider.java:156)
at org.eclipse.ui.internal.navigator.NavigatorContentServiceLabelProvider.findImage(NavigatorContentServiceLabelProvider.java:204)
at org.eclipse.ui.internal.navigator.NavigatorContentServiceLabelProvider.getColumnImage(NavigatorContentServiceLabelProvider.java:112)
at org.eclipse.ui.internal.navigator.NavigatorContentServiceLabelProvider.getImage(NavigatorContentServiceLabelProvider.java:104)
at org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider$StyledLabelProviderAdapter.getImage(NavigatorDecoratingLabelProvider.java:63)
at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.getImage(DelegatingStyledCellLabelProvider.java:198)
at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.getImage(DecoratingStyledCellLabelProvider.java:171)
at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.update(DelegatingStyledCellLabelProvider.java:124)
at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.update(DecoratingStyledCellLabelProvider.java:134)
at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:144)
at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:957)
at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:126)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1035)
at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:427)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2109)
at org.eclipse.jface.viewers.StructuredViewer.internalUpdate(StructuredViewer.java:2092)
at org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:2033)
at org.eclipse.jface.viewers.ColumnViewer.update(ColumnViewer.java:545)
at org.eclipse.ui.navigator.CommonViewer.update(CommonViewer.java:515)
at org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:1977)
at org.eclipse.jface.viewers.StructuredViewer.handleLabelProviderChanged(StructuredViewer.java:1156)
at org.eclipse.ui.navigator.CommonViewer.handleLabelProviderChanged(CommonViewer.java:240)
at org.eclipse.jface.viewers.ContentViewer$1.labelProviderChanged(ContentViewer.java:95)
at org.eclipse.jface.viewers.BaseLabelProvider$1.run(BaseLabelProvider.java:75)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
at org.eclipse.jface.viewers.BaseLabelProvider.fireLabelProviderChanged(BaseLabelProvider.java:72)
at org.eclipse.ui.internal.decorators.DecoratorManager$1.run(DecoratorManager.java:347)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.ui.internal.decorators.DecoratorManager.fireListener(DecoratorManager.java:344)
at org.eclipse.ui.internal.decorators.DecorationScheduler$3.runInUIThread(DecorationScheduler.java:551)
at org.eclipse.ui.progress.UIJob.lambda$0(UIJob.java:95)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4035)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3635)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1154)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1045)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)

Deadlock with codeminings

IDE froze while editing a .target file (extends XML content-type), jstack says:

Found one Java-level deadlock:
=============================
"main":
  waiting to lock monitor 0x00007fc9ca4f1c00 (object 0x0000000085a63440, a java.util.HashSet),
  which is held by "org.eclipse.jface.text.codemining.CodeMiningReconciler"

"org.eclipse.jface.text.codemining.CodeMiningReconciler":
  waiting to lock monitor 0x00007fc8f4054730 (object 0x0000000097e90c00, a java.lang.Object),
  which is held by "main"

Java stack information for the threads listed above:
===================================================
"main":
	at org.eclipse.lsp4e.LanguageServiceAccessor.getLSWrappers(LanguageServiceAccessor.java:350)
	- waiting to lock <0x0000000085a63440> (a java.util.HashSet)
	at org.eclipse.lsp4e.LanguageServiceAccessor.getLanguageServers(LanguageServiceAccessor.java:588)
	at org.eclipse.lsp4e.operations.linkedediting.LSPLinkedEditingBase.collectLinkedEditingRanges(LSPLinkedEditingBase.java:71)
	at org.eclipse.lsp4e.operations.linkedediting.LSPLinkedEditingReconcilingStrategy.updateLinkedEditingHighlights(LSPLinkedEditingReconcilingStrategy.java:185)
	at org.eclipse.lsp4e.operations.linkedediting.LSPLinkedEditingReconcilingStrategy.documentChanged(LSPLinkedEditingReconcilingStrategy.java:174)
	at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged2(AbstractDocument.java:748)
	at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:717)
	at org.eclipse.jface.text.AbstractDocument.doFireDocumentChanged(AbstractDocument.java:701)
	at org.eclipse.jface.text.AbstractDocument.fireDocumentChanged(AbstractDocument.java:775)
	at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1100)
	at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:176)
	- locked <0x0000000097e90c00> (a java.lang.Object)
	at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1118)
	at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:164)
	- locked <0x0000000097e90c00> (a java.lang.Object)
	at org.eclipse.jface.text.projection.ProjectionTextStore.replace(ProjectionTextStore.java:106)
	at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1093)
	at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1118)
	at org.eclipse.jface.text.projection.ProjectionDocument.replace(ProjectionDocument.java:627)
	at org.eclipse.jface.text.DefaultDocumentAdapter.replaceTextRange(DefaultDocumentAdapter.java:223)
	at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:7639)
	at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:8539)
	at org.eclipse.swt.custom.StyledText.doBackspace(StyledText.java:2340)
	at org.eclipse.swt.custom.StyledText.invokeAction(StyledText.java:7428)
	at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:6226)
	at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:6253)
	at org.eclipse.swt.custom.StyledText.lambda$28(StyledText.java:5932)
	at org.eclipse.swt.custom.StyledText$$Lambda$527/0x0000000100627310.handleEvent(Unknown Source)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5895)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1515)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1541)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1563)
	at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:924)
	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3992)
	at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:921)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2408)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:6833)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6197)
	at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_do_event(Native Method)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1565)
	at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_iteration_do(Native Method)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4578)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1154)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1045)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.ui.internal.Workbench$$Lambda$226/0x000000010027bc58.run(Unknown Source)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0([email protected]/Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke([email protected]/NativeMethodAccessorImpl.java:77)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke([email protected]/DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke([email protected]/Method.java:568)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
"org.eclipse.jface.text.codemining.CodeMiningReconciler":
	at org.eclipse.core.internal.filebuffers.SynchronizableDocument.getChar(SynchronizableDocument.java:140)
	- waiting to lock <0x0000000097e90c00> (a java.lang.Object)
	at org.eclipse.core.internal.filebuffers.DocumentReader$DocumentCharSequence.charAt(DocumentReader.java:66)
	at org.eclipse.core.internal.filebuffers.DocumentReader.read(DocumentReader.java:171)
	at java.io.Reader.read([email protected]/Reader.java:250)
	at org.eclipse.core.internal.content.LazyReader.loadBlock(LazyReader.java:100)
	at org.eclipse.core.internal.content.LazyReader.ensureAvailable(LazyReader.java:64)
	at org.eclipse.core.internal.content.LazyReader.read(LazyReader.java:138)
	at java.io.BufferedReader.fill([email protected]/BufferedReader.java:162)
	at java.io.BufferedReader.readLine([email protected]/BufferedReader.java:329)
	- locked <0x00000000f6c8d230> (a org.eclipse.core.internal.content.LazyReader)
	at java.io.BufferedReader.readLine([email protected]/BufferedReader.java:396)
	at org.eclipse.core.runtime.content.XMLContentDescriber.readXMLDecl(XMLContentDescriber.java:180)
	at org.eclipse.core.runtime.content.XMLContentDescriber.describe2(XMLContentDescriber.java:78)
	at org.eclipse.core.runtime.content.XMLRootElementContentDescriber.describe(XMLRootElementContentDescriber.java:127)
	at org.eclipse.core.internal.content.ContentTypeCatalog.describe(ContentTypeCatalog.java:246)
	at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:226)
	at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:440)
	at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:499)
	at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:381)
	at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:399)
	at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:87)
	at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.getContentType(ResourceTextFileBuffer.java:196)
	at org.eclipse.lsp4e.LSPEclipseUtils.getDocumentContentTypes(LSPEclipseUtils.java:851)
	at org.eclipse.lsp4e.LanguageServersRegistry.matches(LanguageServersRegistry.java:394)
	at org.eclipse.lsp4e.LanguageServiceAccessor.lambda$5(LanguageServiceAccessor.java:355)
	at org.eclipse.lsp4e.LanguageServiceAccessor$$Lambda$788/0x00000001008e24b8.test(Unknown Source)
	at java.util.stream.ReferencePipeline$2$1.accept([email protected]/ReferencePipeline.java:178)
	at java.util.HashMap$KeySpliterator.forEachRemaining([email protected]/HashMap.java:1707)
	at java.util.stream.AbstractPipeline.copyInto([email protected]/AbstractPipeline.java:509)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto([email protected]/AbstractPipeline.java:499)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential([email protected]/ReduceOps.java:921)
	at java.util.stream.AbstractPipeline.evaluate([email protected]/AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect([email protected]/ReferencePipeline.java:682)
	at org.eclipse.lsp4e.LanguageServiceAccessor.getLSWrappers(LanguageServiceAccessor.java:362)
	- locked <0x0000000085a63440> (a java.util.HashSet)
	at org.eclipse.lsp4e.LanguageServiceAccessor.getLanguageServers(LanguageServiceAccessor.java:588)
	at org.eclipse.lsp4e.operations.codelens.CodeLensProvider.provideCodeMinings(CodeLensProvider.java:41)
	at org.eclipse.lsp4e.operations.codelens.CodeLensProvider.provideCodeMinings(CodeLensProvider.java:73)
	at org.eclipse.jface.internal.text.codemining.CodeMiningManager.lambda$2(CodeMiningManager.java:189)
	at org.eclipse.jface.internal.text.codemining.CodeMiningManager$$Lambda$769/0x00000001008dd5e8.apply(Unknown Source)
	at java.util.stream.ReferencePipeline$3$1.accept([email protected]/ReferencePipeline.java:197)
	at java.util.Spliterators$ArraySpliterator.forEachRemaining([email protected]/Spliterators.java:992)
	at java.util.stream.AbstractPipeline.copyInto([email protected]/AbstractPipeline.java:509)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto([email protected]/AbstractPipeline.java:499)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential([email protected]/ReduceOps.java:921)
	at java.util.stream.AbstractPipeline.evaluate([email protected]/AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect([email protected]/ReferencePipeline.java:682)
	at org.eclipse.jface.internal.text.codemining.CodeMiningManager.getCodeMinings(CodeMiningManager.java:195)
	at org.eclipse.jface.internal.text.codemining.CodeMiningManager.updateCodeMinings(CodeMiningManager.java:140)
	at org.eclipse.jface.internal.text.codemining.CodeMiningManager.run(CodeMiningManager.java:129)
	at org.eclipse.jface.text.source.SourceViewer.updateCodeMinings(SourceViewer.java:1313)
	at org.eclipse.jface.text.codemining.CodeMiningStrategy.reconcile(CodeMiningStrategy.java:56)
	at org.eclipse.jface.text.reconciler.Reconciler.process(Reconciler.java:149)
	at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:210)

Found 1 deadlock.

Question: LSP4E with Linked Files

Hi,

in our implementation, LSP4e would need to deal with eclipse projects which has linked files, which are not visible in the OS filesystem, they are only visible in our custom eclipse filesystem.

I think that since the files are not on the OS filesystem, the Language Server (an Xtext one) cannot discover them. It only discovers the files as I open them, but not the rest of the workspace.

I was thinking on notifying the language server manually that files are added to our custom eclipse filesystem, with some code similar to the following:

    try {
      LanguageServiceAccessor.getInitializedLanguageServers(file, x -> true);
    } catch (IOException e) {
      LOGGER.error(e);
    }

I have noticed that I get warnings because LanguageServiceAccessor is marked as private API, and Eclipse warns me about that.

Thus I have the following questions:

โ€ข Is there a better way to access the Language Server and manually connect files? If not, shall I just use this code and supress the warning?
โ€ข Does it make sense what I try to achieve, that is, manually sending to the Language Server the list of files which are in the project? If not, what would be the recommened approach?

Cheers

lsp4j rains exceptions

When browsing through a java or xml file, my Error Log is filled with exceptions like:

eclipse.buildId=4.23.0.I20220308-0310
java.version=11.0.15
java.vendor=Private Build
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product

This is a continuation of log file /home/izak/eclipse-workspace/.metadata/.bak_0.log

Created Time: 2022-05-01 19:47:36.660

org.eclipse.lsp4e
Error
Mon May 02 13:31:04 CEST 2022
org.eclipse.lsp4j.jsonrpc.JsonRpcException: java.io.IOException: Stream closed

java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.JsonRpcException: java.io.IOException: Stream closed
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$13(LanguageServerWrapper.java:425)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1728)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: org.eclipse.lsp4j.jsonrpc.JsonRpcException: java.io.IOException: Stream closed
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:72)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$4(LanguageServerWrapper.java:260)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.request(RemoteEndpoint.java:161)
	at org.eclipse.lsp4j.jsonrpc.services.EndpointProxy.invoke(EndpointProxy.java:91)
	at com.sun.proxy.$Proxy49.shutdown(Unknown Source)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$13(LanguageServerWrapper.java:423)
	... 7 more
Caused by: java.io.IOException: Stream closed
	at java.base/java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:442)
	at java.base/java.io.OutputStream.write(OutputStream.java:157)
	at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
	at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:69)
	... 12 more

Resource leak in SymbolsLabelProvider

currentOverlays[maxSeverity - 1] = new DecorationOverlayIcon(res,

java.lang.Error: SWT Resource was not properly disposed
at org.eclipse.swt.graphics.Resource.initNonDisposeTracking(Resource.java:172)
at org.eclipse.swt.graphics.Resource.(Resource.java:120)
at org.eclipse.swt.graphics.Image.(Image.java:728)
at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:341)
at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:290)
at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:268)
at org.eclipse.lsp4e.outline.SymbolsLabelProvider.getOverlay(SymbolsLabelProvider.java:224)
at org.eclipse.lsp4e.outline.SymbolsLabelProvider.getImage(SymbolsLabelProvider.java:156)

UI Freeze

eclipse.buildId=4.21.0.I20210906-0500
java.version=11.0.9.1
java.vendor=Azul Systems, Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US

org.eclipse.ui.monitoring
Error
Fri Dec 17 10:16:27 CET 2021
UI freeze of 8.3s at 10:16:19.705

...

org.eclipse.ui.monitoring
Info
Fri Dec 17 10:16:27 CET 2021
Sample at 10:16:26.556 (+1.335s)
Thread 'main' tid=1 (TIMED_WAITING)

Stack Trace
	at [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
	at [email protected]/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
	at [email protected]/java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1798)
	at [email protected]/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3128)
	at [email protected]/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1868)
	at [email protected]/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2021)
	at org.eclipse.lsp4e.LanguageServerWrapper.supportsWorkspaceFolderCapability(LanguageServerWrapper.java:547)
	at org.eclipse.lsp4e.LanguageServerWrapper.canOperate(LanguageServerWrapper.java:536)
	at org.eclipse.lsp4e.LanguageServerWrapper.canOperate(LanguageServerWrapper.java:872)
	at org.eclipse.lsp4e.LanguageServiceAccessor.lambda$6(LanguageServiceAccessor.java:361)
	at org.eclipse.lsp4e.LanguageServiceAccessor$$Lambda$1631/0x0000000100178c40.test(Unknown Source)
	at [email protected]/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
	at [email protected]/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
	at [email protected]/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1603)
	at [email protected]/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at [email protected]/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at [email protected]/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at [email protected]/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at [email protected]/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at org.eclipse.lsp4e.LanguageServiceAccessor.getLSWrappers(LanguageServiceAccessor.java:362)
	at org.eclipse.lsp4e.LanguageServiceAccessor.getLanguageServers(LanguageServiceAccessor.java:588)
	at org.eclipse.lsp4e.operations.rename.LSPRenameHandler.setEnabled(LSPRenameHandler.java:121)
	at org.eclipse.ui.internal.handlers.HandlerProxy.setEnabled(HandlerProxy.java:229)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.canExecute(E4HandlerProxy.java:76)
	at jdk.internal.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:317)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:251)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.isEnabled(HandlerServiceHandler.java:62)
	at org.eclipse.core.commands.Command.isEnabled(Command.java:832)
	at org.eclipse.ui.menus.CommandContributionItem.isEnabled(CommandContributionItem.java:917)
	at org.eclipse.ui.menus.CommandContributionItem.updateMenuItem(CommandContributionItem.java:531)
	at org.eclipse.ui.menus.CommandContributionItem.update(CommandContributionItem.java:484)
	at org.eclipse.jface.action.MenuManager.update(MenuManager.java:858)
	at org.eclipse.jface.action.MenuManager.update(MenuManager.java:858)
	at org.eclipse.ui.internal.Workbench.updateActiveWorkbenchWindowMenuManager(Workbench.java:3152)
	at org.eclipse.ui.internal.Workbench.lambda$0(Workbench.java:3134)
	at org.eclipse.ui.internal.Workbench$$Lambda$296/0x00000001005a5440.bindingManagerChanged(Unknown Source)
	at org.eclipse.jface.bindings.BindingManager.fireBindingManagerChanged(BindingManager.java:901)
	at org.eclipse.jface.bindings.BindingManager.setActiveBindings(BindingManager.java:2181)
	at org.eclipse.jface.bindings.BindingManager.recomputeBindings(BindingManager.java:1742)
	at org.eclipse.jface.bindings.BindingManager.contextManagerChanged(BindingManager.java:691)
	at org.eclipse.core.commands.contexts.ContextManager.fireContextManagerChanged(ContextManager.java:164)
	at org.eclipse.core.commands.contexts.ContextManager.setActiveContextIds(ContextManager.java:295)
	at org.eclipse.e4.ui.services.ContextServiceAddon$1.changed(ContextServiceAddon.java:49)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:105)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:364)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:379)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.activate(EclipseContext.java:683)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.activateBranch(EclipseContext.java:692)
	at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener$1.run(ShellActivationListener.java:99)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.processWindow(ShellActivationListener.java:95)
	at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.handleEvent(ShellActivationListener.java:65)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1155)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4519)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1522)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1545)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1526)
	at org.eclipse.swt.widgets.Shell.windowDidBecomeKey(Shell.java:2314)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6249)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:228)
	at org.eclipse.swt.widgets.Widget.becomeKeyWindow(Widget.java:389)
	at org.eclipse.swt.widgets.Shell.becomeKeyWindow(Shell.java:533)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5968)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:235)
	at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2160)
	at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2487)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6281)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5525)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5668)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:117)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3880)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1041)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.ui.internal.Workbench$$Lambda$254/0x000000010044c040.run(Unknown Source)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:566)
	at app//org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
	at app//org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
	at app//org.eclipse.equinox.launcher.Main.run(Main.java:1467)

Editor text got broken when inserting a multiline CA proposal in some cases

The original issue: eclipse/lemminx-maven#276

The actual issue is that LSCompletionProposal.apply() method doesn't updates the proposal's additional TextEdit-s Ranges according to the number of characters typed by a user between the moment of CA is invoked and the moment of proposal is applied on the document. As result, the document gets corrupted.

Steps to reproduce:

  • Consider editing Maven Project like the following:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <artifactId>foo-child</artifactId>
  <packaging>pom</packaging>
  <name>FOO Child</name>
  <dependencies>
	<dependency>
		<artifactId>org.ecl|</artifactId>
	</dependency>
  </dependencies>
</project>
  • Place the cursor in text instead of "|" character and press Ctrl-Space to invoke the content assistant
  • Continue typing characters, for example ipse.lem in order to make org.eclipse.lemminx artifact to be the first selected proposal, then insert the selected proposal
  • See the proposal inserted breaking the existing code:
	<dependency>
		<groupId>org.eclipse.lemminx</groupId>
		<artifactId>org.eclipse.lemminx</art
		<version>0.19.1</version>ifactId>
	</dependency>

UI freeze on LSPLinkedEditingAutoEditStrategy.customizeDocumentCommand

recently upgraded to Fedora 35 and Eclipse 2021-12

reproduced 2 times:

  • a commit description hover appeared and do not want to vanish.I was in multipage pom editor, in source view, displayed git blame and hovered over it
  • Scrolling through the source tab of the multipage editor of a pom.xml.

both times were with this https://github.com/camel-tooling/camel-language-server/ (but no ttried yet with anothe rone)

Name: main
State: WAITING on java.util.concurrent.CompletableFuture$Signaller@7d37456e
Total blocked: 242  Total waited: 156

Stack trace: 
java.base@17/jdk.internal.misc.Unsafe.park(Native Method)
java.base@17/java.util.concurrent.locks.LockSupport.park(LockSupport.java:211)
java.base@17/java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1864)
java.base@17/java.util.concurrent.ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3463)
java.base@17/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3434)
java.base@17/java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1898)
java.base@17/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2072)
org.eclipse.lsp4e.operations.linkedediting.LSPLinkedEditingAutoEditStrategy.customizeDocumentCommand(LSPLinkedEditingAutoEditStrategy.java:41)
org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3705)
org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3740)
org.eclipse.jface.text.source.projection.ProjectionViewer.handleVerifyEvent(ProjectionViewer.java:1248)
org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:426)
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:277)
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
org.eclipse.swt.widgets.Display.sendEvent(Display.java:5895)
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1515)
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1541)
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1303)
org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:7607)
org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:8539)
org.eclipse.swt.custom.StyledText.doBackspace(StyledText.java:2340)
org.eclipse.swt.custom.StyledText.invokeAction(StyledText.java:7428)
org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:6226)
org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:6253)
org.eclipse.swt.custom.StyledText.lambda$28(StyledText.java:5932)
org.eclipse.swt.custom.StyledText$$Lambda$225/0x0000000800e73d98.handleEvent(Unknown Source)
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
org.eclipse.swt.widgets.Display.sendEvent(Display.java:5895)
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1515)
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1541)
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1563)
org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:924)
org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3992)
org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:921)
org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2408)
org.eclipse.swt.widgets.Control.windowProc(Control.java:6833)
org.eclipse.swt.widgets.Display.windowProc(Display.java:6197)
org.eclipse.swt.internal.gtk3.GTK3.gtk_main_do_event(Native Method)
org.eclipse.swt.widgets.Display.eventProc(Display.java:1565)
org.eclipse.swt.internal.gtk3.GTK3.gtk_main_iteration_do(Native Method)
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4578)
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1154)
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1045)
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
org.eclipse.ui.internal.Workbench$$Lambda$303/0x0000000800dd3ab0.run(Unknown Source)
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
java.base@17/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base@17/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
java.base@17/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base@17/java.lang.reflect.Method.invoke(Method.java:568)
app//org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
app//org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
app//org.eclipse.equinox.launcher.Main.run(Main.java:1467)
app//org.eclipse.equinox.launcher.Main.main(Main.java:1440)

Hover widget is incorrectly sized

Seems to be Windows related.

Got it on the Qute language server which is part of Quarkus Tools but can be reproduced with github.com/jeffmaury/simplels

On Windows:

image

On Linux:

LSP4E

[feature] Prefill rename dialog with current symbol name

When using ALT+SHIFT+R to rename e.g. a field or method, the rename dialog does not prefill the current name nor has any context information on what is going to be renamed:
image

It would be nice to have the current name in the New Name field as default instead of the newName placeholder.

Solargraph not working after eclipse-update from 2021-09 to 2021-12

I've created this issue because I cannot reopen #27
@PyvesB checked my logfiles and it seems that the completion did not work because auf a change in lsp4e the deprecates rootUri in favor of workspacesFolders where workspaceFolders are send with a different uri-format.

in my case the URIs starting with with file:/Z:... instead of file:///Z:... which cannot be handled by solargraph.
It seems that rootUri was send with file:///Z:... and therefore it worked in eclipse 2021-09

@PyvesB added a really good esplanation to the issue I've created in his project: PyvesB/eclipse-solargraph#17 (comment)

LSP4E doesn't support progress

LSP4E doesn't support progress notifications from the server. Snyk is happy to contribute implementation on that and collaborate on the design. We were thinking of having the following approach:

  • create a map progressToken:ProgressMonitor
  • show progress in the UI (start an empty job with the progress monitor)
  • update the progress monitor whenever a progress is reported
  • exit the job when the server signals completion (progress end)

Please let us know if the approach makes sense and PR on that is welcome.

cc @bastiandoetsch @martinlippert

[Debug] Support using a Launch configuration of a Debug Adapter server in "Debug Adapter launcher"

it will be really useful during development of a Debug Adapter Server

Current workaround that I'm using for a debug adapter server developed in Java:

  • tick "Launch a Debug Server using the following arguments"
  • command: java, arguments -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=3000 -jar /home/apupier/git/camel-debug-adapter/target/camel-dap-server-0.0.1-SNAPSHOT.jar
  • start a Remote Java debug on port 3000

I wasn't able to use a "compound launch configuration", the launch configuration of the debug adpater server was never launched.

Another workaround would be to "connect to running server" and use a compound launch configuration but it implies tha the debug adapter server is supporting http/websocket connection and not only stdin/stdout

Error on compare editor

Opening a file which has LS support under the compare editor shows an error

An internal error occurred during: "LSP4E Linked Editing Highlight".
Cannot enter synchronized block because the return value of "org.eclipse.lsp4e.operations.linkedediting.LSPLinkedEditingReconcilingStrategy.getLockObject(org.eclipse.jface.text.source.IAnnotationModel)" is null

missing pom.xml files for submodules?

Hey I had a question about the build for lsp4e I found that the modules are specified in the root projects pom.xml

<module>org.eclipse.lsp4e.jdt</module>		<module>org.eclipse.lsp4e.debug</module>
<module>org.eclipse.lsp4e.tests.mock</module>

If I try to build this with maven it says the modules are not found; it is able to find modules though but the ones that it can find have a pom.xml in the project subdir. I was just wondering why that's not consistent

Linked Edit ranges erroneous when ranges are on the same line

Using for example Wild Web Developer with XML support, for file

<tag>lol</tag>

If one does edit on of the tag quickly or switching the caret, the result becomes faulty. Error can take many forms: characters included at wrong location, broken XML, or even IDE error dialog caused by some exception about invalid ranges.

Dark theme - closing hover color unreadable

Tried with M2E - Maven Integration for Eclipse (includes Incubating components) 1.20.1.20220227-1319 org.eclipse.m2e.feature.feature.group Eclipse.org - m2e and its is still bad. To test:

1.) Switch to dark theme
2.) Open pom
3.) Hover over a tag and observe the closing tag

image

See also eclipse-m2e/m2e-core#463 for the origin report

Potential deadlock or indefinite wait

I had to kill Eclipse after it became unresponsive for several minutes.

This is the last thing in the log:

!SUBENTRY 1 org.eclipse.ui.monitoring 1 0 2021-12-17 10:59:00.201
!MESSAGE Sample at 10:58:15.909 (+85.218s)
Thread 'main' tid=1 (WAITING)
!STACK 0
Stack Trace
	at [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
	at [email protected]/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
	at [email protected]/java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1796)
	at [email protected]/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3128)
	at [email protected]/java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1823)
	at [email protected]/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1998)
	at org.eclipse.lsp4e.operations.linkedediting.LSPLinkedEditingAutoEditStrategy.customizeDocumentCommand(LSPLinkedEditingAutoEditStrategy.java:41)
	at org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3705)
	at org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3740)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.handleVerifyEvent(ProjectionViewer.java:1248)
	at org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:426)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:277)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4565)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1522)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1545)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1530)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
	at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:7607)
	at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:8539)
	at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2540)
	at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:6222)
	at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:6253)
	at org.eclipse.swt.custom.StyledText.lambda$28(StyledText.java:5932)
	at org.eclipse.swt.custom.StyledText$$Lambda$235/0x000000010043cc40.handleEvent(Unknown Source)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4565)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1522)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1545)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1530)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1559)
	at org.eclipse.swt.widgets.Control.insertText(Control.java:2122)
	at org.eclipse.swt.widgets.Canvas.insertText(Canvas.java:291)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6402)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSResponder.interpretKeyEvents(NSResponder.java:59)
	at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:607)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6237)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:235)
	at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2160)
	at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2487)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6357)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5601)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5744)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:117)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3924)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1154)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1045)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.ui.internal.Workbench$$Lambda$301/0x00000001004ee040.run(Unknown Source)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:566)
	at app//org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
	at app//org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
	at app//org.eclipse.equinox.launcher.Main.run(Main.java:1467)

561372 - DocumentLinkDetector timeout too long

The associated bug 561372 from the Eclipse bug tracker is still happening in Eclipse IDE 2021-12.

Please note that this is distinct from 573312 because I don't have any Spring tooling installed and still have problems with the DocumentLinkDetector timeout.

Solargraph not working after eclipse-update from 2021-09 to 2021-12

sorry for cross-posting in different projects but i have no idea if this is an solargrah-, plugin- or lsp4e-issue.
I've added a test-description to the plugin-project: PyvesB/eclipse-solargraph#17

Currently I can only say after upgrading eclipse solargraph-completion for additional classes in own files is not working.
Eclipse 2021-09: org.eclipse.lsp4e 0.13.5.202103011336
Eclipse 2021-12: org.eclipse.lsp4e 0.13.8.202111241523

copy&paste from other issue:

to reproduce this issue you can create a new project
with this files
myapi/my_fancy_tool.rb

module Java
	module MyApi
		class MyFancyTool
			def do_something(foo)
			end
		end
	end
end

test.rb

# @type [Java::MyApi::MyFancyTool]
$tool = $tool

$tool.do_something

if you run solargraph typecheck test.rb in the project-folder you'll get

.../test.rb:4 - Not enough arguments to Java::MyApi::MyFancyTool#do_something
1 problem found.

thats right because I've defined do_something(foo)
So solargraph seems to know what type $tool is.

But in eclipse I don't get a completion for $tool. - only for []. or "". and so on

If I copy the contents of my_fancy_tool.rb into test.rb completion for $tool works as expected.

I'm on windows 10 btw.

[Debug] Remove old threads in UI after a call retrieving the list of threads

When a org.eclipse.lsp4j.debug.services.IDebugProtocolClient.stopped(StoppedEventArguments) about a breakpoint is sent. There is a call to retrieve thread lists. So new threads appears correctly but old threads are left as pending in the UI despite not being returned on the threads request.

Note: VS Code has this behavior

F3 - open definition seems weired after upgrade

I tried to update my Eclipse like mentioned in eclipse-wildwebdeveloper/wildwebdeveloper#731. I'm not really sure if the upgrade completely succeeded. Nevertheless just want to be on the save side with the annoyance of the new function to open definitions.

Running eclipse.buildId=4.21.0.I20210906-0500

When I press F3 - to open the definition I get the attached menu. I understand the menu to some extend - but to some extent not. To my understanding it should be only the second and/or the fourth entry. The rest seems superfluous. If there would be only one entry of that kind - just open this one.
Bildschirmfoto von 2021-11-09 09-45-07

Any ideas?

BTW: The keybinding seems as mess in the new Eclipse since a binding to CTRL-SHIFT-8 does NOT work with non English keyboards!!!

editing html tags automatically adds attributes to the closing html tag (which should never happen)

this has been happening to me for a while now, but specifically right now I'm on eclipse build 20220310-1457
with "Wild Web Developer HTML, CSS, JSON, Yaml, JavaScript, TypeScript, Node tools 0.10.13.202204031849"

I'm on a blank line in an html file, and i type the following :
<div></div>

What I really want is
<div class="foo"></div>
though so I use the arrow keys to move back behind to the letter "v" and I press "space" and start typing the word "class".

The editor starts adding that to the closing tag, i.e. I end up with
<div class="foo"></div class="foo">
then I hit ctrl-z to undo and the editor completely screws up. i.e. it seems to randomly delete some characters and makes a complete mess of the surrounding lines of code. Basically I have to close the file with out saving and re-open it to get back to a sane state.

Conflicting keybinding for Open Type

On Eclipse bugzilla the issue was: https://bugs.eclipse.org/bugs/show_bug.cgi?id=527785

A conflict occurred for CTRL+SHIFT+T:
Binding(CTRL+SHIFT+T,
ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace,
,
Category(org.eclipse.lsp4e.category,Language Servers,null,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@101eb529,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
Binding(CTRL+SHIFT+T,
ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type,
Open a type in a Java editor,
Category(org.eclipse.ui.category.navigate,Navigate,null,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@6a9b8f33,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)

Inserting completion shouldn't enable some LinkedModeUI if there is no need to

Some language servers (eg LemMinX), do send completion items with the following text edit: "textEdit":{"range":{"start":{"line":2,"character":2},"end":{"line":2,"character":2}},"newText":"\u003c!-- $1--\u003e"}}]}. The goal of $1 is to place the caret here.
However, for such simple cases, LSP4E does a bit too much and enables the LinkedModeUI which is overkill and may even reduce the comfort of user as it requires to type Enter once to close the LinkedModeUI and then to type Enter a second time to have a newline, when user expects Enter to directly insert a new line.
For simple case without actual link or "fields" ordering, only placing the caret is better.

TimeoutException on "Open Declaration" for slow Language Server

I am trying to integrate a 3rd party language server that unfortunately takes more then 500ms when responding to a "Open Declaration" request for for large projects.

So when putting the cursor on a method in the source code and hitting F3 to navigate to the declaration the UI shows:
image

And the following stacktrace is logged:

java.util.concurrent.TimeoutException
	at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1886)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2021)
	at org.eclipse.lsp4e.operations.declaration.OpenDeclarationHyperlinkDetector.detectHyperlinks(OpenDeclarationHyperlinkDetector.java:101)
	at org.eclipse.ui.texteditor.HyperlinkDetectorRegistry$HyperlinkDetectorDelegate.detectHyperlinks(HyperlinkDetectorRegistry.java:81)
	at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:289)
	at org.eclipse.jface.text.hyperlink.HyperlinkManager.openHyperlink(HyperlinkManager.java:585)
	at org.eclipse.jface.text.TextViewer.doOperation(TextViewer.java:3895)
	at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:1064)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1466)
	at org.eclipse.ui.texteditor.TextOperationAction.lambda$0(TextOperationAction.java:130)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
	at org.eclipse.ui.texteditor.TextOperationAction.run(TextOperationAction.java:130)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
	at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:121)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:319)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:253)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:584)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:653)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:443)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1270)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1042)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1067)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1094)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1090)
	at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1775)
	at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:5169)
	at org.eclipse.swt.widgets.Canvas.WM_KEYDOWN(Canvas.java:406)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4792)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4938)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3624)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1461)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1434)

I increased the timeout at

to 800ms and the error goes away.

Since I have no influence on the responsiveness of the language server, I wonder if it would be useful to make this timeout configurable, e.g. per language server implementation.

@mickaelistria Any opinions, ideas or suggestions?

Hovers don't use default Eclipse fonts & colours

This is a (markdown) hover displayed in Eclipse.
image

Here's a mouse-resized hover:
image

And as comparison, the same hover provider produces hovers that look like this in Sublime:
image

It would be great, if Eclipse would format the hover with the configured default fonts, so it would look more pleasant.

java.util.concurrent.TimeoutException from org.eclipse.lsp4e.operations.hover.LSPTextHover.getHoverRegion

I'm getting several java.util.concurrent.TimeoutException when editing a *.target file in Eclipse Target Editor.

  1. Open a *.target file
  2. Switch to "Source" tab
  3. Click into the Target Editor and edit the text

Eclipse Version: 2021-12 (4.22)
Build id: I20211124-1800
Mac 10.15.7
java.version=11.0.13

java.util.concurrent.TimeoutException
	at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1886)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2021)
	at org.eclipse.lsp4e.operations.hover.LSPTextHover.getHoverRegion(LSPTextHover.java:150)
	at org.eclipse.ui.internal.genericeditor.hover.CompositeTextHover.getHoverRegion(CompositeTextHover.java:101)
	at org.eclipse.jface.text.TextViewerHoverManager.computeInformation(TextViewerHoverManager.java:128)
	at org.eclipse.jface.text.AbstractInformationControlManager.doShowInformation(AbstractInformationControlManager.java:1101)
	at org.eclipse.jface.text.AbstractHoverInformationControlManager$MouseTracker.mouseHover(AbstractHoverInformationControlManager.java:511)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:212)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4243)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4060)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3632)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1154)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1045)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1467)

ResourceException(null)[380]: java.lang.Exception: The resource tree is locked for modifications.

i can reproduce it after restarting eclipse :

  1. file search for 'toolbarPath="org.eclipse.debug.ui.launchActionSet/debug"' - finds 4 entries in commiters workspace.
  2. then click on a found entry - opens /org.eclipse.debug.ui/plugin.xml
  3. click on another found entry
  4. close editor
  5. goto 2
    After a few repetitions i always get these 2 errors in the error log:
eclipse.buildId=4.23.0.I20220126-1800
java.version=17.0.2
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.committers.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.committers.product

org.eclipse.lsp4e
Error
Tue Feb 22 08:16:06 CET 2022
The resource tree is locked for modifications.

org.eclipse.core.internal.resources.ResourceException(null)[380]: java.lang.Exception: The resource tree is locked for modifications.
	at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
	at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
	at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:122)
	at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:2263)
	at org.eclipse.core.internal.resources.Marker.setAttribute(Marker.java:277)
	at org.eclipse.lsp4e.operations.codeactions.LSPCodeActionMarkerResolution.checkMarkerResoultion(LSPCodeActionMarkerResolution.java:151)
	at org.eclipse.lsp4e.operations.codeactions.LSPCodeActionMarkerResolution.getResolutions(LSPCodeActionMarkerResolution.java:85)
	at org.eclipse.ui.internal.ide.registry.MarkerHelpRegistry.getResolutions(MarkerHelpRegistry.java:394)
	at org.eclipse.pde.internal.ui.editor.text.PDEQuickAssistAssistant$PDEQuickAssistProcessor.canFix(PDEQuickAssistAssistant.java:178)
	at org.eclipse.jface.text.quickassist.QuickAssistAssistant.canFix(QuickAssistAssistant.java:130)
	at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.hasQuickFix(DefaultMarkerAnnotationAccess.java:439)
	at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.getImage(DefaultMarkerAnnotationAccess.java:393)
	at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.isPaintable(DefaultMarkerAnnotationAccess.java:300)
	at org.eclipse.ui.internal.editors.text.codemining.annotation.AnnotationCodeMiningFilter.isPaintable(AnnotationCodeMiningFilter.java:104)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
	at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:1002)
	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:280)
	at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:1002)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.findAny(ReferencePipeline.java:652)
	at org.eclipse.ui.internal.editors.text.codemining.annotation.AnnotationCodeMiningFilter.isEmpty(AnnotationCodeMiningFilter.java:77)
	at org.eclipse.ui.internal.editors.text.codemining.annotation.AnnotationCodeMiningProvider$AnnotationModelListener.modelChanged(AnnotationCodeMiningProvider.java:139)
	at org.eclipse.jface.text.source.AnnotationModel.fireModelChanged(AnnotationModel.java:591)
	at org.eclipse.jface.text.source.AnnotationModel$InternalModelListener.modelChanged(AnnotationModel.java:256)
	at org.eclipse.jface.text.source.AnnotationModel.fireModelChanged(AnnotationModel.java:591)
	at org.eclipse.jface.text.source.AnnotationModel.fireModelChanged(AnnotationModel.java:557)
	at org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel.update(ResourceMarkerAnnotationModel.java:113)
	at org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel$ResourceChangeListener.resourceChanged(ResourceMarkerAnnotationModel.java:57)
	at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:305)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:295)
	at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:158)
	at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:381)
	at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1503)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2327)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2333)
	at org.eclipse.lsp4e.operations.diagnostics.LSPDiagnosticsToMarkers.updateMarkers(LSPDiagnosticsToMarkers.java:156)
	at org.eclipse.lsp4e.operations.diagnostics.LSPDiagnosticsToMarkers.accept(LSPDiagnosticsToMarkers.java:81)
	at org.eclipse.lsp4e.LanguageClientImpl.publishDiagnostics(LanguageClientImpl.java:74)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$4(LanguageServerWrapper.java:260)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

eclipse.buildId=4.23.0.I20220126-1800
java.version=17.0.2
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.committers.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.committers.product

org.eclipse.lsp4e
Error
Tue Feb 22 08:16:32 CET 2022
org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.

java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$13(LanguageServerWrapper.java:425)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$4(LanguageServerWrapper.java:260)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

when opening a compare window i constantly get an exception

!MESSAGE An internal error occurred during: "LSP4E Linked Editing Highlight".
!STACK 0
java.lang.NullPointerException: Cannot enter synchronized block because the return value of "org.eclipse.lsp4e.operations.linkedediting.LSPLinkedEditingReconcilingStrategy.getLockObject(org.eclipse.jface.text.source.IAnnotationModel)" is null
at org.eclipse.lsp4e.operations.linkedediting.LSPLinkedEditingReconcilingStrategy.updateLinkedEditingAnnotations(LSPLinkedEditingReconcilingStrategy.java:230)
at org.eclipse.lsp4e.operations.linkedediting.LSPLinkedEditingReconcilingStrategy.lambda$2(LSPLinkedEditingReconcilingStrategy.java:196)
at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:187)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

I use WWD that has an LSP4E version: 0.13.7.202111051530

It happens with pretty much every file that is i guess related to a language server file (like ts files but also package.json files)

Add preferences for auto inserting close characters. (or be smarter)

I think this belongs to this project (and not WWD) but what is for the most time just annoying that if i type " that then i get also a second " or if i type ' or {

Many times i don't really want that i and have to delete it again (like if i make a if/else multi line and so on)

In the Java editor you have the auto close section in the preferences, but i can't find that for the editor that handles for example TS

Maybe we can also make it a bit more smarter because if you compare with the java editor if you do { then it will not right away insert a } but only later for example if i have this in the java editor:

if (true) statement;

then i can wrap statement easily in {} without java editor being to smart and adds one when i type { just after the if..
this is not possible in the typescript editor. and because of that i rather have it not do it at all.

Unclear "Internal error."

I see this in the error log:

java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$13(LanguageServerWrapper.java:425)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1728)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$4(LanguageServerWrapper.java:260)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

beside the error occurring, it gives no information about the cause of the "internal error" so its hard to ges whats the problem here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.