You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "junichi11 (via GitHub)" <gi...@apache.org> on 2023/03/19 06:03:30 UTC
[GitHub] [netbeans] junichi11 opened a new pull request, #5678: Show intersection types in the PHP doc window #5426
junichi11 opened a new pull request, #5678:
URL: https://github.com/apache/netbeans/pull/5678
This problem occurs when fields and functions have intersection types only in PHPDoc.
e.g.
```php
class Example
{
/**
* @var Type1&Type2
*/
public $field; // without type declaration
}
```
Before: `|` is shown instead of `&` (`Type1 | Type2`)
![nb-php-gh-5426-before](https://user-images.githubusercontent.com/738383/226156696-97300fe4-450c-438f-9a73-ddbdbd1b2227.png)
After: `&` is shown (`Type1 & Type2`)
![nb-php-gh-5426](https://user-images.githubusercontent.com/738383/226156547-78584904-a236-4e2e-b808-42633d97aed9.png)
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] junichi11 commented on a diff in pull request #5678: Show intersection types in the PHP doc window #5426
Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on code in PR #5678:
URL: https://github.com/apache/netbeans/pull/5678#discussion_r1141636532
##########
php/php.editor/src/org/netbeans/modules/php/editor/completion/DocRenderer.java:
##########
@@ -359,14 +359,15 @@ private void doFunctionDeclaration(FunctionDeclaration functionDeclaration) {
header.parameters(false);
}
+
Review Comment:
Oops, will remove it. Thanks!
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] tmysik commented on a diff in pull request #5678: Show intersection types in the PHP doc window #5426
Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik commented on code in PR #5678:
URL: https://github.com/apache/netbeans/pull/5678#discussion_r1141626895
##########
php/php.editor/src/org/netbeans/modules/php/editor/completion/DocRenderer.java:
##########
@@ -359,14 +359,15 @@ private void doFunctionDeclaration(FunctionDeclaration functionDeclaration) {
header.parameters(false);
}
+
Review Comment:
Intentional?
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] junichi11 commented on a diff in pull request #5678: Show intersection types in the PHP doc window #5426
Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on code in PR #5678:
URL: https://github.com/apache/netbeans/pull/5678#discussion_r1141644502
##########
php/php.editor/src/org/netbeans/modules/php/editor/completion/DocRenderer.java:
##########
@@ -531,11 +532,11 @@ private String composeFunctionDoc(String description, String parameters, String
}
private String composeParameterLine(PHPDocVarTypeTag param) {
- return composeParameterLine(param.getTypes(), param.getVariable().getValue(), param.getDocumentation());
+ return composeParameterLine(param.getTypes(), param.getVariable().getValue(), param.getDocumentation(), param);
Review Comment:
Yes, I wanted to do it. The following uses another documentation param...
https://github.com/apache/netbeans/blob/8ad336e64d56b0d27ee8b7a50bfcc47afcded50a/php/php.editor/src/org/netbeans/modules/php/editor/completion/DocRenderer.java#L718-L719
So, I'll change it to the following.
```java
private String composeParameterLine(PHPDocVarTypeTag param) {
return composeParameterLine(param, param.getDocumentation());
}
private String composeParameterLine(PHPDocVarTypeTag param, String documentation) {
return composeParameterLine(composeType(param.getTypes(), getTypeKind(param)), param.getVariable().getValue(), documentation);
}
```
```java
String paramDescription = composeParamTagDescription(param, inheritedComments);
String paramLine = composeParameterLine(param, paramDescription);
```
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] tmysik merged pull request #5678: Show intersection types in the PHP doc window #5426
Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik merged PR #5678:
URL: https://github.com/apache/netbeans/pull/5678
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] junichi11 commented on pull request #5678: Show intersection types in the PHP doc window #5426
Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on PR #5678:
URL: https://github.com/apache/netbeans/pull/5678#issuecomment-1475657052
@tmysik Will fix them. Thanks!
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] junichi11 commented on a diff in pull request #5678: Show intersection types in the PHP doc window #5426
Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on code in PR #5678:
URL: https://github.com/apache/netbeans/pull/5678#discussion_r1141647038
##########
php/php.editor/src/org/netbeans/modules/php/editor/completion/DocRenderer.java:
##########
@@ -359,14 +359,15 @@ private void doFunctionDeclaration(FunctionDeclaration functionDeclaration) {
header.parameters(false);
}
+
Review Comment:
Fixed.
##########
php/php.editor/src/org/netbeans/modules/php/editor/completion/DocRenderer.java:
##########
@@ -531,11 +532,11 @@ private String composeFunctionDoc(String description, String parameters, String
}
private String composeParameterLine(PHPDocVarTypeTag param) {
- return composeParameterLine(param.getTypes(), param.getVariable().getValue(), param.getDocumentation());
+ return composeParameterLine(param.getTypes(), param.getVariable().getValue(), param.getDocumentation(), param);
Review Comment:
Fixed.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] tmysik commented on a diff in pull request #5678: Show intersection types in the PHP doc window #5426
Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik commented on code in PR #5678:
URL: https://github.com/apache/netbeans/pull/5678#discussion_r1141628232
##########
php/php.editor/src/org/netbeans/modules/php/editor/completion/DocRenderer.java:
##########
@@ -531,11 +532,11 @@ private String composeFunctionDoc(String description, String parameters, String
}
private String composeParameterLine(PHPDocVarTypeTag param) {
- return composeParameterLine(param.getTypes(), param.getVariable().getValue(), param.getDocumentation());
+ return composeParameterLine(param.getTypes(), param.getVariable().getValue(), param.getDocumentation(), param);
Review Comment:
Nitpick: we are passing several fields of `param` but then, as the last parameter, we pass `param` itself. Maybe we could pass only 1 argument? I am not sure, just noticed it.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] tmysik commented on pull request #5678: Show intersection types in the PHP doc window #5426
Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik commented on PR #5678:
URL: https://github.com/apache/netbeans/pull/5678#issuecomment-1475637793
@junichi11 I just left some comments/questions; please, let me know, I will merge this PR then. Thanks!
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] junichi11 commented on pull request #5678: Show intersection types in the PHP doc window #5426
Posted by "junichi11 (via GitHub)" <gi...@apache.org>.
junichi11 commented on PR #5678:
URL: https://github.com/apache/netbeans/pull/5678#issuecomment-1475239973
@tmysik Could you please have a look at this? If there is no problem, let's merge it. Thanks!
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[GitHub] [netbeans] tmysik commented on a diff in pull request #5678: Show intersection types in the PHP doc window #5426
Posted by "tmysik (via GitHub)" <gi...@apache.org>.
tmysik commented on code in PR #5678:
URL: https://github.com/apache/netbeans/pull/5678#discussion_r1141716504
##########
php/php.editor/src/org/netbeans/modules/php/editor/completion/DocRenderer.java:
##########
@@ -531,11 +532,11 @@ private String composeFunctionDoc(String description, String parameters, String
}
private String composeParameterLine(PHPDocVarTypeTag param) {
- return composeParameterLine(param.getTypes(), param.getVariable().getValue(), param.getDocumentation());
+ return composeParameterLine(param.getTypes(), param.getVariable().getValue(), param.getDocumentation(), param);
Review Comment:
Great, thanks a lot!
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists