Community
Participate
Working Groups
If we create a template with two protected areas with the same id, the parser should create error markers to inform the user generation cannot be run as is.
Created attachment 173428 [details] Patch With this patch, if two (or more) protected areas are sharing the same identifier a compilation error will be thrown during the compilation.
Created attachment 173538 [details] Patch v2 Previously the patch would look for conflicts in the name of all protected areas within a module, now it is limited to conflicts within a template. And some unit tests have been modified in order to suppress some conflicts.
Created attachment 173653 [details] Patch v3 the previous patch was for https://bugs.eclipse.org/bugs/show_bug.cgi?id=252169
line 729 shouldn't be "while (!(object instanceof Template)) {" but "while (!(object instanceof Template) && !(object instanceof FileBlock)) {" As the true "scope" within wich protected area markers must be unique are the files. Could you make the necessary modifications so as to avoid the ClassCast that would arise below with such a change?
Created attachment 173658 [details] Patch v4 Improved version of the last patch.
Created attachment 173660 [details] Patch v5 This patch is an improved version of the last one. With the last one, if a protected area was buried in [for] and [if] it could skip some conflict with other protected areas with the same name.
Thanks for the fix, this has been committed on HEAD. However, the "parsing error" that is logged should really be a warning. I've opened bug 321308 for this.