Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312376 - Semantic Highlighting is lost in many cases
Summary: Semantic Highlighting is lost in many cases
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 302038
  Show dependency tree
 
Reported: 2010-05-11 04:06 EDT by Zhongwei Zhao CLA
Modified: 2010-05-12 21:33 EDT (History)
1 user (show)

See Also:
thatnitind: review+


Attachments
patch (1.26 KB, patch)
2010-05-11 04:07 EDT, Zhongwei Zhao CLA
thatnitind: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!