Bug 111475 - [content assist] code assist needs to be enabled inside Java string partition
Summary: [content assist] code assist needs to be enabled inside Java string partition
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.2 M5   Edit
Assignee: Tom Hofmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 110188
  Show dependency tree
 
Reported: 2005-10-04 12:03 EDT by David Audel CLA
Modified: 2006-01-06 04:01 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2005-10-04 12:03:37 EDT
Java code assist needs to be enabled inside Java string partition to fix bug 110188.

Currently the jdtcore completion engine is never called when the cursor is
inside a string literal.

class X {
  String s = "aa|aa"; // cursor is at | location
}
Comment 1 Dani Megert CLA 2005-10-04 12:39:09 EDT
David, will JDT Core to provide completions? If not, we will leave it to clients
like APT to register their javaCompletionProposalComputer for the string partition.
Comment 2 David Audel CLA 2005-10-04 13:02:09 EDT
JDT Core will propose completion inside string literal (bug 110190).

But even if JDT Core don't propose completion inside string literal, JDT Core
compute java completion context (CompletionContext). Currently if JDT Core is
not enabled for string partition, JDT Core cannot compute the context.
Comment 3 Dani Megert CLA 2005-10-05 03:38:07 EDT
>Currently if JDT Core is not enabled for string partition, JDT Core cannot
>compute the context.
I see. I had a different life-cycle model in mind where the context is decoupled
from code assist but the current solution is fine as well. We should make sure
that the context computation for code assist inside strings is lazy and also
check the performance impact for 1.4 code (maybe disable for 1.4).
Comment 4 David Audel CLA 2005-11-10 07:56:42 EST
I released my fix for bug 110188 but as long as this one isn't fixed the
behavior added by my fix cannot be used.
Comment 5 Tom Hofmann CLA 2006-01-06 04:00:17 EST
finally fixed > 20060106
Comment 6 Tom Hofmann CLA 2006-01-06 04:01:15 EST
finally fixed > 20060106

(In reply to comment #3)
> We should [...]
> check the performance impact for 1.4 code (maybe disable for 1.4).

Performance impact is small. Additionally, content assist within string partitions is not as crucial as normal (ie. java) content assist (we currently only have spelling and word completion within string literals).