diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/FileEditorFixture.java b/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/FileEditorFixture.java index a5a06f898968..4dcad41c6d29 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/FileEditorFixture.java +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/FileEditorFixture.java @@ -84,15 +84,13 @@ public class FileEditorFixture extends EditorFixture { */ @Nullable public String getCurrentFileName() { - final String[] fileName = {null}; - execute(new GuiTask() { + return execute(new GuiQuery() { @Override - protected void executeInEDT() throws Throwable { + protected String executeInEDT() throws Throwable { VirtualFile currentFile = getCurrentFile(); - fileName[0] = currentFile != null ? currentFile.getName() : null; + return currentFile != null ? currentFile.getName() : null; } }); - return fileName[0]; } /**