예제 #1
0
 public VSQtSettings()
 {
     newMocDir                    = QtVSIPSettings.GetMocDirectory();
     newMocOptions                = QtVSIPSettings.GetMocOptions();
     newRccDir                    = QtVSIPSettings.GetRccDirectory();
     newUicDir                    = QtVSIPSettings.GetUicDirectory();
     newLUpdateOnBuild            = QtVSIPSettings.GetLUpdateOnBuild();
     newLUpdateOptions            = QtVSIPSettings.GetLUpdateOptions();
     newLReleaseOptions           = QtVSIPSettings.GetLReleaseOptions();
     newAskBeforeCheckoutFile     = QtVSIPSettings.GetAskBeforeCheckoutFile();
     newDisableCheckoutFiles      = QtVSIPSettings.GetDisableCheckoutFiles();
     newDisableAutoMOCStepsUpdate = QtVSIPSettings.GetDisableAutoMocStepsUpdate();
 }
예제 #2
0
        private void CheckoutFileIfNeeded(string fileName, out bool abortOperation)
        {
            abortOperation = false;

            if (QtVSIPSettings.GetDisableCheckoutFiles())
            {
                return;
            }

            SourceControl sourceControl = dte.SourceControl;

            if (sourceControl == null)
            {
                return;
            }

            if (!sourceControl.IsItemUnderSCC(fileName))
            {
                return;
            }

            if (sourceControl.IsItemCheckedOut(fileName))
            {
                return;
            }

            if (QtVSIPSettings.GetAskBeforeCheckoutFile())
            {
                string       shortFileName = System.IO.Path.GetFileName(fileName);
                DialogResult dr            = MessageBox.Show(
                    SR.GetString("QuestionSCCCheckoutOnOpen", shortFileName),
                    Resources.msgBoxCaption, MessageBoxButtons.YesNoCancel,
                    MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
                if (dr == DialogResult.Cancel)
                {
                    abortOperation = true;
                }
                if (dr != DialogResult.Yes)
                {
                    return;
                }
            }

            sourceControl.CheckOutItem(fileName);
        }
예제 #3
0
        public VSQtSettings()
        {
            newMocDir                    = QtVSIPSettings.GetMocDirectory();
            newMocOptions                = QtVSIPSettings.GetMocOptions();
            newRccDir                    = QtVSIPSettings.GetRccDirectory();
            newUicDir                    = QtVSIPSettings.GetUicDirectory();
            newLUpdateOnBuild            = QtVSIPSettings.GetLUpdateOnBuild();
            newLUpdateOptions            = QtVSIPSettings.GetLUpdateOptions();
            newLReleaseOptions           = QtVSIPSettings.GetLReleaseOptions();
            newAskBeforeCheckoutFile     = QtVSIPSettings.GetAskBeforeCheckoutFile();
            newDisableCheckoutFiles      = QtVSIPSettings.GetDisableCheckoutFiles();
            newDisableAutoMOCStepsUpdate = QtVSIPSettings.GetDisableAutoMocStepsUpdate();

            var settingsManager = new ShellSettingsManager(Vsix.Instance);
            var store           = settingsManager.GetReadOnlySettingsStore(SettingsScope.UserSettings);

#if VS2013
            EnableQmlClassifier = store.GetBoolean(Statics.QmlClassifierPath,
                                                   Statics.QmlClassifierKey, true);
#else
            EnableQmlTextMate = store.GetBoolean(Statics.QmlTextMatePath,
                                                 Statics.QmlTextMateKey, true);
#endif
        }