Parameter hints for subsequent methods |
Site Admin
|
This is not a bug. The decistion whether particular part of code is a class method or not is made by parser which works according to php grammar rules. Althrough the grammar has rules to recover from syntax errors, it still requires to process some certain tokens until it gets recovered. If it happens before your m3 appears, the m3 will be properly recognized and code completion will be able to work with it.
If you have a quote (") somewhere in the text, it may take away good part of code including your m3. I'd recommend you to enable auto-close quotes. In this case if you enter one, its pair will be auto-added and therefore the code will still be valid (from grammar perspectives), and your m3 won't disappear. |
||||||||||||
_________________ The PHP IDE team |
|
Thanks for your reply. Now it makes sense as I read your post.
The opening quote (single or double) renders all the following text (code) as part of the string itself and the m3 'disappears' from the code as it is part of the string now (at least up to the next quote downwards). Still, I thought the parser would have considered the last working state (before the error that occured after openning the first quote) of the methods database, but all in all this is just a thought and not important at all. As to autoclosing quotes, I do always disable this because often times when I edit strings/enter quotes, I want it predictable and I don't want the extra effort to delete quotes when they appear here and there automatically. Ok, I agree this is the normal behavior, although at the time the opening quote is written the parser already knew the method and its parameters (because we are in the middle of calling it and after the first parenthesis, and it was all about the parameters hint) - I saw such behavior in other IDEs that's why I was wondering if this was a bug in Phped. Not a big deal anyway. |
||||||||||||
|
Site Admin
|
I'm not sure what would help "the other" IDE to recover from a non-closed quote. Perhaps, they are lazy in re-parsing the file that you work with. If so, it would be enough to wait for 1-2 seconds and check again.
Regarding "remember its state", it's not possible without bringing even more problems. Imagine, you have just deleted a bunch of methods and made a little syntax error. Would you like to see deleted methods in code completion? But you will if phped does not re-parse the file. |
||||||||||||
_________________ The PHP IDE team |
|
At the time just before I enter the quote after the opening parenthesis, the syntax was error-free and the last state - stable. It should be evident that the single character (quote) is not "deleted a bunch of methods" in this particular case.
"The other" IDE - yes I waited for long enough, it flashed the parameter hint for a moment and persisted until I closed the parenthesis ")". . Maybe just some kind of relaxed intelligent parsing in this case when it was not possible to have deleted a method when calling one in the parenthesis. Having the paremeters tooltip disappear when I enter a string parameter was just a small annoyance (if using automatically closed quotes, I still would have to jump after the closing quote with the right arrow when done with the string). Anyway, this was more of thoughts aloud, it is Ok as it is. Still, I think Phped has the most intelligent code completion engine out there, despite the many missing code features as seen elsewhere. |
||||||||||||
|
Parameter hints for subsequent methods |
|
||
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