lcbarcellos opened a new issue, #7806:
URL: https://github.com/apache/netbeans/issues/7806

   ### Apache NetBeans version
   
   Apache NetBeans 23
   
   ### What happened
   
   When I rename a typescript file using project window, completion stops 
working on that file.
   
   An unexpected exception shows up in notifications window like below (I've 
edited the file name):
   
   ```
   org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request 
textDocument/completion failed with message: The document should be opened for 
completion, file: /path/to/typescript/file.ts
        at 
org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
        at 
org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
        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:840)
   Caused: java.util.concurrent.ExecutionException
        at 
java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
        at 
java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
   [catch] at 
org.netbeans.modules.lsp.client.bindings.CompletionProviderImpl$2.query(CompletionProviderImpl.java:161)
        at 
org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:198)
        at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1403)
        at 
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
        at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
        at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2018)
   ```
   
   If I rename the file back to its original name, completion starts working 
again. Closing file and reopening it also works around the issue.
   
   ### Language / Project Type / NetBeans Component
   
   _No response_
   
   ### How to reproduce
   
   * Open a typescript file
   * check whether completion is working
   * Go to Projects Window (ctrl + 1)
   * Rename that file
   * Go back to file edit window. Completion should not work anymore
   * An exception should be present in Notifications window
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Ubuntu 22.04
   
   ### JDK
   
   OpenJDK Runtime Environment 17.0.12+7-Ubuntu-1ubuntu222.04
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   Every time.
   
   ### Are you willing to submit a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to