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

Bug 292471

Summary: [parser] XMLSourceParser#regionMatches should compensate for offset
Product: [WebTools] WTP Source Editing Reporter: Ian Tewksbury <itewksbu>
Component: wst.xmlAssignee: wst.xml <wst.xml-inbox>
Status: CLOSED DUPLICATE QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: nsand.dev
Version: 3.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix Patch none

Description Ian Tewksbury CLA 2009-10-15 17:42:59 EDT
This fix is also needed in 3.2 stream.  Patch to follow.

+++ This bug was initially created as a clone of Bug #292469 +++

Currently the regionMatches and regionmatchesIgnoreCase functions do not
compensate for the offset the sourceparser parsed from (when not parsing the
entire document).  The getText function already compinsates for this.  This
means that if someone passes in information based off a region created by the
source parser where fOffset is 0 the regionMatches* functions are looking in
the wrong place (off by fOffset) for a match.

Patch to follow.
Comment 1 Ian Tewksbury CLA 2009-10-15 17:46:29 EDT
Created attachment 149689 [details]
Fix Patch

Described patch for 3.2 stream.
Comment 2 Nick Sandonato CLA 2009-10-21 17:23:12 EDT
Looks like I missed the original clone of Bug #292469 and resolved Bug #292779 instead. Resolving as a dupe.

*** This bug has been marked as a duplicate of bug 292779 ***