Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] CompletionRequestor.accept

Exactly what I was hoping for! Since CompletionProposal is not subclassable by clients, it should also be easy to evolve (ie. add additional queries...) in an API-compatible way.

thanks, tom

This would allow clients to lazily ask questions to proposals as long as
the completion dialog remains open (expensive computations could be
performed on demand only).


The javadoc seems to suggest the behaviors that you describe, but the
validity of a CompletionProposal is longer.
The proposal object is valid as long as there is no change inside the
workspace.
In fact a CompletionProposal is valid during the call of
ICodeAssist#codeComplete(...) and just after.

Perhaps the javadoc can be improved.

"The proposal object passed is only valid for the duration of this call;
implementors must not hang on to these objects."

could be replaced by

"The proposal object passed is only valid for the duration of the
completion operation"



Back to the top