Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319396

Summary: Not consuming closing quote after inserting attribute with content assist
Product: [WebTools] WTP Source Editing Reporter: Ian Tewksbury <itewksbu>
Component: wst.htmlAssignee: wst.html <wst.html-inbox>
Status: NEW --- QA Contact: Nick Sandonato <nsand.dev>
Severity: enhancement    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Ian Tewksbury CLA 2010-07-09 10:15:52 EDT
STEPS:
1. create an html document
2. add an attribute to one of the elements

RESULTS:
1. the opening and closing quotes are automatically added for you and your cursor is nicely placed between them, thats good

2. if you are at the end of typing your attribute value and your cursor is just before the closing quote and you type quote another quote is added rather then consuming the existing one.

This lack of consuming makes the flow of adding multiple attributes annoying because you have to manually skip over (or more likely delete the extra quote you just added then skip over) the closing quote.

This should be rather trivial and involve updating the exit strategy for the attribute suggestions.  Examples of such exit strategies already exist for the character paring code and could be used as an example.
Comment 1 Rakesh CLA 2011-02-04 03:40:10 EST
Created attachment 188297 [details]
patch
Comment 2 Nick Sandonato CLA 2011-04-13 10:55:19 EDT
Comment on attachment 188297 [details]
patch

I actually think Ian's suggestion deals with content assist adding attr="". When typing a " within the quotes the last isn't consumed. The markup content assist proposals unfortunately do not set up a linked editing mode.