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 205731 - Autocompletion for variables not working
Summary: Autocompletion for variables not working
Status: RESOLVED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0.1
Hardware: PC Windows 7
: P1 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-30 17:39 UTC by jimbofarmer
Modified: 2011-12-01 15:02 UTC (History)
3 users (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 jimbofarmer 2011-11-30 17:39:27 UTC
class A {
  public $x;
}

/* @var $v1 A */
$v1->

There are no suggestions given for $v1.

However, if I say 
$v1 = new A;
then I get the suggestions.
Comment 1 Ondrej Brejla 2011-12-01 09:06:50 UTC
Works properly in 7.0.1 and in 7.1 too.
Comment 2 jimbofarmer 2011-12-01 13:33:26 UTC
Doesn't work for me.  Here is the info from my IDE.

Product Version: NetBeans IDE 7.0.1 (Build 201107282000)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)


> Works properly in 7.0.1 and in 7.1 too.
Comment 3 Ondrej Brejla 2011-12-01 13:50:33 UTC
Vlado, can you test it? But I'm afraid, that it really works...and the issue is somewhere in reporter's system.

It works for me and for Tomas too. Tested on Ubuntu with 7.0.1 and 7.1 RC.
Comment 4 Ondrej Brejla 2011-12-01 13:51:02 UTC
Just once...please, Vlado, can you test it? Thanks.
Comment 5 Vladimir Riha 2011-12-01 14:15:26 UTC
I can't reproduce it either.

Windows 7 & NetBeans 7.0.1
Ubuntu 11.10 & NetBeans 7.1 RC2
Comment 6 Ondrej Brejla 2011-12-01 14:24:00 UTC
Thanks, so closing again.


jimbofarmer: try to run NB with clear userdir. Mistake has to be on your side.
Comment 7 jimbofarmer 2011-12-01 14:25:59 UTC
Is it a phpdocumentor problem?  This is a dealbreaker for using NetBeans over something else, like Eclipse.

These work:

class A {
  /** @var A */  
  public $x;
  
  function get() {
      $this->x->{auto complete works}
  }
}

$v1 = new A();
$v1->{auto complete works}

This doesn't work:

/* @var $vs A */
$v2->{No suggestions}
Comment 8 Ondrej Brejla 2011-12-01 14:35:43 UTC
/* @var $vs A */
$v2->{No suggestions}

$vs and $v2 ?
Comment 9 jimbofarmer 2011-12-01 14:41:34 UTC
Sorry, mistyped it.

/* @var $v2 A */
$v2->{No suggestions}

Still, does not work.
Comment 10 Ondrej Brejla 2011-12-01 15:02:33 UTC
And it still works for us without any problem. Sorry, but I can't give you another advice.