GitPushResultNotification (Map<GitRepository, GitPushRepoResult> map) { boolean wasUpdatePerformed = ContainerUtil.exists(map.values(), aNew -> aNew.getUpdateResult() != null); UpdatedFiles updatedFiles = UpdatedFiles.create(); if (wasUpdatePerformed) { updatedFiles.getTopLevelGroups().get(0).add("file.txt", "Git", null); } Ref<GitPushResultNotification> ref = new Ref<>(); ApplicationManager.getApplication().invokeAndWait(() -> { ref.set(GitPushResultNotification.create(myProject, new GitPushResult(map, updatedFiles, null, null, Collections.emptyMap()), null, map.size() > 1, null, Collections.emptyMap())); }); return ref.get(); }