An Oracle blog about NetBeans for PHP

Error badges

Guest Author

Hi, today it will be a very short blog post about a feature we just added to the development version of NetBeans. As the title says, this feature is Error Badges - what does it mean? If you have a PHP file with any error, this file can be easily recognized directly from Projects view. Have a look at the picture:

Error Badges

Please notice, that the badges are present not only in Projects view but also in the tab of the editor.

Right now, it's not decided yet whether this feature will be included in NetBeans 6.9 final because it is experimental and we need to know how well it works for you so any feedback from you, our users, is more than welcome.

That's all for today, as always, please test it and as said above, report all the issues or enhancements you find in NetBeans IssueZilla (component php, subcomponent Editor).

Join the discussion

Comments ( 21 )
  • Espen Liland Tuesday, January 26, 2010

    If you do include it, for god's sake make it optional :)

  • Tom Tuesday, January 26, 2010

    I agree. Make it an option or allow us to exclude certain files or folders.

    I have seen this "feature" in Eclipse (Java) and while it can be heaven in a well configured project, it can also be hell if you do something out of the line!

    Of course "knowing" is usually a good thing. But only if the error recognition is not error-prone by itself.

    Like the third-party Smarty plugin that highlights about 50% of my (working) smarty templates as errors.

    Or like including third-party libraries (which you usually don't want to fix even if there were an error).

    Actually I'm so pleased with the "ignore folder" feature in NetBeans, that allows me to exclude third-party libraries from the project view. Heaven knows how I could ever have worked without it. Having bogus errors marked in third-party code would make things even worse (and the "ignore" feature even more valuable).

  • Urkman Tuesday, January 26, 2010


    what is the best way to start the development build under OSX?



  • Tomas Mysik Tuesday, January 26, 2010

    To Espen Liland & Tom:

    No problem, just report an issue, or better attach a sample project, which will show the problems, and we will fix it (likely add the option).


  • Tomas Mysik Tuesday, January 26, 2010

    To Urkman:

    personally, I don't have Mac but this should work I guess:

    - download the ZIP

    - unzip

    - run bin/netbeans

  • Denyerec Tuesday, January 26, 2010

    I'd rather the IDE speed up by 50% than add any new features... I'm currently drowning in what I wouldn't consider to be a large project at all (Just has some very large classes involved) and things such as the Navigator and code completion cease to function regularly.

    Anything that has to do yet more scanning of files, when the current featureset isn't stable, to me doesn't seem like a good plan.

  • Tomas Mysik Tuesday, January 26, 2010

    To Denyerec:

    Please, in order to help you, report an issue, attach a sample file/project. Thanks.

  • Jozef Tuesday, January 26, 2010

    @Denyerec: +1, I agree with you completely.

  • Jozef Tuesday, January 26, 2010

    @Tomas: OK, i have filed an issue regarding the performance of Navigator.


    IMO it is necessary to fix existing problems of features we use everyday before adding new ones, e.g. debugger has still serious bugs.

  • thinsoldier Tuesday, January 26, 2010

    What _should_ be the greatest thing about open-source projects like netbeans & eclipse+pdt is that you _should_ be able to avoid the problems that developers at Adobe or Microsoft face. Those guys seem to be forced to add new & useless "features" to every "upgrade" and don't get a chance to go back and perfect the stuff that's already there?

    Open source projects should make it a point to have A LOT of bugfix-only & polish-only & usability-only upgrades. Things that Adobe & Micorsoft's shareholders won't let their developers get away with more than once a decade.

    As for the error badges feature, it needs to be HIGHLY configurable. The basic idea of "Error Badges" is a no-brainer. But it's config options and the ability to turn it off entirely is what will make or break it.


    Have you seen my comments on you article about hinting at code completion using comments. I and others have been having some issues with that.

    I also posted a screenshot of a better way of showing the full path of the file instead of cramming it into the tab area. Along with related suggestions.

  • Tomas Mysik Tuesday, January 26, 2010

    To thinsoldier & others:

    As I wrote in the blog post, report all issues and enhancements using BugZilla, there's no better way to help improving NetBeans (except patches, of course).

  • Denyerec Thursday, January 28, 2010

    @Tomas Mysik : Sadly the people for whom I am developing the code forbid its release :( This means I am unable to send you the project, otherwise I would do so in a heartbeat!

    The Magento and Typo3 projects are both rather large, but lack the sort of monolithic class that I'm dealing with (6000 lines). I'm trying to refactor it to speed up the IDE, but I think that the fact I'm working on a network drive is also contributing to the slowdown (Though I could be mistaken here?)

  • Petr Pisl Monday, February 1, 2010

    It's not good idea to work on network drive. At least keep your user dir on your local drive. The reason is that the userdir contains the Lucene databse, which is touch very often. The sources are check and touch often as well and it's better if there are on a local hard disc.

  • Tom Monday, February 1, 2010

    @Tomas Hi Tomas, I watched the webcast from Oracle concerning NetBeans a few minutes ago.

    Do I understand right, that Oracle plans to stop the further development of NetBeans for PHP and ohter non-Java languages? (possibly also setting free all related developers)

    These \*\*\* Oracle-guy Tged Farrell told they plan to focus on Java and leave the further development of any other to the "community", whatever that is supposed to mean.

    So does this mean that Oracle stops the in-house development of the PHP-branch of Netbeans?

    Is suppose this practically would mean the end of Netbeans-PHP.

  • Jozef Monday, February 1, 2010
  • Keith Davis Monday, February 1, 2010

    Not having a feature like this is what keeps us having to use two IDE's (we also use Zend Studio.) Please, add this feature!!!

  • melkorm Tuesday, February 9, 2010

    Great future!

  • johnnywalker Tuesday, February 9, 2010

    Great idea.

  • André Farias Saturday, February 13, 2010

    I think this feature is very useful. Greetings from Brazil

  • Ed Lazor Monday, March 29, 2010

    This feature is wonderful. It gets my vote for the 6.9 release. I also agree with many of the comments here saying that the feature needs to be configurable. Specifically, the ability to specify directories to be ignored and the ability to turn this feature on / off (tho I think it should be enabled by default.

    In an ideal situation, here are a few possibilities:

    - warning badges, similar to error badges, but for whatever warnings the IDE displays. For example, an assignment in a condition warning already highlights the code and the badge would indicate which files have warnings - but with error badges taking a higher priority.

    - the ability to ignore a specific error listed on a specific line in a specific file.

    - the ability to ignore specific types of errors on a per project basis. For example, the ability to ignore the assignment in condition warning (in case you prefer to use that coding style despite coding best practices recommending against it).

    - a performance editor that lets you choose between best performance with no ide enhanced features, medium performance and some ide enhanced features, lowest performance and the most ide enhancements. Also allowing a custom option where you can check / uncheck which ide enhancements to enable / disable.

    This last idea is based on something I saw in Windows XP. I've never seen it applied to an application. It seems like a great idea to me and it might make it easier to address some of the concerns people have about performance versus features.

  • Ted Sunday, May 2, 2010

    Great feature, please include it in the 6.9 release.

    also would be great if it can give warnings of common errors like:

    if (i = 0) { ... } instead of (i == 0)

    and warnings of using global variables that were not defined by 'global' keyword

    enforcing rule that variables must be declared before use ( to avoid 0 value when using variable and it was mistyped, example: dinner instead of diner)

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.