mbien commented on code in PR #7339:
URL: https://github.com/apache/netbeans/pull/7339#discussion_r1590965344
##########
java/java.editor/src/org/netbeans/modules/java/editor/codegen/ToStringGenerator.java:
##########
@@ -303,4 +321,10 @@ private static MethodInvocationTree
createAppendInvocation(TreeMaker make, Expre
);
}
+ private static ExpressionTree makeExpression(TreeMaker make, Element
element) {
+ return element.getKind() == ElementKind.METHOD
+ ? make.MethodInvocation(Collections.emptyList(),
make.MemberSelect(make.Identifier("this"), element), Collections.emptyList())
// NOI18N
+ : make.Identifier(element.getSimpleName());
+ }
Review Comment:
@lahodaj here I didn't know how to do a method invocation on implicit
"this". So i cheated a bit after I saw that the doc says that
`Identifier("this")` would do no validation.
--
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