Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fix AbstractJavaCompletionProposal for persistent content assist #1644

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -800,13 +800,11 @@ public boolean validate(IDocument document, int offset, DocumentEvent event) {
if (!isOffsetValid(offset))
return fIsValidated= false;

fIsValidated= isValidPrefix(getPrefix(document, offset));
String prefix = getPrefix(document, offset);
fIsValidated= isValidPrefix(prefix);

if (fIsValidated && event != null) {
// adapt replacement range to document change
int delta= (event.fText == null ? 0 : event.fText.length()) - event.fLength;
final int newLength= Math.max(getReplacementLength() + delta, 0);
setReplacementLength(newLength);
setReplacementLength(prefix.length());
}

return fIsValidated;
Expand Down
Loading