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 213003 - Wrong position of a comment after "Toggle Comment" action
Summary: Wrong position of a comment after "Toggle Comment" action
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure) (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2012-05-25 09:40 UTC by Ondrej Brejla
Modified: 2012-06-01 05:26 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 Ondrej Brejla 2012-05-25 09:40:04 UTC
It could be related with issue #211849

If I have this code:

<?php
^    echo "Foo";
?>

and I invoke a toggle comment, then expected result is:

<?php
//^    echo "Foo";
?>

but is:

<?php
    //^echo "Foo";
?>

Anyway, if I have code like this:

<?php
    //^echo "Foo";
?>

and I invoke a toggle comment, then expected result is:

<?php
    ^echo "Foo";
?>

So this second part works properly now :)

Not sure if that first part is an intent, is it? In Java it behaves as I describe here (both of parts)...afaik.

This issue is relevant for all CSL languages (I tried PHP and JavaScript).
Comment 1 Quality Engineering 2012-05-30 05:28:49 UTC
Integrated into 'main-golden', will be available in build *201205300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6a11adaf04f8
User: Ondrej Brejla <obrejla@netbeans.org>
Log: Fixing test according to issue #213003.
Comment 2 Svata Dedic 2012-05-30 08:36:42 UTC
Sorry, I've changed the commenting part, so that uncomment-comment leaves the text in the original shape, but it was a bad idea. The other MIME types (java, xml) behave as your test demands (place comment at the line start), so I'll change once again.

Sorry for the inconvenience.
Comment 3 Ondrej Brejla 2012-05-30 08:40:02 UTC
No problem, thanks for your effort :)
Comment 4 Svata Dedic 2012-05-30 11:17:07 UTC
Fixed in http://hg.netbeans.org/jet-main/rev/86dcc633ff8f
Comment 5 Quality Engineering 2012-06-01 05:26:35 UTC
Integrated into 'main-golden', will be available in build *201206010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/86dcc633ff8f
User: Svata Dedic <sdedic@netbeans.org>
Log: #213003: Reverting behaviour in comment, comment marks are always placed at the start of line.