junichi11 commented on code in PR #4240:
URL: https://github.com/apache/netbeans/pull/4240#discussion_r901125544
##########
php/php.editor/src/org/netbeans/modules/php/editor/completion/PHPCompletionItem.java:
##########
@@ -770,6 +808,13 @@ public List<String> getInsertParams() {
@Override
public String getSortText() {
+ if (isFirstClassCallable) {
+ // put first-class callable syntax on the last position
+ // e.g.
+ // strlen($length)
+ // strlen(...)
+ return getName() + "99"; // NOI18N
Review Comment:
e.g.
```php
function func($param1, $param2 = 2, $param3 = 3) {
}
// cc items
// func($param1) "func1"
// func($param1, $param2) "func2"
// func($param1, $param2, $pram3) "func3"
```
if we use "100" instead of "99", the order is...
func(...) func100
func($param1) "func1"
func($param1, $param2) "func2"
func($param1, $param2, $pram3) "func3"
if we use "99"...
func($param1) "func1"
func($param1, $param2) "func2"
func($param1, $param2, $pram3) "func3"
func(...) func99
I think that the priority of `func(...)` is low. So, I select "99".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists