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.
Status: RESOLVED FIXED
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
URL:
Keywords:
: 125925 169571 175147 (view as bug list)
Depends on:
Blocks:
 
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:


Attachments

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:
<div>
<?php
	echo "test";
?>
</div>

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


The same happens in .php file, when commenting html tags:
<?php
	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
http://hg.netbeans.org/jet-main/rev/9f96608c6035
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 http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9f96608c6035
User: Vita Stejskal <vstejskal@netbeans.org>
Log: #167300: improving CSL's toggle comment action to work with embedded languages