/// <summary> /// Provide the menu commands that this command set handles /// </summary> /// <param name="commandList"></param> protected override void GetMenuCommands(IList commandList) { // Get the standard commands base.GetMenuCommands(commandList); // Add View Model Explorer command in the top-level menu. // Use a ContextBoundMenuCommand for this, because availability of the command is // based on whether or not the command context of our editor is active. MenuCommand menuCommand = new CommandContextBoundMenuCommand(this.ServiceProvider, new EventHandler(OnMenuViewModelExplorer), new CommandID(GuidList.guidFeatureModelLanguageCmdSet, (int)PackageCommandIdList.cmdIdViewExplorer), GuidList.guidEditorFactory); commandList.Add(menuCommand); MenuCommand Model2XMLMenuCommand = new CommandContextBoundMenuCommand(this.ServiceProvider, new EventHandler(OnCheckModelValidity), new CommandID(GuidList.guidFeatureModelLanguageCmdSet, (int)CustomCommandIdList.cmdIdGenerateXmlFromModel), GuidList.guidEditorFactory); commandList.Add(Model2XMLMenuCommand); // Add validation menu command menuCommand = new DynamicStatusMenuCommand(new EventHandler(OnStatusValidate), new EventHandler(OnMenuValidate), CommonModelingCommands.ValidateModel); commandList.Add(menuCommand); }
//private static readonly CommandID ShowDeployWindowCommand = new CommandID(new Guid(Constants.MVCVisualDesignerCommandSetId), 0x3003); protected override IList <MenuCommand> GetMenuCommands() { IList <MenuCommand> commands = base.GetMenuCommands(); // show model window MenuCommand menuCommand = new CommandContextBoundMenuCommand( this.ServiceProvider, (sender, e) => { if (this.ModelToolWindow != null) { this.ModelToolWindow.Show(); } }, ShowModelWindowCommand, typeof(MVCVisualDesignerEditorFactory).GUID); commands.Add(menuCommand); // generate code command menuCommand = new CommandContextBoundMenuCommand( this.ServiceProvider, onGenerateCodeCommand, generateCodeCommand, typeof(MVCVisualDesignerEditorFactory).GUID); commands.Add(menuCommand); return(commands); }
protected override IList<MenuCommand> GetMenuCommands() { IList <MenuCommand> commands = base.GetMenuCommands(); // AW Class Details ToolWindow MenuCommand toolWindowMenuCommand = new CommandContextBoundMenuCommand(this.ServiceProvider, OnMenuViewClassDetails, Constants.ViewClassDetailsCommand, typeof(ActiveWriterEditorFactory).GUID); commands.Add(toolWindowMenuCommand); return commands; }
protected override IList <MenuCommand> GetMenuCommands() { IList <MenuCommand> commands = base.GetMenuCommands(); // AW Class Details ToolWindow MenuCommand toolWindowMenuCommand = new CommandContextBoundMenuCommand(this.ServiceProvider, new EventHandler(OnMenuViewClassDetails), Constants.ViewClassDetailsCommand, typeof(ActiveWriterEditorFactory).GUID); commands.Add(toolWindowMenuCommand); return(commands); }
//private static readonly CommandID ShowDeployWindowCommand = new CommandID(new Guid(Constants.MVCVisualDesignerCommandSetId), 0x3003); protected override IList<MenuCommand> GetMenuCommands() { IList<MenuCommand> commands = base.GetMenuCommands(); // show model window MenuCommand menuCommand = new CommandContextBoundMenuCommand( this.ServiceProvider, (sender, e) => { if (this.ModelToolWindow != null) this.ModelToolWindow.Show(); }, ShowModelWindowCommand, typeof(MVCVisualDesignerEditorFactory).GUID); commands.Add(menuCommand); // generate code command menuCommand = new CommandContextBoundMenuCommand( this.ServiceProvider, onGenerateCodeCommand, generateCodeCommand, typeof(MVCVisualDesignerEditorFactory).GUID); commands.Add(menuCommand); return commands; }
/// <summary> /// Provide the menu commands that this command set handles /// </summary> /// <returns></returns> protected override IList <MenuCommand> GetMenuCommands() { IList <MenuCommand> commandList = base.GetMenuCommands(); // Ajout d'une ligne dans le menu show other windows pour afficher le repository MenuCommand menuCommand = new CommandContextBoundMenuCommand(this.ServiceProvider, new EventHandler(OnShowRepositoryToolWindow), new CommandID(new global::System.Guid(Constants.CandleCommandSetId), cmdIDShowRepositoryToolWindow), typeof(CandleEditorFactory).GUID); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusShowModel), new EventHandler(OnShowModel), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDShowModel)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusShowStrategies), new EventHandler(OnShowStrategies), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDShowStrategies)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusImplementAll), new EventHandler(OnImplementAll), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDImplementAll)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusImplementAll), new EventHandler(OnImplementAll), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDImplementAllG)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusImplementAll), new EventHandler(OnImplementAll), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDImplementAllT)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusImplement), new EventHandler(OnImplement), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDImplement)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusImportModels), new EventHandler(OnImportModels), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDImportModels)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusImportInterfaces), new EventHandler(OnImportInterfaces), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDImportInterfaces)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusArrangeShapes), new EventHandler(OnArrangeShapes), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDArrangeShape)); commandList.Add(menuCommand); //menuCommand = new DynamicStatusMenuCommand( // new EventHandler(OnStatusShowDataLayer), // new EventHandler(OnShowDataLayer), // new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDShowDataLayer)); //commandList.Add(menuCommand); //menuCommand = new DynamicStatusMenuCommand( // new EventHandler( OnStatusPropertyToAssociation ), // new EventHandler( OnPropertyToAssociation ), // new CommandID( new Guid(Constants.CandleCommandSetId), cmdIDPropertyToAssociation ) ); //commandList.Add( menuCommand ); //menuCommand = new DynamicStatusMenuCommand( // new EventHandler( OnStatusAssociationToProperty ), // new EventHandler( OnAssociationToProperty ), // new CommandID( new Guid(Constants.CandleCommandSetId), cmdIDAssociationToProperty ) ); //commandList.Add( menuCommand ); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusExportDiagramAsBitmap), new EventHandler(OnExportDiagramAsBitmap), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDExportDiagramAsBitmap)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusPublishModel), new EventHandler(OnPublishModel), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDPublishModel)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusPublishModel), new EventHandler(OnPublishModel), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDPublishModelG)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusPublishModel), new EventHandler(OnPublishModel), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDPublishModelT)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusPublishAsTemplate), new EventHandler(OnPublishAsTemplate), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDPublishAsTemplate)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusImportAssemblies), new EventHandler(OnImportAssemblies), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDImportAssemblies)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusShowDependencies), new EventHandler(OnShowDependencies), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDShowDependencies)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusModelAffectation), new EventHandler(OnModelAffectation), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDModelAffectation)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusManageArtifacts), new EventHandler(OnManageArtifacts), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDManageArtifacts)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusManageConfiguration), new EventHandler(OnManageConfiguration), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDManageConfigurations)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusImportWSDL), new EventHandler(OnImportWSDL), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDImportWSDL)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusCopy), new EventHandler(OnCopy), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDCopy)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusPaste), new EventHandler(OnPaste), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDPaste)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusGetLastVersion), new EventHandler(OnGetLastVersion), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDGetLastVersion)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusShowProperties), new EventHandler(OnShowProperties), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDShowProperties)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusImportXmi), new EventHandler(OnImportXmi), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDImportXmi)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusPropagateOperations), new EventHandler(OnPropagateOperations), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDPropagatesOperations)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusShowDocumentation), new EventHandler(OnShowDocumentation), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDShowDocumentation)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusShowRelationShips), new EventHandler(OnShowRelationShips), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDShowRelationShips)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusZoomIn), new EventHandler(OnZoomIn), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDZoomIn)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand( new EventHandler(OnStatusZoomOut), new EventHandler(OnZoomOut), new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDZoomOut)); commandList.Add(menuCommand); menuCommand = new DynamicStatusMenuCommand(OnStatusUpdateDotNetAssembly, OnUpdateDotNetAssembly, new CommandID(new Guid(Constants.CandleCommandSetId), cmdIDUpdateAssembly)); commandList.Add(menuCommand); //// Copy/Paste //AddPasteCommand(commandList); //AddCopyCommand(commandList); return(commandList); }