| Summary: | [Compare]Word diff annotation is hidden in html files. | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | libing wang <libingw> |
| Component: | Client | Assignee: | libing wang <libingw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | mamacdon, Silenio_Quarti, susan |
| Version: | 0.4 | ||
| Target Milestone: | 0.5 M2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
libing wang
got a pathc from mark and tested it , fixed the issue.
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/htmlGrammar.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/htmlGrammar.js
index 2462ae5..23b817e 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/htmlGrammar.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/htmlGrammar.js
@@ -25,7 +25,6 @@ define("orion/editor/htmlGrammar", [], function() {
* @type Object
*/
return {
- "name": "HTML",
"scopeName": "source.html",
"uuid": "3B5C76FB-EBB5-D930-F40C-047D082CE99B",
"patterns": [
Took Mark's patch and fixed it. But I think we should have a smarter merging policy. Bug 376775. The HTML grammar applied a global stylerange (class "HTML" ) to every line of an .html file. These were overwriting the style ranges used to mark up word diffs. The patch in Comment 2 removes these global HTML ranges (which is reasonable, they were not used for anything). But we should still investigate what is going on in the merging of style ranges. I think that overlapping ranges could simply have their styleClasses merged rather than making 1 range clobber the other. Susan pointed out that she could see the issue. I tried both my localhost and orion.eclipse. 1.Reload all plugins. 2.Change an html file and go to status page. 3.Click on the html file and see the inline compare. In my local host I could see the word diff annotation but syntax is not highlighted. In orion.eclipse.org, I could see syntax highlighted but the word diff annotation was hidden. Weird... Talked to Silenio, the annotations created by compare widget have to always come after syntaxHighlighter creates all the range styles. It has to follow the syntaxHighlither.setup().then(create diff annotations) pattern. In html files, it just so happened that the syntax range style creation happens after diff annotations are created. I will use syntaxHighlither.setup().then pattern to completely fix this bug. Additional info: The previous version that made me think it was fixed: My word diff was not really a key word that got highlighted by html grammar, which occasionally did not have overlap. can be verified with commit page on 8dfd02c90be3d949edf546e6ab62ade79466e61e. There a lot of html changes. |