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 202381 - Duplication of methods and properties in code completion
Summary: Duplication of methods and properties in code completion
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-20 20:45 UTC by hosiplan
Modified: 2012-04-24 15:07 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Error (183.04 KB, image/png)
2011-09-20 20:46 UTC, hosiplan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hosiplan 2011-09-20 20:45:44 UTC
Hello,

what you can't see on the screenshot is, that I have opened three projects.

Two of the projects are libraries, which have linked in "project include path" necessary libraries for completion and each other. 

What this causes is, that I have one librabrary in project available from three different paths

- one from Project Include Path, which is the one i care about
- second in "libs/vendors" folder. That one get's created automaticaly, so I could have 3rd party libs in standartized path and allow automated PHPUnit testing
- third in vendors library from the other library.

It's kind of complicated and I think it's partialy my fault that I've confused the IDE to think I have the files duplicated.

What I suggest is, to check realpath of files, expand symlinks. So that each file would be indexed only once, even if symlinked.

The other thing is, that PHP doesn't allow overloading of methods. So there realy is no need to have in completion one method more than once. I see, that there are variants for optional arguments, which I thing is fine, but there are obviouse duplication in my screenshot.

Filip
Comment 1 hosiplan 2011-09-20 20:46:55 UTC
Created attachment 110936 [details]
Error
Comment 2 Petr Pisl 2011-09-21 15:56:26 UTC
>What I suggest is, to check realpath of files, expand symlinks. So that each
>file would be indexed only once, even if symlinked.

This can look like good idea, but there is performance problem on windows. Resolving symlinks on windows is very expensive operation. Then next thinks is that the parsing / indexing infrastructure doesn't check/cache information about already scanned files. 

I have to admit that I don't know who to solve it now.
Comment 3 hosiplan 2011-09-21 17:29:34 UTC
I don't consider this as a problem on windows platform. There is realy no standard way to create symlinks on windows, or is it? I think this is linux-only problem. 

Anyways methods and properties should not be duplicated in code completion.
Comment 4 Ondrej Brejla 2011-09-22 07:45:07 UTC
After discussion with a reporter -> enhancement.
Comment 5 Petr Pisl 2011-09-22 08:57:22 UTC
> There is realy no standard way to create symlinks on windows, or is it?

Yes, it's possible on NTFS. If there will be a "nice" one, the resolving the link in VM could take a few seconds. It's issue of JDK.