protected async override void Initialize()
        {
            base.Initialize();

            Instance = this;

            SettingsStore.Load();

            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (null != mcs)
            {
                TransformMenu transform = new TransformMenu(DTE, mcs);
                DiffMenu      diffMenu  = new DiffMenu(mcs);
                //MinifyFileMenu minifyMenu = new MinifyFileMenu(mcs);
                //BundleFilesMenu bundleMenu = new BundleFilesMenu(DTE, mcs);
                ProjectSettingsMenu projectSettingsMenu = new ProjectSettingsMenu(DTE, mcs);
                SolutionColorsMenu  solutionColorsMenu  = new SolutionColorsMenu(mcs);
                //BuildMenu buildMenu = new BuildMenu(DTE, mcs);
                MarkdownMenu            markdownMenu     = new MarkdownMenu(DTE, mcs);
                AddIntellisenseFileMenu intellisenseFile = new AddIntellisenseFileMenu(DTE, mcs);
                //UnusedCssMenu unusedCssMenu = new UnusedCssMenu(mcs);
                PixelPushingMenu  pixelPushingMenu  = new PixelPushingMenu(mcs);
                ReferenceJsMenu   referenceJsMenu   = new ReferenceJsMenu(mcs);
                CompressImageMenu compressImageMenu = new CompressImageMenu(mcs);
                //SpriteImageMenu spriteImageMenu = new SpriteImageMenu(DTE, mcs);
                UnminifyMenu      unMinifyMenu = new UnminifyMenu(mcs);
                AddGruntToProject grunt        = new AddGruntToProject(DTE, mcs);

                HandleMenuVisibility(mcs);
                referenceJsMenu.SetupCommands();
                pixelPushingMenu.SetupCommands();
                //unusedCssMenu.SetupCommands();
                intellisenseFile.SetupCommands();
                markdownMenu.SetupCommands();
                //buildMenu.SetupCommands();
                solutionColorsMenu.SetupCommands();
                projectSettingsMenu.SetupCommands();
                //bundleMenu.SetupCommands();
                //minifyMenu.SetupCommands();
                diffMenu.SetupCommands();
                transform.SetupCommands();
                compressImageMenu.SetupCommands();
                //spriteImageMenu.SetupCommands();
                unMinifyMenu.SetupCommands();
                grunt.SetupCommands();
            }

            IconRegistration.RegisterIcons();

            // Hook up event handlers
            await Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() =>
            {
                DTE.Events.BuildEvents.OnBuildDone += BuildEvents_OnBuildDone;
                DTE.Events.SolutionEvents.Opened += delegate { SettingsStore.Load(); ShowTopMenu(); };
                DTE.Events.SolutionEvents.AfterClosing += delegate { DTE.StatusBar.Clear(); ShowTopMenu(); };
            }), DispatcherPriority.ApplicationIdle, null);
        }
예제 #2
0
        protected async override void Initialize()
        {
            base.Initialize();

            Instance = this;
            Telemetry.Initialize(DTE, Version, "4739999f-47f2-408d-8931-0fd899885bb7");
            SettingsStore.Load();

            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (null != mcs)
            {
                TransformMenu           transform           = new TransformMenu(DTE, mcs);
                DiffMenu                diffMenu            = new DiffMenu(mcs);
                ProjectSettingsMenu     projectSettingsMenu = new ProjectSettingsMenu(DTE, mcs);
                SolutionColorsMenu      solutionColorsMenu  = new SolutionColorsMenu(mcs);
                MarkdownMenu            markdownMenu        = new MarkdownMenu(DTE, mcs);
                AddIntellisenseFileMenu intellisenseFile    = new AddIntellisenseFileMenu(DTE, mcs);
                PixelPushingMenu        pixelPushingMenu    = new PixelPushingMenu(mcs);
                ReferenceJsMenu         referenceJsMenu     = new ReferenceJsMenu(mcs);
                UnminifyMenu            unMinifyMenu        = new UnminifyMenu(mcs);

                HandleMenuVisibility(mcs);
                referenceJsMenu.SetupCommands();
                pixelPushingMenu.SetupCommands();
                intellisenseFile.SetupCommands();
                markdownMenu.SetupCommands();
                solutionColorsMenu.SetupCommands();
                projectSettingsMenu.SetupCommands();
                diffMenu.SetupCommands();
                transform.SetupCommands();
                unMinifyMenu.SetupCommands();
            }

            // Hook up event handlers
            await Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() =>
            {
                DTE.Events.BuildEvents.OnBuildDone += BuildEvents_OnBuildDone;
                DTE.Events.SolutionEvents.Opened += delegate { SettingsStore.Load(); ShowTopMenu(); };
                DTE.Events.SolutionEvents.AfterClosing += delegate { DTE.StatusBar.Clear(); ShowTopMenu(); };
            }), DispatcherPriority.ApplicationIdle, null);
        }
예제 #3
0
        protected async override void Initialize()
        {
            base.Initialize();

            Instance = this;

            await NodeServer.Up();

            SettingsStore.Load();
            JavaScriptIntellisense.Register();

            OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (null != mcs)
            {
                TransformMenu           transform           = new TransformMenu(DTE, mcs);
                DiffMenu                diffMenu            = new DiffMenu(mcs);
                MinifyFileMenu          minifyMenu          = new MinifyFileMenu(mcs);
                BundleFilesMenu         bundleMenu          = new BundleFilesMenu(DTE, mcs);
                JsHintMenu              jsHintMenu          = new JsHintMenu(DTE, mcs);
                TsLintMenu              tsLintMenu          = new TsLintMenu(DTE, mcs);
                HubsT4Menu              hubsT4Menu          = new HubsT4Menu(DTE, mcs);
                CoffeeLintMenu          coffeeLintMenu      = new CoffeeLintMenu(DTE, mcs);
                JsCodeStyle             jsCodeStyleMenu     = new JsCodeStyle(DTE, mcs);
                RtlCssMenu              rtlCssMenu          = new RtlCssMenu(DTE, mcs);
                CsonMenu                cson                = new CsonMenu(mcs);
                ProjectSettingsMenu     projectSettingsMenu = new ProjectSettingsMenu(DTE, mcs);
                SolutionColorsMenu      solutionColorsMenu  = new SolutionColorsMenu(mcs);
                BuildMenu               buildMenu           = new BuildMenu(DTE, mcs);
                MarkdownMenu            markdownMenu        = new MarkdownMenu(DTE, mcs);
                HandlebarsMenu          handlebarsMenu      = new HandlebarsMenu(DTE, mcs);
                AddIntellisenseFileMenu intellisenseFile    = new AddIntellisenseFileMenu(DTE, mcs);
                UnusedCssMenu           unusedCssMenu       = new UnusedCssMenu(mcs);
                PixelPushingMenu        pixelPushingMenu    = new PixelPushingMenu(mcs);
                ReferenceJsMenu         referenceJsMenu     = new ReferenceJsMenu(mcs);
                CompressImageMenu       compressImageMenu   = new CompressImageMenu(mcs);
                SpriteImageMenu         spriteImageMenu     = new SpriteImageMenu(DTE, mcs);
                UnminifyMenu            unMinifyMenu        = new UnminifyMenu(mcs);
                //ChainCompilationMenu chainCompilationMenu = new ChainCompilationMenu(DTE, mcs);

                HandleMenuVisibility(mcs);
                referenceJsMenu.SetupCommands();
                pixelPushingMenu.SetupCommands();
                unusedCssMenu.SetupCommands();
                intellisenseFile.SetupCommands();
                markdownMenu.SetupCommands();
                handlebarsMenu.SetupCommands();
                buildMenu.SetupCommands();
                solutionColorsMenu.SetupCommands();
                projectSettingsMenu.SetupCommands();
                jsHintMenu.SetupCommands();
                tsLintMenu.SetupCommands();
                hubsT4Menu.SetupCommands();
                coffeeLintMenu.SetupCommands();
                jsCodeStyleMenu.SetupCommands();
                rtlCssMenu.SetupCommands();
                cson.SetupCommands();
                bundleMenu.SetupCommands();
                minifyMenu.SetupCommands();
                diffMenu.SetupCommands();
                transform.SetupCommands();
                compressImageMenu.SetupCommands();
                spriteImageMenu.SetupCommands();
                unMinifyMenu.SetupCommands();
                //chainCompilationMenu.SetupCommands();
            }

            IconRegistration.RegisterIcons();

            // Hook up event handlers
            await Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() =>
            {
                DTE.Events.BuildEvents.OnBuildDone += BuildEvents_OnBuildDone;
                DTE.Events.SolutionEvents.Opened += delegate { SettingsStore.Load(); ShowTopMenu(); };
                DTE.Events.SolutionEvents.AfterClosing += delegate { DTE.StatusBar.Clear(); ShowTopMenu(); };
            }), DispatcherPriority.ApplicationIdle, null);
        }