mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git: cleanup
This commit is contained in:
@@ -36,12 +36,11 @@ public abstract class BasicAction extends DumbAwareAction {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(@NotNull AnActionEvent event) {
|
||||
final Project project = event.getData(CommonDataKeys.PROJECT);
|
||||
final Project project = event.getRequiredData(CommonDataKeys.PROJECT);
|
||||
ApplicationManager.getApplication().runWriteAction(() -> FileDocumentManager.getInstance().saveAllDocuments());
|
||||
final VirtualFile[] vFiles = event.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY);
|
||||
assert vFiles != null : "The action is only available when files are selected";
|
||||
|
||||
assert project != null;
|
||||
final GitVcs vcs = GitVcs.getInstance(project);
|
||||
if (!ProjectLevelVcsManager.getInstance(project).checkAllFilesAreUnder(vcs, vFiles)) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user