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 183988 - endif, endswitch .... are not highlighted
Summary: endif, endswitch .... are not highlighted
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-13 10:58 UTC by Petr Pisl
Modified: 2011-06-08 13:54 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 Petr Pisl 2010-04-13 10:58:34 UTC
When user use alternative syntax, then the tags if end endif are not highlighted as braces.
Comment 1 pcdinh 2010-04-13 14:24:38 UTC
Alternative syntax for control structures is popular in pure PHP template systems including Zend framework, CI, Symfony, Kohana, SolarPHP, Yii, Lithium and many others. WordPress, Drupal and most of PHP CMSs use that kind of syntax in their template/layout/theme files too.

It is great if Netbeans IDE can highlight that kind of syntax especially when parsing template files (.tpl.php):

<?php if (): ?>

<?php elseif: ?>


<?php else: ?>

<?php endif; ?>

or


<?php foreach(): ?>

<?php endforeach; ?>


or

<?php while (): ?>

<?php endwhile; ?>

While the syntax is used to separate HTML code into distinct blocks, its highlight will greatly improve readability of PHP template code mixed into HTML file

Many thanks
Comment 2 Petr Pisl 2010-05-17 14:34:48 UTC
Still missing implementation for this. Unfortunately I haven't time to do it yet.
Comment 3 bobw 2010-07-15 23:48:00 UTC
Note that it doesn't have to be part of HTML files; we use it quite a bit just to increase readability of pure PHP files as compared to using curly braces:

<?php

if (1 == $foo):
	echo 'it's  a 1!';
else:
	echo 'it's something else..';
endif;

?>
Comment 4 Petr Pisl 2011-06-08 13:54:27 UTC
The highlighting of standard syntax was implemented two weeks ago. See my blog: http://blogs.oracle.com/netbeansphp/entry/highlighting_of_alternative_syntax