Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312914 - [content assist]content assist some times fails to insert the selected value
Summary: [content assist]content assist some times fails to insert the selected value
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-14 10:47 EDT by Jim Zhang CLA
Modified: 2010-12-14 15:32 EST (History)
2 users (show)

See Also:
thatnitind: review+


Attachments
Patch to stop inserting pair for double quote if content assist popup is active (3.65 KB, patch)
2010-10-13 10:57 EDT, Sarika Sinha CLA
no flags Details | Diff
patch (5.68 KB, patch)
2010-10-26 10:44 EDT, Nick Sandonato CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Zhang CLA 2010-05-14 10:47:43 EDT
Build Identifier: WTP 3.2 M7

This is a rather strange behavior. What happens is when the following circumstances are met, hitting "Enter" at the selected content assist proposal does not get it to be inserted but instead the cursor jumps to the next stop as indicated by the light-green "next caret position" indicator:
1. i type <div algin="", the cursor is automatically placed b/w the quotes, and the content assist is automatically invoked
2. you see the "next caret stop" indicator following the closing quote
3. you make your pick of the content assist proposal using arrow keys
4. you hit enter

This may need to be executed a few times to reproduce the behavior, but I've seen it often enough lately with M7 but not with M6 or earlier.

Reproducible: Sometimes
Comment 1 Sarika Sinha CLA 2010-10-11 14:25:34 EDT
Was able to consistently reproduce this problem. This happens only when the content assist option is selected the first time after <div align="" .If we again move the arrow key and select it works. It works fine if we select the content assist suggestion after typing <div align=
Comment 2 Sarika Sinha CLA 2010-10-13 10:57:06 EDT
Created attachment 180775 [details]
Patch to stop inserting pair for double quote if content assist popup is active

First Enter selection does not work from content assistant popup because of  smart insertion of paired double quote. Attached patch prevents the automatic double quote pair insertion only if content assist popup is active.
Comment 3 Nick Sandonato CLA 2010-10-26 10:43:31 EDT
Sarika, I'd like to expose as little protected stuff as possible. ISourceViewerExtension4 provides the capability of getting the content assist facade which will tell us when a content assist session starts and ends. Unfortunately, SourceViewer marks this method as final. It may also be advantageous to consider utilizing super.configure() a bit.
Comment 4 Nick Sandonato CLA 2010-10-26 10:44:00 EDT
Created attachment 181735 [details]
patch
Comment 5 Nick Sandonato CLA 2010-12-14 15:32:26 EST
Thanks for the review. Checked in.