[gui-test] GUI-114 execute get current file name on edt

This commit is contained in:
Artem Gainanov
2018-05-30 19:00:32 +07:00
parent 9b84e36c79
commit c1fa54dd5c
@@ -84,15 +84,13 @@ public class FileEditorFixture extends EditorFixture {
*/
@Nullable
public String getCurrentFileName() {
final String[] fileName = {null};
execute(new GuiTask() {
return execute(new GuiQuery<String>() {
@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];
}
/**