Ejemplo n.º 1
0
        int IVsTextManagerEvents4.OnUserPreferencesChanged4(
            VIEWPREFERENCES3[] viewPrefs,
            LANGPREFERENCES3[] langPrefs,
            FONTCOLORPREFERENCES2[] colorPrefs)
        {
            if (langPrefs != null)
            {
                RefreshLanguageSettings(langPrefs);
            }

            return VSConstants.S_OK;
        }
        public int OnUserPreferencesChanged4(VIEWPREFERENCES3[] pViewPrefs, LANGPREFERENCES3[] pLangPrefs, FONTCOLORPREFERENCES2[] pColorPrefs) {
            IVsTextManager4 textMgr = (IVsTextManager4)NodejsPackage.Instance.GetService(typeof(SVsTextManager));

           if (pLangPrefs != null && pLangPrefs.Length > 0 && pLangPrefs[0].guidLang == _preferences.guidLang) {
                _preferences.IndentStyle = pLangPrefs[0].IndentStyle;
                _preferences.fAutoListMembers = pLangPrefs[0].fAutoListMembers;
                _preferences.fAutoListParams = pLangPrefs[0].fAutoListParams;
                _preferences.fHideAdvancedAutoListMembers = pLangPrefs[0].fHideAdvancedAutoListMembers;

                // Synchronize settings back to TS language service
                pLangPrefs[0].guidLang = Guids.TypeScriptLanguageInfo;
                textMgr.SetUserPreferences4(null, pLangPrefs, null);
            }
            return VSConstants.S_OK;
        }
        public int OnUserPreferencesChanged4(
            VIEWPREFERENCES3[] viewPrefs,
            LANGPREFERENCES3[] langPrefs,
            FONTCOLORPREFERENCES2[] colorPrefs) {
            if (langPrefs != null && langPrefs[0].guidLang == _languageServiceId) {
                _langPrefs = langPrefs[0];
                FireSettingsChanged();
            }

            return VSConstants.S_OK;
        }
Ejemplo n.º 4
0
 public int SetUserPreferences4(VIEWPREFERENCES3[] pViewPrefs, LANGPREFERENCES3[] pLangPrefs, FONTCOLORPREFERENCES2[] pColorPrefs)
 {
     return VSConstants.S_OK;
 }