- add getVariableBindings() method to SurroundWithTryCatchAnalyzer
that finds variables referenced by selected code and cover
PatternInstanceofExpression nodes
- add findNodesInRange() method logic from SurroundWithTryWithResources
refactoring to SurroundWithTryCatchRefactoring which finds all
affected nodes by surrounding selected range and uses new
getVariableBindings() from analyzer
- move any nodes in range that are not already selected inside
the resultant try/catch statement
- add new SurroundWithTests16 class and add this to AllTests
Change-Id: I96cccb60eeeecf404133af87f9f6f01815eca5fe
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/187364
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Tested-by: Jeff Johnston <jjohnstn@redhat.com>
Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>