diff --git a/plugins/git4idea/src/git4idea/actions/GitInit.java b/plugins/git4idea/src/git4idea/actions/GitInit.java index abc9d8822b56..c6306ed317f3 100644 --- a/plugins/git4idea/src/git4idea/actions/GitInit.java +++ b/plugins/git4idea/src/git4idea/actions/GitInit.java @@ -40,13 +40,10 @@ import git4idea.commands.GitCommandResult; import git4idea.i18n.GitBundle; import org.jetbrains.annotations.NotNull; -/** - * Initialize git repository action - */ public class GitInit extends DumbAwareAction { @Override - public void actionPerformed(final AnActionEvent e) { + public void actionPerformed(@NotNull AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); if (project == null) { project = ProjectManager.getInstance().getDefaultProject(); @@ -63,7 +60,7 @@ public class GitInit extends DumbAwareAction { doInit(project, fcd, baseDir); } - private static void doInit(final Project project, FileChooserDescriptor fcd, VirtualFile baseDir) { + private static void doInit(@NotNull Project project, @NotNull FileChooserDescriptor fcd, VirtualFile baseDir) { FileChooser.chooseFile(fcd, project, baseDir, root -> { if (GitUtil.isUnderGit(root) && Messages.showYesNoDialog(project, GitBundle.message("init.warning.already.under.git", @@ -77,7 +74,7 @@ public class GitInit extends DumbAwareAction { if (!result.success()) { GitVcs vcs = GitVcs.getInstance(project); if (vcs != null && vcs.getExecutableValidator().checkExecutableAndNotifyIfNeeded()) { - VcsNotifier.getInstance(project).notifyError("Git init failed", result.getErrorOutputAsHtmlString()); + VcsNotifier.getInstance(project).notifyError("Git Init Failed", result.getErrorOutputAsHtmlString()); } return; } @@ -94,12 +91,11 @@ public class GitInit extends DumbAwareAction { }); } - public static void refreshAndConfigureVcsMappings(final Project project, final VirtualFile root, final String path) { + public static void refreshAndConfigureVcsMappings(@NotNull Project project, @NotNull VirtualFile root, @NotNull String path) { VfsUtil.markDirtyAndRefresh(false, true, false, root); ProjectLevelVcsManager manager = ProjectLevelVcsManager.getInstance(project); manager.setDirectoryMappings(VcsUtil.addMapping(manager.getDirectoryMappings(), path, GitVcs.NAME)); manager.updateActiveVcss(); VcsDirtyScopeManager.getInstance(project).dirDirtyRecursively(root); } - } diff --git a/plugins/git4idea/src/git4idea/i18n/GitBundle.properties b/plugins/git4idea/src/git4idea/i18n/GitBundle.properties index 52d985ee04f8..0739e89860ad 100644 --- a/plugins/git4idea/src/git4idea/i18n/GitBundle.properties +++ b/plugins/git4idea/src/git4idea/i18n/GitBundle.properties @@ -56,7 +56,7 @@ common.do.not.show=&Do not show this dialog again common.git.root.tooltip=Select Git VCS root common.git.root=Git &Root: common.no.active.branch= -common.refreshing=Refreshing files +common.refreshing=Refreshing Files computing.annotation=Computing annotation for {0} crlf.convert.convert=Convert Selected crlf.convert.label=&The following text files have line separator that do not match the project line separator.
Select files you wish to convert to project default line separators before commit. @@ -142,7 +142,7 @@ index.file.error=Updating file in the index failed init.add.root.message=Do you want to add this directory as a VCS root? init.add.root.title=Git Init init.destination.directory.description=Select directory where the new Git repository will be created. -init.destination.directory.title=Select directory for git init +init.destination.directory.title=Create Git Repository init.warning.already.under.git=The selected directory {0} is already under Git.
Are you sure that you want to create a new VCS root? init.warning.title=Git Init initializing.title=Initializing repository...