void (@NotNull final Module module, final String @NotNull ... localFileNames) { final LocalFileSystem fs = LocalFileSystem.getInstance(); fs.refresh(false); final Project project = module.getProject(); Arrays.stream(localFileNames).map(o -> fs.findFileByPath(o)).filter(o -> o != null).forEach(file -> { final AbstractVcs vcs = VcsUtil.getVcsFor(project, file); if (vcs == null) { return; } final CheckinEnvironment environment = vcs.getCheckinEnvironment(); if (environment != null) { environment.scheduleUnversionedFilesForAddition(Collections.singletonList(file)); } }); }