| Summary: | EOL Editor Supported Comments | ||
|---|---|---|---|
| Product: | [Modeling] Epsilon | Reporter: | Horacio Hoyos <arcanefoam> |
| Component: | Core | Assignee: | Antonio Garcia-Dominguez <agarcdomi> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | agarcdomi, dkolovos |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | interim | ||
|
Description
Horacio Hoyos
Thanks for your report! I'll have a look today at the bug. This is a follow up to this thread in the forum: http://www.eclipse.org/forums/index.php/t/209207/ I think I have fixed the problem in SVN r1422. The fix itself is trivial, but finding the part that required fixing took a while. The partition scanner we use to divide the program into comment and non-comment sections has two JFace MultiLineRules for the -* *- and /* */ comments. Normally, these rules look for their start delimiter and then for their end delimiter. In this case, the rules do not conflict, as they start with different characters. However, there's one case in which PatternRule#doEvaluate skips looking for the start sequence: when "resuming" the partition scanning. This happens when we insert a newline inside a comment, for example. PatternRule sees the * in *- and mistakes it for the * in */. Since breakOnEOF is set to true for that rule, it plows through the rest of the file and accepts EOF as an end sequence. I have fixed this bug by setting breakOnEOF to false, so it will properly reject the */ rule and go to the *- rule. Fixed in 0.9.1 |