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 178043

Summary: Syntax Support and Navigator Improvements
Product: php Reporter: dshafik <dshafik>
Component: EditorAssignee: Ondrej Brejla <obrejla>
Status: NEW ---    
Severity: normal CC: BullfrogBlues
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description dshafik 2009-12-02 22:39:47 UTC
There are several improvements to syntax support, and the navigator I would like to see.

In the navigator, there is no visual distinction between regular, final, or abstract class methods, or regular and abstract classes. In addition, there are several syntax errors that Netbeans fails to detect.

The following PHP code:

<?php
interface TestInterface {
    public $var;
    public function a() { }
    public function b();
    protected function c();
    private function d();
    final function e();
}

abstract class TestAbstract implements TestInterface {
    abstract public $var2;
    abstract public function f() { }
    abstract public function g();
    abstract protected function h();
    abstract final function i() { }

    final public function j() { }
    final protected function k() { }
    final private function l() { }
}

class Test extends TestAbstract {
}
?>

provides the following navigator outline: http://screencast.com/t/Y2MyNmNlZG

It would be nice to see final and abstract methods visually distinct from regular methods.

Also, it would be nice if you could see inherited methods in child classes; Zend Studio 5.5 does this with a sub-tree, which means you can ignore it till you want to look.

Also, similar to the "Implement All Abstract Methods" hint, an "Implement All Interface Methods" would be great.

Furthermore, the implemented interfaces of the parent should be shown for child classes, it is only the instantiated descendant that must implement the interface methods.

As for syntax errors, the following syntax errors are present in the above:

* You cannot define member variables in interfaces (allowed, doesn't show in navigator)
* You cannot use { } for method bodies in interfaces (no body is allowed)
* You may only use public in interfaces (allows protected, private, final)
* You cannot declare properties as abstract (allowed, showed in navigator)
* You cannot use { } for method bodies of methods defined as abstract (to clarify, regular methods in abstract classes CAN have method bodies)
* You may only use public and protected for abstract methods (allows private and final)

- Davey
Comment 1 rmatous 2009-12-04 02:09:55 UTC
Makes sense to me(completely)
Comment 2 Filip Zamboj 2010-09-15 12:30:32 UTC
batch reassigning
Comment 3 BullfrogBlues 2012-08-07 16:51:04 UTC
"see inherited methods in child classes" +1

Several of teh issues above have implemented. This should probably be split into several enhancment reports.