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

Bug 331687

Summary: Proposal replacement length not properly adjusted
Product: [WebTools] WTP Source Editing Reporter: Nick Sandonato <nsand.dev>
Component: wst.sseAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 Flags: thatnitind: review+
Version: 3.2.2   
Target Milestone: 3.2.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Nick Sandonato CLA 2010-12-02 11:03:25 EST
In particular this seems to happen when the original replacement length of the proposal is greater than 0. To see this happen, in an HTML file start with:

<div dir="|"

At the |, invoke content assist and type 'l', then pick "ltr" from the proposals. At this point, you'll end up with <div dir="ltr""
Comment 1 Nick Sandonato CLA 2010-12-02 11:08:38 EST
Created attachment 184364 [details]
patch

Simplify the logic in the validate() method to adjust the replacement length by the document event changes.
Comment 2 Nick Sandonato CLA 2010-12-03 14:14:53 EST
Code changes checked in.