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.
Summary: | Netbeans fails to provide autocomplete on objects passed to type-hinted anonymous functions within a class | ||
---|---|---|---|
Product: | php | Reporter: | TheTechFan |
Component: | Editor | Assignee: | Tomas Mysik <tmysik> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | junichi11 |
Priority: | P3 | ||
Version: | 8.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Relatively minimal testcase
Modified testcase Sshot Screenshot of bug Screenshot from 20140804 nightly Screenshot from 20140805 nightly Screenshot taken on a 3rd machine from the 2014-08-07 nighly |
Description
TheTechFan
2014-08-03 00:28:39 UTC
Created attachment 148488 [details]
Relatively minimal testcase
This bug occurs in Netbeans 8.0, as well. Works for me properly in the dev build. Try to delete your userdir/cached index and force NB to reindex whole sources. I think that there were some changes in parsing infrastructure. Product Version: NetBeans IDE Dev (Build 20140803-a5ccc9a75f08) Java: 1.8.0_11; Java HotSpot(TM) 64-Bit Server VM 25.11-b03 Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12 System: Mac OS X version 10.9.4 running on x86_64; UTF-8; cs_CZ (nb) It still doesn't work for me. I tried closing my projects, deleting the cache, and creating a new project containing only the testcase.php file, but NetBeans still doesn't autocomplete properties/methods on the $case variable (when I type `$case->` inside the callback function, NetBeans does not suggest the getInfo() method or public $property). Created attachment 148496 [details]
Modified testcase
If a separate (completely unrelated) $case variable is defined outside the callback, NetBeans incorrectly autocompletes its properties/methods inside the callback.
Created attachment 148501 [details]
Sshot
Sorry, still works properly in the dev build.
Created attachment 148503 [details]
Screenshot of bug
What in the world is making it behave differently for me? Screenshot taken from a clean install of today's nightly with a new project.
Is there some setting that might affect this? Is it a difference between the PC and Mac versions? What could be causing this bug? Imho not, there must be something wrong with your index. Don't know what...normally clean install should help (or deleting userdir and cache dir). Created attachment 148538 [details]
Screenshot from 20140804 nightly
I downloaded the 20140804 nightly and started with a clean install, fresh profile, and new project. In this version NetBeans no longer suggests members of the unrelated variable, but it still fails to provide autocomplete suggestions for the TestCase class. @Ondrej could you test this in the very latest nightly build on Windows with a clean install of NetBeans? Perhaps it's a recent regression.
Created attachment 148562 [details]
Screenshot from 20140805 nightly
I just performed a clean install of the 20140805 nightly on a different PC and the issue occurs there as well. There is definitely a bug here.
Created attachment 148596 [details]
Screenshot taken on a 3rd machine from the 2014-08-07 nighly
I tried installing the NetBeans 2014-08-07 nightly on a *third* machine, this time as an upgrade from 8.0. I tried the modified testcase in both an existing project and a new project, and the issue was reproducible in both cases. There is definitely a bug of some sort here! If possible please test the latest nightly on Windows if you can't reproduce it on a Mac. I don't have a Mac to test. It works for me as well in the current dev build. Please, as written before, ensure that you delete your Cache directory [1] first, then start NetBeans and wait till it scans & indexes your sources and try it again. Thanks. [1] See Help > About adialog, Cache directory Product Version: NetBeans IDE Dev (Build 20160610-49331e2a0591) Java: 1.8.0_91; Java HotSpot(TM) 64-Bit Server VM 25.91-b14 Runtime: Java(TM) SE Runtime Environment 1.8.0_91-b14 System: Linux version 4.2.0-38-generic running on amd64; UTF-8; cs_CZ (nb) This is still broken even in the Netbeans 8.2 release candidate. Try opening the Modified testcase file in a project. On line 25, try typing `$case->` and notice that instead of suggesting the property and method of the `TestCase` object, Netbeans incorrectly suggests the `test` method of the `TestCaseUser` class. I hope this is fixed with the issue 268825. So please try to test it in the dev build. Thanks! *** This bug has been marked as a duplicate of bug 268825 *** |