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 253811 - PHP class completion fails when class file contains docblock template
Summary: PHP class completion fails when class file contains docblock template
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.2
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
: 248165 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-26 17:01 UTC by hummer
Modified: 2016-03-17 00:57 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (21.40 KB, image/png)
2015-07-30 00:13 UTC, junichi11
Details
patch (1.22 KB, patch)
2015-11-08 03:49 UTC, junichi11
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hummer 2015-07-26 17:01:04 UTC
Works:
<?php
class TestAutoComplete
{
}

$testAutoComplete = new TestAuto[... completion works: TestAutoComplete() ...]

Broken:
<?php
class TestAutoComplete
{
/**#@*/
}

$testAutoComplete = new TestAuto[... No suggestions ...]
Comment 1 junichi11 2015-07-30 00:13:21 UTC
Created attachment 155028 [details]
screenshot

I cannot reproduce it.

my environments:
Product Version: NetBeans IDE 8.0.2 (Build 201408251540)
Java: 1.7.0_80; Java HotSpot(TM) Client VM 24.80-b11
Runtime: Java(TM) SE Runtime Environment 1.7.0_80-b15
System: Linux version 3.2.0-88-generic-pae running on i386; UTF-8;
Comment 2 junichi11 2015-11-01 00:56:43 UTC
@hummer
Just try removing user and cache directories(Help > About) of NetBeans. NOTE: your settings are initialized if do that. Thanks.
Comment 3 hummer 2015-11-07 11:37:36 UTC
(In reply to junichi11 from comment #2)
> @hummer
> Just try removing user and cache directories(Help > About) of NetBeans.
> NOTE: your settings are initialized if do that. Thanks.

Hi, thanks for the suggestion.
Yes, it worked after removing the cache and user directories. 
But after importing my settings the bug appeared again. So I partially imported them until it was broken.
The problem is the option: PHP -> Annotations -> Treat unkown Annotations as Type Annotations

When it's checked autocompletion fails if the class contains a docblock template (/**#@*/), after unchecking it's working again. I can always reproduce this when checking/unchecking this option.
Comment 4 junichi11 2015-11-07 12:03:29 UTC
(In reply to hummer from comment #3)
> The problem is the option: PHP -> Annotations -> Treat unkown Annotations as
> Type Annotations

It's reproducible. Thanks for reporting it!
Comment 5 junichi11 2015-11-08 03:49:41 UTC
Created attachment 157214 [details]
patch

I've created a patch. Probably the same problem as [1].

[1] https://netbeans.org/bugzilla/show_bug.cgi?id=245892
Comment 6 junichi11 2015-11-08 03:54:25 UTC
Tomas, Could you please review it?

Thanks.
Comment 7 Tomas Mysik 2015-11-09 08:27:19 UTC
(In reply to junichi11 from comment #6)
> Tomas, Could you please review it?

Will do it, soon. Thanks a lot!
Comment 8 Tomas Mysik 2015-11-20 08:36:42 UTC
Junichi, it would be nice to have a test for it...
Comment 9 Tomas Mysik 2015-11-20 09:43:39 UTC
Patch applied, thanks a lot for it, Junichi!

http://hg.netbeans.org/web-main/rev/3f3f79bb7cc6
Comment 10 Quality Engineering 2015-11-21 03:05:44 UTC
Integrated into 'main-silver', will be available in build *201511210002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3f3f79bb7cc6
User: Tomas Mysik <tmysik@netbeans.org>
Log: #253811 - PHP class completion fails when class file contains docblock template

Patch contributed by junichi11@netbeans.org.
Comment 11 junichi11 2016-03-17 00:57:50 UTC
*** Bug 248165 has been marked as a duplicate of this bug. ***