Eclipse supports try-with-resource, something like this:
try(Outputstream resource = new FileOutputStream(file)){
// do something...
}
Many years have passed since this feature was added to eclipse, but there is no "try-with-reousource" template. there is only one try-catch.
I tried to create a template, for example try($type{} ${localVar} = new $type{}){ {$cursor{} }, but was useless. (non-car types were also proposed)
Is there any useful try-with-resource pattern?
source
share