Beispiel #1
0
        SyntaxVisualizerToolWindowCommand(Microsoft.VisualStudio.Shell.Package package, ISyntaxVisualizerService service)
        {
            if (package == null)
            {
                throw new ArgumentNullException("package");
            }
            if (service == null)
            {
                throw new ArgumentNullException("service");
            }
            this.package = package;
            this.service = service;

            var commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (commandService != null)
            {
                var menuCommandID = new CommandID(CommandSet, CommandId);
                var menuItem      = new MenuCommand(this.ShowToolWindow, menuCommandID);
                commandService.AddCommand(menuItem);
            }
        }
Beispiel #2
0
 public static void Initialize(Microsoft.VisualStudio.Shell.Package package, ISyntaxVisualizerService service)
 {
     Instance = new SyntaxVisualizerToolWindowCommand(package, service);
 }
 public void Initialize(ISyntaxVisualizerService service)
 {
     viewModel.Initialize(service);
 }