コード例 #1
0
ファイル: PluginMain.cs プロジェクト: Gr33z00/flashdevelop
 /// <summary>
 /// Creates the required menu items
 /// </summary>
 private void CreateMenuItems()
 {
     this.refactorMainMenu = new RefactorMenu(true);
     this.refactorMainMenu.RenameMenuItem.Click += this.RenameClicked;
     this.refactorMainMenu.OrganizeMenuItem.Click += this.OrganizeImportsClicked;
     this.refactorMainMenu.TruncateMenuItem.Click += this.TruncateImportsClicked;
     this.refactorMainMenu.ExtractMethodMenuItem.Click += this.ExtractMethodClicked;
     this.refactorMainMenu.DelegateMenuItem.Click += this.DelegateMethodsClicked;
     this.refactorMainMenu.ExtractLocalVariableMenuItem.Click += this.ExtractLocalVariableClicked;
     this.refactorMainMenu.CodeGeneratorMenuItem.Click += this.CodeGeneratorMenuItemClicked;
     this.refactorContextMenu = new RefactorMenu(false);
     this.refactorContextMenu.RenameMenuItem.Click += this.RenameClicked;
     this.refactorContextMenu.OrganizeMenuItem.Click += this.OrganizeImportsClicked;
     this.refactorContextMenu.TruncateMenuItem.Click += this.TruncateImportsClicked;
     this.refactorContextMenu.DelegateMenuItem.Click += this.DelegateMethodsClicked;
     this.refactorContextMenu.ExtractMethodMenuItem.Click += this.ExtractMethodClicked;
     this.refactorContextMenu.ExtractLocalVariableMenuItem.Click += this.ExtractLocalVariableClicked;
     this.refactorContextMenu.CodeGeneratorMenuItem.Click += this.CodeGeneratorMenuItemClicked;
     ContextMenuStrip editorMenu = PluginBase.MainForm.EditorMenu;
     this.surroundContextMenu = new SurroundMenu();
     editorMenu.Items.Insert(3, this.refactorContextMenu);
     editorMenu.Items.Insert(4, this.surroundContextMenu);
     PluginBase.MainForm.MenuStrip.Items.Insert(5, this.refactorMainMenu);
     ToolStripMenuItem searchMenu = PluginBase.MainForm.FindMenuItem("SearchMenu") as ToolStripMenuItem;
     this.viewReferencesItem = new ToolStripMenuItem(TextHelper.GetString("Label.FindAllReferences"), null, this.FindAllReferencesClicked);
     this.editorReferencesItem = new ToolStripMenuItem(TextHelper.GetString("Label.FindAllReferences"), null, this.FindAllReferencesClicked);
     PluginBase.MainForm.RegisterShortcutItem("SearchMenu.ViewReferences", this.viewReferencesItem);
     searchMenu.DropDownItems.Add(new ToolStripSeparator());
     searchMenu.DropDownItems.Add(this.viewReferencesItem);
     editorMenu.Items.Insert(7, this.editorReferencesItem);
 }
コード例 #2
0
ファイル: PluginMain.cs プロジェクト: heon21st/flashdevelop
 /// <summary>
 /// Creates the required menu items
 /// </summary>
 private void CreateMenuItems()
 {
     MenuStrip mainMenu = PluginBase.MainForm.MenuStrip;
     ContextMenuStrip editorMenu = PluginBase.MainForm.EditorMenu;
     this.refactorMainMenu = new RefactorMenu(this.settingObject, true);
     this.refactorMainMenu.RenameMenuItem.Click += new EventHandler(this.RenameClicked);
     this.refactorMainMenu.OrganizeMenuItem.Click += new EventHandler(this.OrganizeImportsClicked);
     this.refactorMainMenu.TruncateMenuItem.Click += new EventHandler(this.TruncateImportsClicked);
     this.refactorMainMenu.ExtractMethodMenuItem.Click += new EventHandler(this.ExtractMethodClicked);
     this.refactorMainMenu.DelegateMenuItem.Click += new EventHandler(this.DelegateMethodsClicked);
     this.refactorMainMenu.ExtractLocalVariableMenuItem.Click += new EventHandler(this.ExtractLocalVariableClicked);
     this.refactorContextMenu = new RefactorMenu(this.settingObject, false);
     this.refactorContextMenu.RenameMenuItem.Click += new EventHandler(this.RenameClicked);
     this.refactorContextMenu.OrganizeMenuItem.Click += new EventHandler(this.OrganizeImportsClicked);
     this.refactorContextMenu.TruncateMenuItem.Click += new EventHandler(this.TruncateImportsClicked);
     this.refactorContextMenu.DelegateMenuItem.Click += new EventHandler(this.DelegateMethodsClicked);
     this.refactorContextMenu.ExtractMethodMenuItem.Click += new EventHandler(this.ExtractMethodClicked);
     this.refactorContextMenu.ExtractLocalVariableMenuItem.Click += new EventHandler(this.ExtractLocalVariableClicked);
     this.surroundContextMenu = new SurroundMenu();
     editorMenu.Opening += new CancelEventHandler(this.EditorMenuOpening);
     mainMenu.MenuActivate += new EventHandler(this.MainMenuActivate);
     editorMenu.Items.Insert(3, this.refactorContextMenu);
     editorMenu.Items.Insert(4, this.surroundContextMenu);
     mainMenu.Items.Insert(5, this.refactorMainMenu);
     ToolStripMenuItem searchMenu = PluginBase.MainForm.FindMenuItem("SearchMenu") as ToolStripMenuItem;
     this.viewReferencesItem = new ToolStripMenuItem(TextHelper.GetString("Label.FindAllReferences"), null, new EventHandler(this.FindAllReferencesClicked));
     this.editorReferencesItem = new ToolStripMenuItem(TextHelper.GetString("Label.FindAllReferences"), null, new EventHandler(this.FindAllReferencesClicked));
     this.editorReferencesItem.ShortcutKeys = this.settingObject.FindRefsShortcut;
     this.viewReferencesItem.ShortcutKeys = this.settingObject.FindRefsShortcut;
     searchMenu.DropDownItems.Add(new ToolStripSeparator());
     searchMenu.DropDownItems.Add(this.viewReferencesItem);
     editorMenu.Items.Insert(7, this.editorReferencesItem);
     this.ApplyIgnoredKeys();
 }