Community
Participate
Working Groups
Seen during writing of a fix for bug 128276. Currently: - CompletionProposal#getCompletionLocation() return the position of the character just before the completion point and is not supposed to be negative. Unlike documented in the Javadoc this is not equals to the offset parameter of ICodeAssist#codeComplete(). - CompletionProposal#getTokenEnd() return the position of the character just after the last character of the completion token. - CompletionContext#getOffset() return the position of the character just after the completion point. -CompletionContext#getTokenEnd() return the position of the last character of the completion token. Unlike documented in the Javadoc getTokenEnd() is not equals to getTokenStart() when completion token is empty. So some behaviors don't respect the API and CompletionContext and CompletionProposal don't have consistant behaviors.
A workaround for the bug of negative positions has been added in the fix for bug 128276. This workaround must be removed when this bug will be fixed.
A fix for this bug require to modify some API behaviors. getCompletionLocation() could return the position of the character just after the completion point. It is too late in 3.2 to change these behaviors because it could break clients. So i will modify Javadoc to describe the real behavior of some of these API and defer the correction of this problem post 3.2.
I updated the javadoc of CompletionProposal#getCompletionLocation() and CompletionContext#getTokenEnd() (see bug 132651) Post 3.2.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.