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

Bug 312376

Summary: Semantic Highlighting is lost in many cases
Product: [WebTools] WTP Source Editing Reporter: Zhongwei Zhao <zhaozhongwei>
Component: wst.sseAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: major    
Priority: P3 CC: nsand.dev
Version: 3.2Flags: thatnitind: review+
Target Milestone: 3.2 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 302038    
Attachments:
Description Flags
patch thatnitind: iplog+

Description Zhongwei Zhao CLA 2010-05-11 04:06:18 EDT
There is a bug about PDT(bug 302038).
After I debug deep into the code,I think we need to sort SemanticHighlightingPresenter.fPositions,because the php content is considered as a big region,and php highlighters consume the big region,then contribute positions,these positions are not sorted.I am not sure if this bug can be reproduced for other adapters,but I really can not fix it in pdt code.And our users complaint this very much.

Thanks very much!!
Comment 1 Zhongwei Zhao CLA 2010-05-11 04:07:06 EDT
Created attachment 167872 [details]
patch
Comment 2 Nick Sandonato CLA 2010-05-12 16:37:10 EDT
The patch looks good to me. It definitely seems like an oversight as computeIndexAtOffset requires that the positions be ordered by offset. I can see the trouble that this would cause regarding syntax highlighting, so I'll request this be in place for RC1. Marking Nitin for review.
Comment 3 Nick Sandonato CLA 2010-05-12 21:32:42 EDT
Code checked in for RC1.
Comment 4 Nick Sandonato CLA 2010-05-12 21:33:25 EDT
Thank you for your investigation and the patch!