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 167300 - Commenting code by ctrl+/ doesn't match current language.
Summary: Commenting code by ctrl+/ doesn't match current language.
Alias: None
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure) (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker with 1 vote (vote)
Assignee: Vitezslav Stejskal
: 125925 169571 175147 (view as bug list)
Depends on:
Reported: 2009-06-18 12:38 UTC by szymon_73
Modified: 2010-02-16 21:49 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description szymon_73 2009-06-18 12:38:35 UTC
Pressing ctrl+/ (comment line) in php tag in .html file makes wrong comment symbol. 
Example code:
	echo "test";

Pressing ctrl+/ on the echo line results in:
	<!--echo $response->body;-->?>
should be: 
	//echo $response->body;

The same happens in .php file, when commenting html tags:
	echo "test";
<br />

Results in:
//<br />
Should be:
<!--<br />-->

As we comment code very frequently, I think this issue needs higher priority.

IDE about box info:
Product Version: NetBeans IDE Dev (Build 200906081401)
Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02
System: Windows XP version 5.1 running on x86; Cp1250; pl_PL (nb)
Comment 1 Tomasz Slota 2009-06-23 10:20:26 UTC
mfukala and I agreed that handling the "comment line" action for embedded languages should be supported by CSL - reassigning
Comment 2 Marek Fukala 2009-06-23 10:34:40 UTC
The current implemenetation of the toggle comment is context (language on/in caret position/selection) unsensitive, the
original goal was to have at least some toggle comment support for block comment only languages. Making it language
sensitive is a trivial task, but solving all the corner cases (c/u of more languages together) not.
Comment 3 Petr Jiricka 2009-09-09 16:29:52 UTC
*** Issue 169571 has been marked as a duplicate of this issue. ***
Comment 4 Dusan Balek 2009-10-22 07:35:27 UTC
*** Issue 175147 has been marked as a duplicate of this issue. ***
Comment 5 Erno Mononen 2009-10-27 16:53:18 UTC
*** Issue 125925 has been marked as a duplicate of this issue. ***
Comment 6 Vitezslav Stejskal 2010-02-15 08:57:11 UTC
Comment 7 Marek Fukala 2010-02-15 09:29:15 UTC
God bless Vita!!! Thanks!!!
Comment 8 Quality Engineering 2010-02-16 21:49:44 UTC
Integrated into 'main-golden', will be available in build *201002170200* on (upload may still be in progress)
User: Vita Stejskal <>
Log: #167300: improving CSL's toggle comment action to work with embedded languages