This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 57546 - Mutant fold is created for <% --%>
Summary: Mutant fold is created for <% --%>
Status: CLOSED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P4 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-06 14:28 UTC by Jiri Kovalsky
Modified: 2006-03-24 12:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2005-04-06 14:28:39 UTC
Development build #200504060831 of NetBeans 4.1
Windows XP, JDK 1.5.0_03 build #06

Description:
============
There is a fold created for scriplet opening tag and comment closing tag. Is
this intentional ? If so it's incorrectly identified if -- is added to scriplet
tag. Besides, CTRL + NumPad - does not work in such case.

Steps to reproduce:
===================
1. Create new sample web application project.
2. Type <% at line 14 in index.jsp file and wait 2 seconds.
3. Note that new fold was identified for lines 14 - 27.
4. Add -- to scriplet opening tag so that you have <%-- at line 14.
5. Invoke "View|Code Folds|Collapse Fold" from main menu.
6. Note the fold is identified as scriplet fold although it is comments section.
7. Invoke "View|Code Folds|Expand Fold" from main menu.
8. Nothing happens. Click [+] icon to expand it.
9. Note that there are two [-] fold icons (lines 14, 24) for one --%> end tag at
line 27.
Comment 1 Marek Fukala 2005-04-19 09:56:09 UTC
I need to improve the code folds update mechanism to distinguish fold types when
rebuilding the folds hierarchy. Now the fold types are not checked - only
boundaries are checked - so if an existing fold is replaced by a fold of an
another type on the with the some boundaries (exactly the described problem) the
folds still remains of the old type.
Comment 2 Marek Fukala 2005-10-10 15:01:05 UTC
Already fixed by JSP folding reimplementation (the performance issue fix).
Comment 3 Jiri Kovalsky 2005-11-04 13:27:04 UTC
The fold type still remains incorrect in step 6. Reopening in development build
#200511031900 of NetBeans 5.0. Please fix the remainder.
Comment 4 Marek Fukala 2005-11-04 13:49:37 UTC
fixed

Checking in
web/jspsyntax/src/org/netbeans/modules/web/core/syntax/folding/JspFoldManager.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/folding/JspFoldManager.java,v
 <--  JspFoldManager.java
new revision: 1.39; previous revision: 1.38
done
Checking in
html/editor/src/org/netbeans/modules/html/editor/folding/HTMLFoldManager.java;
/cvs/html/editor/src/org/netbeans/modules/html/editor/folding/HTMLFoldManager.java,v
 <--  HTMLFoldManager.java
new revision: 1.23; previous revision: 1.22
done
Comment 5 Jiri Kovalsky 2005-12-20 09:58:23 UTC
Verified in development build #200512192030 of NetBeans 5.0.