| Summary: | Implementing the Syntax Highlighting for xquery for Orion Editor | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Hongying Zhang <zhysophie2014> | ||||||
| Component: | Editor | Assignee: | Hongying Zhang <zhysophie2014> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Grant Gayed <grant_gayed> | ||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | CC: | grant_gayed, ken_walker | ||||||
| Version: | 6.0 | ||||||||
| Target Milestone: | 6.0 RC1 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Committed here: https://github.com/hongying1124/orion.client/pull/1 Created attachment 243146 [details] first patch feedback for XQuery Hi Sophie, here's my first feedback. The attached patch contains changes that you can apply to your stream. These changes are small enough that it was easier for me to just do them rather than describe each and ask you to do them. Summary: - many of the changes just involved renaming "xq" to "xquery" in id's and filenames - the content type is application/xquery, and is now for extensions ["xq", "xqy", "xquery"] - the xquery plugin had to be registered in the main defaults.pref to be found for "normal" orion builds (you only had in the orionnode defaults.pref) - I changed the variables style name to "variable.other.xquery", and made the accompanying change in textStyler.css, because our style naming follows the TextMate hierarchical naming approach (see the bottom of http://manual.macromates.com/en/language_grammars ) Once you have applied these changes then there are two more that I would like you to make on your end: 1. The keywords list is incomplete. You can figure out the full set of keywords by going through the EBNF in the "A XQuery 3.0 Grammar" section at http://www.w3.org/TR/2014/REC-xquery-30-20140408/ . Also, please sort them alphabetically to ensure that keywords that are subsets of other keywords never preceed them (eg.- "elseif" must come before "else" to ensure that an occurrence of "elseif" gets fully matched). 2. I get the impression that strings in XQuery are multi-line, so you cannot reuse "orion.lib#string_doubleQuote" and "orion.lib#string_singleQuote" for these. You'll need a pattern with separate begin/end matches so that the end match can occur on a subsequent line. Once you have applied the attached patch and made the above two changes in your branch then add a comment here and it should be pretty much ready. Hi Grant, I just fixed the bugs for xquery :) Here's my commit, hope you like it: https://github.com/hongying1124/orion.client/pull/3 Ok, I found out what the problem was, the commits have been pushed: 1. Your commit on GitHub had the Erlang stuff mixed in with the XQuery, so I removed the Erlang parts before pushing. Commit: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=305db2db7788b5140a4982aa84702753bcfee77a . 2. My follow-up commit: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=eefa56faeab64b02443f32110569a9ac147aa622 . Thanks for your contribution! Closing report as FIXED > 20140602. |
Created attachment 242642 [details] Syntax highlighting for xQuery (*.xq) Implementing the syntax highlighting for xQuery for Orion Editor