Closed BoykoAlex closed 8 months ago
@mickaelistria am I okay to merge this once @martinlippert approves?
@mickaelistria am I okay to merge this once @martinlippert approves?
Based on your previous comment @mickaelistria , I decided to merge this after successful testing on my side. Hope that is fine with you... :-)
It might wrap
org.eclipse.lsp4e.operations.codeactions.CodeActionCompletionProposal
which does not implement any completion extension interfaces. Theapply
method for such proposal needs only the document as a parameter. Now extension 1 and 2 have an alternative "apply" method that takes a number of different parameters (viewr, doc, offset, trigger chat etc.). Looking atorg.eclipse.jface.text.contentassist.CompletionProposalPopup
line 997 suggests that we need wrappers for each extension that has diferent apply logic. The issue is that code action comes asCodeActionCompletionProposal
which when wrapped suddenly implements extension 2 and applied differently. We could keepLSJavaProposal
only without the extensions and have its apply method with cases like inCompletionProposalPopup
line 997, i.e getting doc from the viewer though seems a bit risky as doc comes from the context rather than viewer in the proposal popup logic...