You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is possible. SurroundWithTryWithResourcesAction is of course a UI class (relies on Action which is tied to SWT), but it's just using SurroundWithTryWithResourcesRefactoring. Doing a few quick changes, most things should resolve correctly :
Move AbstractExceptionAnalyzer, ExceptionAnalyzer, SurroundWithTryWithResourcesAnalyzer, SurroundWithTryWithResourcesRefactoring from jdt.ui to jdt.core.manipulation.
Use LinkedProposalModelCore instead of LinkedProposalModel in SurroundWithTryWithResourcesRefactoring and make sure clients can continue to work with the core version
There's some calls to QuickAssistProcessor static methods but they all deal with ASTNode so I suspect these are utility methods that don't need to be in UI
SurroundWithTryWithResourcesRefactoring does have a single constructor meant to take an ITextSelection. We can't move that so we'll need to split the class into a core and create a smaller class that just extends it and has the unsupportable constructor
Jeff has proposed some refactoring of the necessary classes in https://bugs.eclipse.org/bugs/show_bug.cgi?id=576431 which is expected to make 2021-12 M2 (end of Oct.) . I will have a look to see how we can integrate this.
I have a draft that is working, but I'm seeing a bunch of odd behaviour in some other cases, so I may have to file some new bugs. Also there's some copied code that can be avoided by migrating some things.
try with resources feature looks like absent in vscode.
Environment
Steps To Reproduce
[step 1]
[step 2]
Current Result
Expected Result
Additional Informations
The text was updated successfully, but these errors were encountered: