Community
Participate
Working Groups
I20050920 We should provide a hook for completing inside string literals. Clients like APT could use this hook to propose valid strings in their context.
Created attachment 27813 [details] incomplete patch to allow string completion This patch only add internal support for string completion. There is no new completion proposal and no additionnal information inside completion context.
Fixed and test added. CompletionContextTests#test0117() -> test0127() I flag this bug as fixed but the new behavior cannot be used as long as bug 111475 isn't fixed. When completion is inside a string literal CompletionContext#getTokenKind() will return CompletionContext#TOKEN_KIND_STRING_LIRERAL. The method CompletionContext#getToken() will return the string literal including the quotes. The starting quote will be always present but not the leading quote. class X { String s = "aaa| } The token range also include the quotes.
Correction: CompletionContext#getToken() doesn't include the quotes.
Verified for 3.2 M4 using build I20051212-0010