Honza-cz commented on issue #6311:
URL: https://github.com/apache/netbeans/issues/6311#issuecomment-1696266149
So a bit of progress. It seems, all what is needed is to put references to
variables into "usedLocalVariable". I made a simple POC, I added the
"tempForceUsedLocalVariable" to be able to change the behavior while debugging
netbeans:
ScanStatement.java
```
@Override
public Void visitIdentifier(IdentifierTree node, Void p) {
Element e = info.getTrees().getElement(getCurrentPath());
if (e != null) {
boolean tempForceUsedLocalVariable = false;
if (tempForceUsedLocalVariable){
usedLocalVariables.put((VariableElement) e, true);
}
```
After this modification, input parameters appeared in newly created method.
So it seems it points to right direction:
```
private static Supplier<String> concatSup(String first, String second) {
return ()->first+second;
}
```
Anyway, I am still a bit confused by the code itself.
--
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