コード例 #1
0
        protected override void Initialize()
        {
            base.Initialize();

            Instance = this;

            this.languageInfo = new GLSLLanguageInfo();
            ((IServiceContainer)this).AddService(typeof(GLSLLanguageInfo), this.languageInfo, true);

            this.RegisterEditorFactory(new GLSLEditorFactoryWithoutEncoding(this));

            IVsTextManager textManager = (IVsTextManager)this.GetService(typeof(SVsTextManager));

            LANGPREFERENCES[] lanaguagePreferences = new LANGPREFERENCES[1];
            lanaguagePreferences[0].guidLang = typeof(GLSLLanguageInfo).GUID;
            ErrorHandler.ThrowOnFailure(textManager.GetUserPreferences(null, null, lanaguagePreferences, null));
            this.Preferences = new GLSLPreferences(lanaguagePreferences[0]);

            Guid events2Guid = typeof(IVsTextManagerEvents2).GUID;

            ((IConnectionPointContainer)textManager).FindConnectionPoint(ref events2Guid, out this.connectionPoint);

            this.connectionPoint.Advise(this.Preferences, out this.cookie);
        }
コード例 #2
0
ファイル: GLSLSmartIndent.cs プロジェクト: Xannden/VGLSL
 public GLSLSmartIndent(Source source, ITextView textView, GLSLPreferences preferences)
 {
     this.source      = source;
     this.textView    = textView;
     this.preferences = preferences;
 }