void () { configureByText(JavaFileType.INSTANCE, """ import java.io.*; class A { public void test() { try (InputStream in = new FileInputStream("file.name")) { } <caret>catch (IOException e) { } } }"""); ctrlShiftF7(); assertRangeText("in", "FileInputStream", "FileInputStream", "catch"); }