void () { final FileEditorManager editorManager = FileEditorManager.getInstance(getProject()); try { PlatformTestUtil.startPerformanceTest("xml formatter", 20000, createTestRunnable()).useLegacyScaling().assertTiming(); } finally { editorManager.closeFile(editorManager.getSelectedFiles()[0]); } }