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 189561 - JSP Editor problems with Quotes on tag attributes
Summary: JSP Editor problems with Quotes on tag attributes
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 6.x
Hardware: PC Other
: P2 normal (vote)
Assignee: Anton Chechel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-16 15:39 UTC by mark_barnes
Modified: 2011-01-11 06:10 UTC (History)
1 user (show)

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 mark_barnes 2010-08-16 15:39:48 UTC
When I am coding tags, and I am entering attributes (e.g. bgcolor="red") I should be able to use either single-quotes or double-quotes around the attribute value, it shouldn't matter which, no?

One caveat to this is when you want to place Java in the attribute value.  Then, it's easiest to use single quotes, i.e. bgcolor='', around the value so you can code Java String Literals in the Java code, i.e. bgcolor='<%= error ? "red" : "blue" %>'

The problem here is, I'm typing along, and I get to the "bgcolor=", and the JSP editor sometimes automatically adds the double quotes.  So I wind up with this: bgcolor="'<%= error ? ...'".

Either the JSP Editor needs to stop trying to anticipate the quotes, or it needs to recognize that I have typed a single-quote right after it automatically inserted the double-quote, and switch to single-quotes or at least remove the double-quotes.

This is maddening because I'm usually several steps ahead, not paying close attention to what's on the screen, and I notice this has happened only later, and I have to stop my train of thought and go back and fix it.  The editor shouldn't be fighting me.
Comment 1 Anton Chechel 2011-01-10 15:18:42 UTC
fixed
http://hg.netbeans.org/web-main/rev/104bdbe703e0

Now editor will recognize whether you are typing single-quote inside empty double-quotes and then will transform it to single-quotes.
Comment 2 Quality Engineering 2011-01-11 06:10:26 UTC
Integrated into 'main-golden', will be available in build *201101110000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/104bdbe703e0
User: Anton Chechel <manowar@netbeans.org>
Log: issue #189561 has been fixed