Open zulus opened 1 year ago
A new method computeCompletionProposals
with this third parameter defaulting to the old one sounds good to me. I don't think we can change the existing method. Eldest of PDT please send your PR to the humble people of platform. :-)
A new method
computeCompletionProposals
with this third parameter defaulting to the old one sounds good to me. I don't think we can change the existing method. Eldest of PDT please send your PR to the humble people of platform. :-)
Via IContentAssistProcessorExtension2 ?
Are there chances that more arguments get added in the future? If so, it may be good to anticipate it now and introduce a parameter object or record ContentAssistRequest
encapsulating viewer, offset, event... and everything relevant and make this object @noextends
. So in the future, instead of adding a new interface or a new API to implement with new signatures, we can just add entries to this object.
@mickaelistria I thin this is a very good idea, the new method can then simply be a delegate
default ICompletionProposal[] computeCompletionProposals(ContentAssistRequest request) {
return computeCompletionProposals(request.getTextViewer(), request.getOffset();
}
also one might add some helper methods to ContentAssistRequest
like getting the line number and alike... such request might even make it possible to store values from one assistance processor to another or between invocations...
@zulus are you still working on this issue?
Hi, any progress here?
During work on one of WWD bug (eclipse-wildwebdeveloper/wildwebdeveloper#1316) I realized that due Eclipse limitation is not possible to fix LSPE in clean way (eclipse/lsp4e#799)
For now IContentAssistProcessor.computeCompletionProposals is completely blind, and don't know if it was invoked by AutoAssistListener (triggered by char and some delay) or on demand (for example via ctrl/cmd+space)
Would by nice to have third parameter in #computeCompletionProposals, int/enum mode, or separate optional method computeAutoCompletionProposals (with default to computeCompletionProposals) that will allow introduce some differences depending to mode
To implement this, the eldest of the PDT :-) introduces own, extremely ugly, PHPContentAssistant
If you agree I could take care of this, but tell me which way you prefer ;-)