Remove duplicate items in code completion |
|
Use this method:
function uniques(array: any[], key: string) { return array.reduce((acc, curr) => { if (!acc.find(item => item[key] === curr[key])) { acc.push(curr); } return acc; }, []); } |
||||||||||||
|
|
Hi, what do you mean? Where should I put it? Somewhere into PhpEd? I am not C++ programmer ... dont want to end up hacking IDE Thanx Lubos |
||||||||||||||
|
Site Admin
|
Lubos, duplicates should not be in the code completion popup. Еry to refresh Code Explorer, then wait until parse finished its work and corresponding icon disappeared from the status bar.
If duplicates are still shown after that, please create a sample that will reproduce the duplicates and open ticket for support. In reply to our email you'll attach the sources. Please pack them using zip or rar. |
||||||||||||
_________________ The PHP IDE team |
|
Hi Dmitri,
thanx for response. After refreshing include parser duplicates are still there. I did small demo and figured out, that duplicates are caused by different namespaces - screen bellow: Technically it's not error, but when all objects refer to the same inherited property, it's useless to show such duplicates. I am not sure if I should open ticket .. Demo ZIP files can be downloaded from https: //uloz.to/file/pjRTCmmdpQA9/nusphere-dups-zip. |
||||||||||||
|
Site Admin
|
Sorry, but your URL brings up a page with links to several archives, including v5.6 of PhpED with serial number. Is it what you wanted to show me? Really?
|
||||||||||||
_________________ The PHP IDE team |
|
Not sure what you see, but the link should be correct (checked now) - just remove spacing inside https: and double slash //.
You should see "nusphere-dups.zip" title then just click violet button "Fast download" (switch to english at the top). There are 4 files + screenshot / 35 kb, created today in PhpEd build 19026 / PHP 7.1. Actually here is demo: File ApplicationBase:
File ApplicationConsole:
File ApplicationWeb:
File index.php:
|
||||||||||||||||||||
|
Remove duplicate items in code completion |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by