コード例 #1
0
        internal static void OpenBranchDiffs(RepositorySpec repSpec, string fullBranchSpec, bool isGluonMode)
        {
            if (ShowDownloadPlasticExeWindow(
                    repSpec,
                    isGluonMode,
                    TrackFeatureUseEvent.Features.InstallPlasticCloudFromOpenBranchDiff,
                    TrackFeatureUseEvent.Features.InstallPlasticEnterpriseFromOpenBranchDiff,
                    TrackFeatureUseEvent.Features.CancelPlasticInstallationFromOpenBranchDiff))
            {
                return;
            }

            mLog.DebugFormat(
                "Launching branch diffs for '{0}'",
                fullBranchSpec);

            string exePath = (isGluonMode) ?
                             PlasticInstallPath.GetGluonExePath() :
                             PlasticInstallPath.GetPlasticExePath();

            string branchDiffArg = (isGluonMode) ?
                                   ToolConstants.Gluon.GUI_BRANCH_DIFF_ARG :
                                   ToolConstants.Plastic.GUI_BRANCH_DIFF_ARG;

            ExecuteProcess(exePath,
                           string.Format(
                               branchDiffArg, fullBranchSpec));
        }
コード例 #2
0
        internal static void OpenMerge(string wkPath, bool isGluonMode)
        {
            if (ShowDownloadPlasticExeWindow(isGluonMode))
            {
                return;
            }

            mLog.DebugFormat(
                "Opening Merge on wkPath '{0}'.",
                wkPath);

            if (PlatformIdentifier.IsMac())
            {
                Process plasticProcess = ExecuteGUI(
                    PlasticInstallPath.GetPlasticExePath(),
                    string.Format(ToolConstants.Plastic.GUI_MACOS_MERGE_ARG, wkPath),
                    ToolConstants.Plastic.GUI_MACOS_COMMAND_FILE_ARG,
                    ToolConstants.Plastic.GUI_MACOS_COMMAND_FILE,
                    mPlasticProcessId);

                if (plasticProcess != null)
                {
                    mPlasticProcessId = plasticProcess.Id;
                }

                return;
            }

            ExecuteProcess(
                PlasticInstallPath.GetPlasticExePath(),
                string.Format(ToolConstants.Plastic.GUI_WINDOWS_MERGE_ARG, wkPath));
        }
コード例 #3
0
        internal static void OpenSelectedChangesetsDiffs(
            RepositorySpec repSpec,
            string srcFullChangesetSpec,
            string dstFullChangesetSpec,
            bool isGluonMode)
        {
            if (ShowDownloadPlasticExeWindow(
                    repSpec,
                    isGluonMode,
                    TrackFeatureUseEvent.Features.InstallPlasticCloudFromOpenSelectedChangesetsDiffs,
                    TrackFeatureUseEvent.Features.InstallPlasticEnterpriseFromOpenSelectedChangesetsDiffs,
                    TrackFeatureUseEvent.Features.CancelPlasticInstallationFromOpenSelectedChangesetsDiffs))
            {
                return;
            }

            mLog.DebugFormat(
                "Launching selected changesets diffs for '{0}' and '{1}'",
                srcFullChangesetSpec,
                dstFullChangesetSpec);

            string exePath = (isGluonMode) ?
                             PlasticInstallPath.GetGluonExePath() :
                             PlasticInstallPath.GetPlasticExePath();

            string selectedChangesetsDiffArgs = (isGluonMode) ?
                                                ToolConstants.Gluon.GUI_SELECTED_CHANGESETS_DIFF_ARGS :
                                                ToolConstants.Plastic.GUI_SELECTED_CHANGESETS_DIFF_ARGS;

            ExecuteProcess(exePath,
                           string.Format(
                               selectedChangesetsDiffArgs,
                               srcFullChangesetSpec,
                               dstFullChangesetSpec));
        }
コード例 #4
0
        internal static void OpenSelectedChangesetsDiffs(
            string srcFullChangesetSpec,
            string dstFullChangesetSpec,
            bool isGluonMode)
        {
            if (ShowDownloadPlasticExeWindow(isGluonMode))
            {
                return;
            }

            mLog.DebugFormat(
                "Launching selected changesets diffs for '{0}' and '{1}'",
                srcFullChangesetSpec,
                dstFullChangesetSpec);

            string exePath = (isGluonMode) ?
                             PlasticInstallPath.GetGluonExePath() :
                             PlasticInstallPath.GetPlasticExePath();

            string selectedChangesetsDiffArgs = (isGluonMode) ?
                                                ToolConstants.Gluon.GUI_SELECTED_CHANGESETS_DIFF_ARGS :
                                                ToolConstants.Plastic.GUI_SELECTED_CHANGESETS_DIFF_ARGS;

            ExecuteProcess(exePath,
                           string.Format(
                               selectedChangesetsDiffArgs,
                               srcFullChangesetSpec,
                               dstFullChangesetSpec));
        }
コード例 #5
0
ファイル: LaunchTool.cs プロジェクト: Buster-00/Q_G
        internal static Process OpenConfigurationForMode(bool isGluonMode)
        {
            mLog.Debug("Opening Configuration'.");

            if (isGluonMode)
            {
                Process gluonProcess = ExecuteProcess(
                    PlasticInstallPath.GetGluonExePath(),
                    ToolConstants.Gluon.GUI_CONFIGURE_ARG);

                if (gluonProcess != null)
                {
                    mGluonProcessId = gluonProcess.Id;
                }

                return(gluonProcess);
            }

            Process plasticProcess = ExecuteProcess(
                PlasticInstallPath.GetPlasticExePath(),
                ToolConstants.Plastic.GUI_CONFIGURE_ARG);

            if (plasticProcess != null)
            {
                mPlasticProcessId = plasticProcess.Id;
            }

            return(plasticProcess);
        }
コード例 #6
0
ファイル: IsExeAvailable.cs プロジェクト: BaseDorp/TankGame
        internal static bool ForMode(bool isGluonMode)
        {
            string toolPath = isGluonMode ?
                              PlasticInstallPath.GetGluonExePath() :
                              PlasticInstallPath.GetPlasticExePath();

            return(!string.IsNullOrEmpty(toolPath));
        }
コード例 #7
0
ファイル: LaunchTool.cs プロジェクト: Buster-00/Q_G
        internal static void OpenGUIForMode(WorkspaceInfo wkInfo, bool isGluonMode)
        {
            mLog.DebugFormat(
                "Opening GUI on wkPath '{0}'.",
                wkInfo.ClientPath);

            TrackFeatureUseEvent.For(
                Plastic.API.GetRepositorySpec(wkInfo),
                isGluonMode ?
                TrackFeatureUseEvent.Features.LaunchGluonTool :
                TrackFeatureUseEvent.Features.LaunchPlasticTool);

            if (isGluonMode)
            {
                Process gluonProcess = ExecuteGUI(
                    PlasticInstallPath.GetGluonExePath(),
                    string.Format(
                        ToolConstants.Gluon.GUI_WK_EXPLORER_ARG,
                        wkInfo.ClientPath),
                    ToolConstants.Gluon.GUI_COMMAND_FILE_ARG,
                    ToolConstants.Gluon.GUI_COMMAND_FILE,
                    mGluonProcessId);

                if (gluonProcess != null)
                {
                    mGluonProcessId = gluonProcess.Id;
                }

                return;
            }

            if (PlatformIdentifier.IsMac())
            {
                Process plasticProcess = ExecuteGUI(
                    PlasticInstallPath.GetPlasticExePath(),
                    string.Format(
                        ToolConstants.Plastic.GUI_MACOS_WK_EXPLORER_ARG,
                        wkInfo.ClientPath),
                    ToolConstants.Plastic.GUI_MACOS_COMMAND_FILE_ARG,
                    ToolConstants.Plastic.GUI_MACOS_COMMAND_FILE,
                    mPlasticProcessId);

                if (plasticProcess != null)
                {
                    mPlasticProcessId = plasticProcess.Id;
                }

                return;
            }

            ExecuteProcess(
                PlasticInstallPath.GetPlasticExePath(),
                string.Format(
                    ToolConstants.Plastic.GUI_WINDOWS_WK_ARG,
                    wkInfo.ClientPath));
        }
コード例 #8
0
        internal static void OpenBranchExplorer(WorkspaceInfo wkInfo, bool isGluonMode)
        {
            if (ShowDownloadPlasticExeWindow(
                    wkInfo,
                    isGluonMode,
                    TrackFeatureUseEvent.Features.InstallPlasticCloudFromOpenBranchExplorer,
                    TrackFeatureUseEvent.Features.InstallPlasticEnterpriseFromOpenBranchExplorer,
                    TrackFeatureUseEvent.Features.CancelPlasticInstallationFromOpenBranchExplorer))
            {
                return;
            }

            mLog.DebugFormat(
                "Opening Branch Explorer on wkPath '{0}'.",
                wkInfo.ClientPath);

            TrackFeatureUseEvent.For(
                PlasticGui.Plastic.API.GetRepositorySpec(wkInfo),
                TrackFeatureUseEvent.Features.LaunchBranchExplorer);

            if (PlatformIdentifier.IsMac())
            {
                Process plasticProcess = ExecuteGUI(
                    PlasticInstallPath.GetPlasticExePath(),
                    string.Format(
                        ToolConstants.Plastic.GUI_MACOS_BREX_ARG,
                        wkInfo.ClientPath),
                    ToolConstants.Plastic.GUI_MACOS_COMMAND_FILE_ARG,
                    ToolConstants.Plastic.GUI_MACOS_COMMAND_FILE,
                    mPlasticProcessId);

                if (plasticProcess != null)
                {
                    mPlasticProcessId = plasticProcess.Id;
                }

                return;
            }

            Process brexProcess = ExecuteWindowsGUI(
                PlasticInstallPath.GetPlasticExePath(),
                string.Format(
                    ToolConstants.Plastic.GUI_WINDOWS_BREX_ARG,
                    wkInfo.ClientPath),
                mBrexProcessId);

            if (brexProcess != null)
            {
                mBrexProcessId = brexProcess.Id;
            }
        }
コード例 #9
0
ファイル: LaunchTool.cs プロジェクト: Buster-00/Q_G
        internal static void OpenBranchDiffs(string fullBranchSpec, bool isGluonMode)
        {
            mLog.DebugFormat(
                "Launching branch diffs for '{0}'",
                fullBranchSpec);

            string exePath = (isGluonMode) ?
                             PlasticInstallPath.GetGluonExePath() :
                             PlasticInstallPath.GetPlasticExePath();

            string branchDiffArg = (isGluonMode) ?
                                   ToolConstants.Gluon.GUI_BRANCH_DIFF_ARG :
                                   ToolConstants.Plastic.GUI_BRANCH_DIFF_ARG;

            ExecuteProcess(exePath,
                           string.Format(
                               branchDiffArg, fullBranchSpec));
        }
コード例 #10
0
ファイル: LaunchTool.cs プロジェクト: Buster-00/Q_G
        internal static void OpenChangesetDiffs(string fullChangesetSpec, bool isGluonMode)
        {
            mLog.DebugFormat(
                "Launching changeset diffs for '{0}'",
                fullChangesetSpec);

            string exePath = (isGluonMode) ?
                             PlasticInstallPath.GetGluonExePath() :
                             PlasticInstallPath.GetPlasticExePath();

            string changesetDiffArg = (isGluonMode) ?
                                      ToolConstants.Gluon.GUI_CHANGESET_DIFF_ARG :
                                      ToolConstants.Plastic.GUI_CHANGESET_DIFF_ARG;

            ExecuteProcess(exePath,
                           string.Format(
                               changesetDiffArg, fullChangesetSpec));
        }
コード例 #11
0
        internal static void OpenMerge(WorkspaceInfo wkInfo, bool isGluonMode)
        {
            if (ShowDownloadPlasticExeWindow(
                    wkInfo,
                    isGluonMode,
                    TrackFeatureUseEvent.Features.InstallPlasticCloudFromOpenMerge,
                    TrackFeatureUseEvent.Features.InstallPlasticEnterpriseFromOpenMerge,
                    TrackFeatureUseEvent.Features.CancelPlasticInstallationFromOpenMerge))
            {
                return;
            }

            mLog.DebugFormat(
                "Opening Merge on wkPath '{0}'.",
                wkInfo.ClientPath);

            if (PlatformIdentifier.IsMac())
            {
                Process plasticProcess = ExecuteGUI(
                    PlasticInstallPath.GetPlasticExePath(),
                    string.Format(ToolConstants.Plastic.GUI_MACOS_MERGE_ARG, wkInfo.ClientPath),
                    ToolConstants.Plastic.GUI_MACOS_COMMAND_FILE_ARG,
                    ToolConstants.Plastic.GUI_MACOS_COMMAND_FILE,
                    mPlasticProcessId);

                if (plasticProcess != null)
                {
                    mPlasticProcessId = plasticProcess.Id;
                }

                return;
            }

            ExecuteProcess(
                PlasticInstallPath.GetPlasticExePath(),
                string.Format(ToolConstants.Plastic.GUI_WINDOWS_MERGE_ARG, wkInfo.ClientPath));
        }