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 145411 - CC doesn't offer class properties defined in phpdoc
Summary: CC doesn't offer class properties defined in phpdoc
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Tomasz Slota
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-28 12:22 UTC by Petr Pisl
Modified: 2008-09-25 23:35 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 2008-08-28 12:22:33 UTC
Have a simple code:
<?php

class A {
    function sayHello() {
        return "Hello";
    }
}

/**
 * @property int age the age property
 * @property A aa the class A property
 */
class C {

}

$cc = new C;
$cc->age = 10;
echo "age: ".$cc->age."\n";
$cc->aa = new A;
echo "says ".$cc->aa->sayHello()."\n";
?>

The code completion should offer after $cc-> the properties defined in the phpdoc above C class. The type should be
known for the property, so the code completion after $cc->aa-> should work as well.
Comment 1 rmatous 2008-08-28 12:41:01 UTC
BTW: CC for phpdoc could offer not only @property but also @property-read,@property-write, right?
Comment 2 Petr Pisl 2008-08-28 12:43:07 UTC
I know, I have already entered it as issue #145408
Comment 3 Tomasz Slota 2008-09-04 09:23:52 UTC
confirmed. Does PDT support it? If you think we really need it for 6.5 please make it P2. It should not be too difficult to implement
Comment 4 Petr Pisl 2008-09-04 10:04:30 UTC
I think this is not supported directly in PDT. But this is not obstacle to implement this. I think this can be very
useful for many people.
Comment 5 oopman 2008-09-19 12:19:23 UTC
I think it is very important that this feature be implemented. There are a lot of frameworks out there that generate 
code using the @property tags. Furthermore, there are a lot of users like myself who make use of magic __get/__set 
methods in order to provide quick and seamless access to class data.

It would be great if someone could get into 6.5 Final.

I'm tempted to mark it as P2, except I'm not actively involved in the development of Netbeans-PHP, so I think it would 
be a little presumptious of me :-)
Comment 6 Petr Pisl 2008-09-25 23:35:41 UTC
I have fix this last weekend. See http://blogs.sun.com/netbeansphp/entry/screencat_about_class_property_variables