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 143120 - Diferent comment types
Summary: Diferent comment types
Status: RESOLVED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-07 01:44 UTC by khaoz
Modified: 2012-07-12 13:22 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description khaoz 2008-08-07 01:44:25 UTC
Kate, a editor for kde, does the following trick with comments:

<html>
    <body>
        <?php echo 'teste'; ?>
    </body>
</html>

If you select from <html> to </html> a <!-- --> style comment is used and <?php ?> is ignored. Then you need to select
inside <?php ?> to use the // style comment.

I don't know if it's possible to implement this in netbeans. Maybe more inteligent, using diferente style comments for
different languages in selected text.
Comment 1 khaoz 2008-08-14 22:37:28 UTC
Another example is the following code:

              <th colspan="7">
                <?php echo __('filters') ?>
                <?php if($_COOKIE["help"]=="dcontexto"): ?>
                <a class="dcontexto">
                  <img src="/sfTcheGeneratorPlugin/images/help.png"/>
                  <span>
                    <?php echo __('This is the search form of') ?> filial,
                    <?php echo __('for field information it locates the hand of mouse on the name of the field.') ?>
                  </span>
                </a>
                <?php endif; ?>
                <?php if ($sf_flash->has('delete')): ?>
                <h4 class="form-error">
                  <?php echo __($sf_flash->get('delete')) ?>
                </h4>
                <?php endif; ?>
              </th>

If i select and use Ctrl + Shift +C the result will bee:

//              <th colspan="7">
//                <?php echo __('filters') ?>
//                <?php if($_COOKIE["help"]=="dcontexto"): ?>
//                <a class="dcontexto">
//                  <img src="/sfTcheGeneratorPlugin/images/help.png"/>
//                  <span>
//                    <?php echo __('This is the search form of') ?> filial,
//                    <?php echo __('for field information it locates the hand of mouse on the name of the field.') ?>
//                  </span>
//                </a>
//                <?php endif; ?>
//                <?php if ($sf_flash->has('delete')): ?>
//                <h4 class="form-error">
//                  <?php echo __($sf_flash->get('delete')) ?>
//                </h4>
//                <?php endif; ?>
//              </th>

And nothing is really commented (at last syntax highlight does not change. The sugestion is:

<!--              <th colspan="7">
                <?php echo __('filters') ?>
                <?php if($_COOKIE["help"]=="dcontexto"): ?>
                <a class="dcontexto">
                  <img src="/sfTcheGeneratorPlugin/images/help.png"/>
                  <span>
                    <?php echo __('This is the search form of') ?> filial,
                    <?php echo __('for field information it locates the hand of mouse on the name of the field.') ?>
                  </span>
                </a>
                <?php endif; ?>
                <?php if ($sf_flash->has('delete')): ?>
                <h4 class="form-error">
                  <?php echo __($sf_flash->get('delete')) ?>
                </h4>
                <?php endif; ?>
              </th> -->

All html code commented and all php code keep uncomented or receive a /* */ inside the <?php tags.
Comment 2 Mikhail Matveev 2008-11-21 13:26:50 UTC
Would be very useful. Should be implemented in 7.0, I reckon.
Comment 3 Tomasz Slota 2010-02-10 08:44:44 UTC
reassigning to default owner
Comment 4 Filip Zamboj 2010-09-15 12:26:15 UTC
batch reassigning
Comment 5 Ondrej Brejla 2012-07-12 13:13:25 UTC
Works properly for me in 7.3dev.