From c1fa54dd5cbca46450bcd0652796826774474c42 Mon Sep 17 00:00:00 2001 From: Artem Gainanov Date: Wed, 30 May 2018 18:55:32 +0700 Subject: [PATCH] [gui-test] GUI-114 execute get current file name on edt --- .../testGuiFramework/fixtures/FileEditorFixture.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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]; } /**