Replies: 1 comment 3 replies
-
I had to look through this myself because I thought it was definitely possible, but we're just missing a small piece. From your JDT-LS extension bundle That notification will travel from server to client. From your own VS Code extension vscode-java exposes its own api manager. See Lines 15 to 81 in b041ca4 I describe in #3102 (comment) how to access it, and there's quite a few extension that do it this way. Basically, the return value of activating the vscode-java extension is the API defined above.
The problem is, we don't expose an emitter for any notification. Just some specific ones we care about, like errors. We could open this up. If you wanted a hack that might work immediately : Instead of sending Our vscode-java extension will receive the telemetry event from the server and expose it to the API through : vscode-java/src/standardLanguageClient.ts Lines 337 to 338 in b041ca4 Then just :
I think this should work but haven't tried it myself. Otherwise, we should probably create an api event emitter for generic notifications. |
Beta Was this translation helpful? Give feedback.
-
Here is my use case:
I have a JDTLS extension bundle jar, which gets plugged into JDTLS by the RedHat Java extension during JDTL initialization.
I now want to send an event from that extension via JDTLS back to VS Code. In VS Code I want to receive and process the event by some other extension, i.e. not within the RedHat Java extension.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions