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 197291 - Duplicate code completion sugestions
Summary: Duplicate code completion sugestions
Status: RESOLVED INCOMPLETE
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-31 15:49 UTC by bmLq
Modified: 2011-09-15 08:48 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
example of interface+class (253 bytes, text/x-php5)
2011-04-04 13:44 UTC, bmLq
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bmLq 2011-03-31 15:49:19 UTC
Product Version = NetBeans IDE 7.0 Beta 2 (Build 201102140001)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_23
Runtime = Java HotSpot(TM) Client VM 19.0-b09

When class implements intefrace then in code completion methods and fields are duplicated because are taken both from interface and class.
Comment 1 Marian Mirilovic 2011-04-01 08:19:39 UTC
Hmm, tried in NB 7.0 RC2 and it works for me
Comment 2 Dusan Balek 2011-04-01 09:11:45 UTC
Could you please attach a reproducible test case? Thanks.
Comment 3 bmLq 2011-04-04 13:44:20 UTC
I've invastigated a little more and it happends only when interface and class are of the same name and only for methods (interfaces can't include fields, can they? :)). It happends even if they are in diferend namespaces. for exaple
namespace Class;
class Router implements \interfaces\Class {...}
Comment 4 bmLq 2011-04-04 13:44:27 UTC
Created attachment 107470 [details]
example of interface+class
Comment 5 bmLq 2011-04-04 14:07:56 UTC
> I've invastigated a little more and it happends only when interface and class are of the same name and only for methods (interfaces can't include fields, can they? :)). It happends even if they are in diferend namespaces. for exaple
> namespace Class;
> class Router implements \interfaces\Class {...}
The example should look like this:
namespace Class;
class Router implements \interfaces\Class\Router {...}
Comment 6 Petr Pisl 2011-04-12 14:31:03 UTC
I cannot reproduce the case when the class and interface has the same name and there are from different namespaces.

The case that the interface and name comes from the same namespace is really strange:).
Comment 7 Ondrej Brejla 2011-09-15 08:48:26 UTC
I don't understand, what you are talking about. Your example has syntax errors and if I try to fix it and use your namespaces (which have syntax errors too), it works for me properly.

So provide us simple complete reproducible project, where the problem occurs. Until that -> incomplete.