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 180593 - Code Hints For Array objects
Summary: Code Hints For Array objects
Status: RESOLVED DUPLICATE of bug 207589
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal with 9 votes (vote)
Assignee: issues@php
URL:
Keywords:
: 194155 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-11 02:36 UTC by mrugendrabhure
Modified: 2012-01-23 09:12 UTC (History)
3 users (show)

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 mrugendrabhure 2010-02-11 02:36:32 UTC
NetBeans IDE currently does not display code hints for items in an array.

Arrays containing a certain class type are very often used in PHP, and it will be very useful if code hints can be made available for them.

I am looking for the following behavior:

[code]
class contact
{
/**
* @var string $name Name of the Person.
*/
var $name;

/**
* @var string $email Primary Email of the contact.
*/
var $email;
}

/**
* @param array<contact> $contacts Array of contact objects.
or
@param contact[] $contacts Array of contact objects.
*/
function addContacts($contacts)
{
foreach($contacts as $ct)
{
       $ct->| <...Code Hint Here>
}

}
[/code]

Thanks,
Mrugendra Bhure.
Comment 1 sdkby 2010-04-12 22:36:45 UTC
It will be good to add support code completion for variables that defined as "array of objects" in DocBlock written using that specs: http://www.icosaedro.it/phplint/phpdoc.html#types

I mean the next syntax:

/*
 *
 * @param array[]SomeClass $paramName1	array of objects of the class SomeClass,
the keys can be both integer numbers and strings (avoid)
 *
 * @param array[int]SomeClass $paramName2 	array of objects of the class SomeClass, the keys are integer numbers
 *
Comment 2 Cloun 2010-04-13 03:56:26 UTC
It would be awesome!
Comment 3 Filip Zamboj 2010-09-15 12:30:49 UTC
batch reassigning
Comment 4 jorp 2012-01-05 16:32:20 UTC
*** Bug 194155 has been marked as a duplicate of this bug. ***
Comment 5 Ondrej Brejla 2012-01-23 09:12:31 UTC

*** This bug has been marked as a duplicate of bug 207589 ***