sdedic opened a new pull request, #7401:
URL: https://github.com/apache/netbeans/pull/7401

   During implementation of new features, for example project dependency 
modification or some edits, we increasingly sarted to use `WorkspaceEdit` from 
the LSP APis, so that the code would apply for both NetBeans IDE and NetBeans 
running as a NBLS server. Sometimes the action code needs to ensure the changes 
are applied and possibly saved - but that needs to be perfomed in different 
ways, depending on whether NB runs as an IDE or as NBLS.
   
   So far, the only possibility was to make a command that returns a 
WorkspaceEdit to the LSP client (or to a wrapper code in NB IDE) and the client 
(or wrapper) applies the edit. Sadly ;) there is still no standard 
implementation how to apply the WorkspaceEdit in the NB code, so the IDE 
implementation would need to be done manually.
   
   This PR introduces an API to apply the changes + SPI that is implemented for 
NetBeans IDE (in project.dependencies module) and for LSP server (implemented 
in nbcode/integrations module). The IDE implementation uses `EditorCookie` and 
Document to make textual changes, and `Savable` to perform the save operation. 
   
   The LSP protocol implementation uses standard `applyWorkspaceEdit` call to 
perform changes and our custom `requestDocumentSave` to save resources.
   
   Basic tests for IDE and LSP parts included.


-- 
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