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

Bug 348664

Summary: [client] [textmatestyler] nested include rules don't work
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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.