Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361260 - [textmatestyler] Styler fails on regex
Summary: [textmatestyler] Styler fails on regex
Status: RESOLVED WONTFIX
Alias: None
Product: Orion
Classification: ECD
Component: Editor (show other bugs)
Version: 0.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Mark Macdonald CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-18 10:26 EDT by Mark Macdonald CLA
Modified: 2015-05-05 14:48 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-10-18 10:26:56 EDT
1. Try running the styler with TextMate's java grammar
2. You'll get an error:
> Uncaught TypeError: Cannot read property '_typedRule' of undefined   textMateStyler.js:1066

The failure is from the rule "storage.type.java" which matches
 \b(?:[a-z]\w*(\.))*[A-Z]+\w*\b

We seem to be turning it into
 (\b)(?:([a-z]\(w*)(\.))*)([A-Z]+\w*\b)

Note how \w* becomes \(w*) which unbalances the expression and causes the error.
Also, it doesn't make sense for a zero-width assertion to be inside capturing parentheses, but that's a minor issue.
Comment 1 John Arthorne CLA 2015-05-05 14:48:18 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html