Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348664 - [client] [textmatestyler] nested include rules don't work
Summary: [client] [textmatestyler] nested include rules don't work
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Mark Macdonald CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-07 19:21 EDT by Mark Macdonald CLA
Modified: 2011-09-01 11:42 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Macdonald CLA 2011-06-07 19:21:25 EDT
TextMateStyler only behaves correctly when a single level of "include" is used in a grammar. If one rule includes a rule that includes a 3rd rule, we fail.

For example, this works:
{  "patterns": [
       { "include": "#foo" }
    ],
   "repository": {
       "foo": {
           "match": "\\d+"
       }
   }
}

But not this (throws an error):

{  "patterns": [
       { "include": "#foo" }
    ],
   "repository": {
       "foo": { "include": "#bar" },
       "bar": {
           "match": "\\d+"
       }
   }
}

This is an important authoring pattern to support.
Comment 1 Mark Macdonald CLA 2011-06-08 18:08:14 EDT
Fixed in 
http://git.eclipse.org/c/e4/org.eclipse.orion.client.git/commit/?id=ba2edf78c27f7ba8ebce4a375dc6d4f5b6d4683c

I got Simon to review the patch.