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

Bug 378193

Summary: Highlighter should have API for ignoring async plugin stylers
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: libingw
Version: 0.5   
Target Milestone: 0.5 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2012-05-01 16:19:40 EDT
1. Open the git-commit page for some commit that has a change to a .html file. Observe the compare viewer for the .html file.
2. Install the codemirror plugin
3. Reload the git-commit page
4. The compare viewer loses syntax highlighting

The problem here is that the Codemirror plugin declares it can handle text/html files, and highlighter.js (which the compare viewer uses to look up the appropriate styler) accordingly delegates the styling for the compare viewer to it.

However this fails because the compare viewers do not broadcast their text model events to the plugin. In general the plugin will not be able to style compare viewers, because there can be many compare viewers on a page but only a single codemirror plugin instance.

The real fix is to address bug 370286, but in the interim we can provide a flag to SyntaxHighlighter telling it to ignore asynchronous styling providers. The compare viewer can then pass this flag, and only grammar-based providers (which don't rely on async communication) will be used.