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 163269 - Code Completion for $var = new self;
Summary: Code Completion for $var = new self;
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker with 1 vote (vote)
Assignee: Tomasz Slota
URL:
Keywords: SIMPLEFIX
: 153692 166341 170180 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-21 15:36 UTC by ibnsaeed
Modified: 2009-09-22 12:30 UTC (History)
0 users

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 ibnsaeed 2009-04-21 15:36:43 UTC
Netbeans 6.7M3 does not show Code Completion for objects created using new self.

Please check the screenshot 
http://static.zooomr.com/images/7277438_e8881278bf_o.jpg

Code:
<?php

class User {

    public $id;
    public $username;
    public $password;

    public static function instantiate() {
          $object = new self;
          $object-> [[ NO Code Completion ]] 
         
          return $object;
    }
}

?> 


Also, when you press CTRL + Left Click  on self; it does not link back to the main class User
Comment 1 Tomas Mysik 2009-04-21 16:27:43 UTC
Please notice that you can work around it using "NB tag" @var - more 
information on our blog:
http://blogs.sun.com/netbeansphp/entry/defining_variable_type_in_a
http://blogs.sun.com/netbeansphp/entry/defining_a_variable_type_in
Comment 2 ibnsaeed 2009-04-21 16:30:55 UTC
@tmysik, Yes the workaround works. 

it would be best if the code completion could be enhanced a bit, so rather than going through the comment style, it
should work like the usual code completion.

It would save some extra typing as well
Comment 3 Tomasz Slota 2009-04-21 16:34:11 UTC
confirmed, should be easy to fix
Comment 4 ibnsaeed 2009-04-21 16:49:10 UTC
@tslota, thanks for confirming it. 

Should the fix be available in the daily build ?
Comment 5 rmatous 2009-08-11 11:33:47 UTC
*** Issue 170180 has been marked as a duplicate of this issue. ***
Comment 6 rmatous 2009-08-11 12:26:02 UTC
*** Issue 153692 has been marked as a duplicate of this issue. ***
Comment 7 rmatous 2009-08-11 12:26:20 UTC
*** Issue 166341 has been marked as a duplicate of this issue. ***
Comment 8 Quality Engineering 2009-08-27 06:01:37 UTC
Integrated into 'main-golden', will be available in build *200908270201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a24bb1ad5406
User: Radek Matous <rmatous@netbeans.org>
Log: #163269 Code Completion for $var = new self;
Comment 9 rmatous 2009-09-22 12:30:35 UTC
Fixed