public AntlrLanguageClient()
        {
            Logger.Log.CleanUpLogFile();
            Instance = this;
            IComponentModel componentModel = Package.GetGlobalService(typeof(SComponentModel)) as IComponentModel;

            AdaptersFactory = componentModel.GetService <IVsEditorAdaptersFactoryService>();
            //AdaptersFactory = this.GetService(typeof(IVsEditorAdaptersFactoryService)) as IVsEditorAdaptersFactoryService;
            Import.Initialize(this);
            OptionsCommand.Initialize(this);
            AboutCommand.Initialize(this);
            NextSymCommand.Initialize(this);
            GoToVisitorCommand.Initialize(this);
            ReplaceLiteral.Initialize(this);
            RemoveUselessParserProductions.Initialize(this);
            MoveStartRuleToTop.Initialize(this);
            Reorder.Initialize(this);
            SplitCombineGrammars.Initialize(this);
            EliminateDirectLeftRecursion.Initialize(this);
            EliminateIndirectLeftRecursion.Initialize(this);
            EliminateAntlrKeywordsInRules.Initialize(this);
            AddLexerRulesForStringLiterals.Initialize(this);
            SortModes.Initialize(this);
            ConvertRecursionToKleeneOperator.Initialize(this);
            Unfold.Initialize(this);
            Fold.Initialize(this);
            RemoveUselessParentheses.Initialize(this);
            PerformAnalysis.Initialize(this);
            UpperLowerCaseLiteral.Initialize(this);
        }
Beispiel #2
0
        public AntlrLanguageClient()
        {
            Instance = this;
            IComponentModel componentModel = Package.GetGlobalService(typeof(SComponentModel)) as IComponentModel;

            AdaptersFactory = componentModel.GetService <IVsEditorAdaptersFactoryService>();
            object dte2 = Package.GetGlobalService(typeof(SDTE));

            XXX = (Microsoft.VisualStudio.OLE.Interop.IServiceProvider)dte2;
            ServiceProvider sp = new ServiceProvider(XXX);

            //AdaptersFactory = this.GetService(typeof(IVsEditorAdaptersFactoryService)) as IVsEditorAdaptersFactoryService;
            OptionsCommand.Initialize(this);
            AboutCommand.Initialize(this);
            NextSymCommand.Initialize(this);
            GoToVisitorCommand.Initialize(this);
            ReplaceLiteral.Initialize(this);
            RemoveUselessParserProductions.Initialize(this);
            MoveStartRuleToTop.Initialize(this);
            Reorder.Initialize(this);
            SplitCombineGrammars.Initialize(this);
        }