mbien commented on PR #8509:
URL: https://github.com/apache/netbeans/pull/8509#issuecomment-2899752927
we can match the right hand side type and add ordering:
```java
try (${resourceType default="AutoCloseable" ordering=3} ${resource
newVarName default="res" ordering=2} = ${rhs instanceof="AutoCloseable"
default="resource" ordering=1}) {
${selection}${cursor}
}
```
It will now start on the right side and NB will offer completion items which
implement `AutoCloseable`.
Other templates like
[`fore`](https://github.com/apache/netbeans/blob/b53a8a4b768c06f1c5612cd3054e969be2227270/java/java.editor/src/org/netbeans/modules/java/editor/resources/DefaultAbbrevs.xml#L171)
can compute the type on the left hand side if the user changes something on
the right, but I am not completely sure how both are linked via the template
tbh.
--
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