Associative array key name autocomplete |
|
+1
|
||||||||||||
|
Guru master
|
+1
|
||||||||||||
|
Site Admin
|
you must be joking as it works fine:
|
||||||||||||
_________________ The PHP IDE team |
Guru master
|
Most of the code that I work with uses array():
Code completion doesn't appear to work with that |
||||||||||||||
|
Site Admin
|
It does not matter how you declare the array.
It auto-shows the dropdown right after you press ' in $array[|] (where | denotes cursor position) If it does not, check that "Array Indices" checkbox is turned on in Tools->Settings->CodeCompletion on PHP tab. |
||||||||||||
_________________ The PHP IDE team |
Guru master
|
Hi Dmitri, I have that option ticked (all code completion options are ticked) and when I enter that code, when I type in [' the code completions pops up with a whole bunch of a few hundred items from the project.
I just mucked around with the parser settings and when I went back to the code to test again, got an access violation in phped.exe and I've just submitted the report for that. Yesterday I'm sure I tried the ['number'=>123] syntax and code completion worked, then last night I went back to array() and it didn't work (shows hundreds of options). At this moment I cannot get either syntax to work. I'll upgrade to latest 9051 and see if behaviour changes. |
||||||||||||
|
|
dmitri,
in your example you only have one file and one array. of course you're getting the right keys. however, in real life, just as I said above "it lists keys that aren't part of the array" - and in my project that list is HUGE - a hundred of items or so. No way to find the right key - faster to type. so to make it perfectly clear, I expect that ONLY 'number' and 'string' are shown in autocomplete popup. Thanks |
||||||||||||
|
Site Admin
|
In the beginning I thoght "it does not work" means you don't get the popup at all. Now with clarifications it's clear that only "valid" for particular array indices are expected.
Right. But with long names it's still faster to start typing then pick from the dropdown NUMBER_OF_CHILDREN_NODES. Same goes to the other elements. I can hardly imagine you would type $a using code completion.
I'm sorry, but it's not possible, not in current code insight scheme. But we'll review this possibility in the future. |
||||||||||||||||||
_________________ The PHP IDE team |
Guru master
|
Hi Dmitri, today Sergey requested me to submit this problem as a 'problem with functionality'. Does this mean it is functioning as expected and there is no point in me submitting it as a problem?
|
||||||||||||
|
Site Admin
|
Yes, it is functioning as expected and a post on this part of the forum is enough for us include the request to "WTR" plans. So, you don't have to submit the same in the report.
|
||||||||||||
_________________ The PHP IDE team |
|
Sorry, what's "WTR"?
Thanks! |
||||||||||||
|
Associative array key name autocomplete |
|
||
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