mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-162354 Idea does not suggests to execute 'finally' block for try-with-resources expression - support jdk9
This commit is contained in:
@@ -221,6 +221,9 @@ public class PopFrameAction extends DebuggerAction implements DumbAware {
|
||||
if (listElement instanceof PsiResourceVariable) {
|
||||
res.add(factory.createStatementFromText(((PsiResourceVariable)listElement).getName() + ".close();", tryStatement));
|
||||
}
|
||||
else if (listElement instanceof PsiResourceExpression) {
|
||||
res.add(factory.createStatementFromText(((PsiResourceExpression)listElement).getExpression().getText() + ".close();", tryStatement));
|
||||
}
|
||||
}
|
||||
}
|
||||
PsiCodeBlock finallyBlock = tryStatement.getFinallyBlock();
|
||||
|
||||
Reference in New Issue
Block a user