Ejemplo n.º 1
0
        private static string GetEditorCommandLine(string editorName, string executableName, string commandLineParameter, params string[] installFolders)
        {
            string exec = MergeToolsHelper.FindFileInFolders(executableName, installFolders);

            if (String.IsNullOrEmpty(exec))
            {
                exec = editorName;
            }
            else
            {
                exec = "\"" + exec + "\"";
            }
            return(exec + commandLineParameter);
        }
Ejemplo n.º 2
0
        private static string GetNotepadPP()
        {
            string npp = MergeToolsHelper.FindFileInFolders("notepad++.exe", "Notepad++");

            if (String.IsNullOrEmpty(npp))
            {
                npp = "notepad++";
            }
            else
            {
                npp = "\"" + npp + "\"";
            }
            npp = npp + " -multiInst -nosession";
            return(npp);
        }
Ejemplo n.º 3
0
        private static string GetSublimeText3()
        {
            string exec = MergeToolsHelper.FindFileInFolders("sublime_text.exe", "Sublime Text 3");

            if (String.IsNullOrEmpty(exec))
            {
                exec = "SublimeText";
            }
            else
            {
                exec = "\"" + exec + "\"";
            }
            //http://stackoverflow.com/questions/8951275/git-config-core-editor-how-to-make-sublime-text-the-default-editor-for-git-on
            exec = exec + " -w --multiinstance";
            return(exec);
        }
        private void ResolveDiffToolPath()
        {
            string kdiff3Path = MergeToolsHelper.FindPathForKDiff(CurrentSettings.GetValue("difftool.kdiff3.path"));

            if (string.IsNullOrEmpty(kdiff3Path))
            {
                return;
            }

            kdiff3Path = MergeToolsHelper.FindFileInFolders("kdiff3.exe", MergetoolPath.Text);
            if (string.IsNullOrEmpty(kdiff3Path))
            {
                return;
            }

            DifftoolPath.Text = kdiff3Path;
        }
Ejemplo n.º 5
0
        private void ResolveDiffToolPath()
        {
            string kdiff3path = MergeToolsHelper.FindPathForKDiff(_gitModule.GetGlobalSetting("difftool.kdiff3.path"));

            if (string.IsNullOrEmpty(kdiff3path))
            {
                return;
            }

            kdiff3path = MergeToolsHelper.FindFileInFolders("kdiff3.exe", MergetoolPath.Text);
            if (string.IsNullOrEmpty(kdiff3path))
            {
                return;
            }

            DifftoolPath.Text = kdiff3path;
        }
Ejemplo n.º 6
0
        protected override void Init(ISettingsPageHost aPageHost)
        {
            base.Init(aPageHost);

            CommonLogic.FillEncodings(Global_FilesEncoding);

            string npp = MergeToolsHelper.FindFileInFolders("notepad++.exe", "Notepad++");

            if (string.IsNullOrEmpty(npp))
            {
                npp = "notepad++";
            }
            else
            {
                npp = "\"" + npp + "\"";
            }

            GlobalEditor.Items.AddRange(new Object[] { "\"" + AppSettings.GetGitExtensionsFullPath() + "\" fileeditor", "vi", "notepad", npp + " -multiInst -nosession" });
        }
Ejemplo n.º 7
0
        public GlobalSettingsSettingsPage(CommonLogic commonLogic, CheckSettingsLogic checkSettingsLogic, GitModule gitModule)
            : this()
        {
            _commonLogic        = commonLogic;
            _checkSettingsLogic = checkSettingsLogic;
            _gitModule          = gitModule;

            _commonLogic.FillEncodings(Global_FilesEncoding);

            string npp = MergeToolsHelper.FindFileInFolders("notepad++.exe", "Notepad++");

            if (string.IsNullOrEmpty(npp))
            {
                npp = "notepad++";
            }
            else
            {
                npp = "\"" + npp + "\"";
            }

            GlobalEditor.Items.AddRange(new Object[] { "\"" + Settings.GetGitExtensionsFullPath() + "\" fileeditor", "vi", "notepad", npp + " -multiInst -nosession" });
        }