Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332295 - [parser] Tags are not properly handled inside comment
Summary: [parser] Tags are not properly handled inside comment
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 3.2.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Sarika Sinha CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-10 06:28 EST by Sarika Sinha CLA
Modified: 2011-01-07 13:26 EST (History)
2 users (show)

See Also:
nsand.dev: review+


Attachments
Patc identifies the custom tags inside comment and parses them inside a container (6.46 KB, patch)
2010-12-10 06:32 EST, Sarika Sinha CLA
no flags Details | Diff
Patch to identify the custom tag inside comments with fixed junit test (9.90 KB, patch)
2010-12-14 13:07 EST, Sarika Sinha CLA
no flags Details | Diff
Patch to identify the custom tags inside comment with junit changes and file reopening problem resolved (9.93 KB, patch)
2010-12-15 23:56 EST, Sarika Sinha CLA
no flags Details | Diff
Patch to identify the custom tags inside comment with junit changes and file reopening/String Empty problem resolved (9.94 KB, patch)
2010-12-16 02:14 EST, Sarika Sinha CLA
nsand.dev: iplog+
Details | Diff
Patch to identify the custom tags inside/outside comment with junit changes and file reopening problem resolved (11.01 KB, patch)
2011-01-07 02:08 EST, Sarika Sinha CLA
nsand.dev: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sarika Sinha CLA 2010-12-10 06:28:24 EST
Build Identifier: M20101029-0800

If there is a tag inside comment, it gives error for comment not closed or the the regions are not properly constructed inside comments.

<!-- <meta> -->

gives error for comment not being closed.

Reproducible: Always
Comment 1 Sarika Sinha CLA 2010-12-10 06:32:18 EST
Created attachment 184939 [details]
Patc identifies the custom tags inside comment and parses them inside a container

This patch adds the logic for parsing the custom tags inside the comment as a container. Currently one junit is failing, I am working on correcting it.
Comment 2 Sarika Sinha CLA 2010-12-14 13:07:50 EST
Created attachment 185153 [details]
Patch to identify the custom tag inside comments with fixed junit test
Comment 3 Nick Sandonato CLA 2010-12-15 12:01:26 EST
Hi Sarika,

Thanks for the patch. I'm having a problem though where when I reopen these files with <!-- <meta> --> in them, I still see the "Comment not closed." message.

Also, SSE compiles against Java 1.4.2, which means that we can't make use of String#isEmpty(), which is used in your patch in the JSPTokenizer. We'll need to use String#length() == 0.
Comment 4 Sarika Sinha CLA 2010-12-15 23:56:39 EST
Created attachment 185288 [details]
Patch to identify the custom tags inside comment with junit changes and file reopening problem resolved
Comment 5 Sarika Sinha CLA 2010-12-16 02:14:49 EST
Created attachment 185294 [details]
Patch to identify the custom tags inside comment with junit changes and file reopening/String Empty problem resolved
Comment 6 Nick Sandonato CLA 2011-01-05 15:39:33 EST
Code checked in.
Comment 7 Nick Sandonato CLA 2011-01-05 15:54:40 EST
I actually backed out these changes, Sarika. I noticed, for example, if I had

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

in a document under <head> and I used Ctrl+Shift+C to comment out the entire tag, I'd still get "Comment not closed" errors.

Looks like there may be still something small missing.
Comment 8 Sarika Sinha CLA 2011-01-07 02:08:48 EST
Created attachment 186248 [details]
Patch to identify the custom tags inside/outside comment with junit changes and file reopening problem resolved

Hi Nick,
Currently the Custom tag after the comment closure was also parsed, I have added the check not to do so.
Comment 9 Nick Sandonato CLA 2011-01-07 13:26:24 EST
Code checked in. Thanks for your persistence.