void SearchTreeviewhandleRowActivated(object o, RowActivatedArgs args) { Gtk.TreeIter selectedIter; if (searchTreeview.Selection.GetSelected(out selectedIter)) { MonoDevelop.Projects.Dom.IMember member = (MonoDevelop.Projects.Dom.IMember)(searchMode != SearchMode.Type ? memberListStore.GetValue(selectedIter, 4) : typeListStore.GetValue(selectedIter, 4)); ITreeNavigator nav = SearchMember(member); if (nav != null) { nav.ExpandToNode(); nav.Selected = true; } if (searchMode == SearchMode.Disassembler) { this.notebook1.Page = 0; // int idx = DomMethodNodeBuilder.Disassemble ((DomCecilMethod)member, false).ToUpper ().IndexOf (searchEntry.Text.ToUpper ()); // this.inspectLabel.Selectable = true; // this.inspectLabel.SelectRegion (idx, idx + searchEntry.Text.Length); } if (searchMode == SearchMode.Decompiler) { this.notebook1.Page = 1; // int idx = DomMethodNodeBuilder.Decompile ((DomCecilMethod)member, false).ToUpper ().IndexOf (searchEntry.Text.ToUpper ()); // this.inspectLabel.Selectable = true; // this.inspectLabel.SelectRegion (idx, idx + searchEntry.Text.Length); } } }
static bool HasNonMethodMembersWithSameName(MonoDevelop.Projects.Dom.IMember member) { var type = member.DeclaringType; foreach (var t in type.SourceProjectDom.GetInheritanceTree(type)) { if (t.SearchMember(member.Name, true).Any(m => m.MemberType != MonoDevelop.Projects.Dom.MemberType.Method)) { return(true); } } return(false); }
void HandleCursorChanged(object sender, EventArgs e) { if (!inNavigationOperation) { if (currentItem != null) { navigationBackwardHistory.Push(currentItem); } currentItem = TreeView.GetSelectedNode(); ActiveMember = currentItem.DataItem as IMember; navigationForwardHistory.Clear(); } UpdateNavigationActions(); CreateOutput(); }
protected override void OnDestroyed () { if (searchBackgoundWorker != null && searchBackgoundWorker.IsBusy) { searchBackgoundWorker.CancelAsync (); searchBackgoundWorker.Dispose (); searchBackgoundWorker = null; } if (this.TreeView != null) { // Dispose (TreeView.GetRootNode ()); TreeView.Tree.CursorChanged -= HandleCursorChanged; this.TreeView.Clear (); this.TreeView = null; } if (definitions != null) { definitions.Clear (); definitions = null; } ActiveMember = null; if (memberListStore != null) { memberListStore.Dispose (); memberListStore = null; } if (typeListStore != null) { typeListStore.Dispose (); typeListStore = null; } if (documentationPanel != null) { documentationPanel.Destroy (); documentationPanel = null; } if (inspectEditor != null) { inspectEditor.LinkRequest -= InspectEditorhandleLinkRequest; inspectEditor.Destroy (); inspectEditor = null; } if (this.UIManager != null) { this.UIManager.Dispose (); this.UIManager = null; } this.languageCombobox.Changed -= LanguageComboboxhandleChanged; // this.searchInCombobox.Changed -= SearchInComboboxhandleChanged; // this.searchEntry.Changed -= SearchEntryhandleChanged; this.searchTreeview.RowActivated -= SearchTreeviewhandleRowActivated; hpaned1.ExposeEvent -= HPaneExpose; PropertyService.PropertyChanged -= HandlePropertyChanged; base.OnDestroyed (); }
void HandleCursorChanged (object sender, EventArgs e) { if (!inNavigationOperation) { if (currentItem != null) navigationBackwardHistory.Push (currentItem); currentItem = TreeView.GetSelectedNode (); ActiveMember = currentItem.DataItem as IMember; navigationForwardHistory.Clear (); } UpdateNavigationActions (); CreateOutput (); }
protected override void OnDestroyed() { if (searchBackgoundWorker != null && searchBackgoundWorker.IsBusy) { searchBackgoundWorker.CancelAsync(); searchBackgoundWorker.Dispose(); searchBackgoundWorker = null; } if (this.TreeView != null) { // Dispose (TreeView.GetRootNode ()); TreeView.Tree.CursorChanged -= HandleCursorChanged; this.TreeView.Clear(); this.TreeView = null; } if (definitions != null) { definitions.Clear(); definitions = null; } ActiveMember = null; if (memberListStore != null) { memberListStore.Dispose(); memberListStore = null; } if (typeListStore != null) { typeListStore.Dispose(); typeListStore = null; } if (documentationPanel != null) { documentationPanel.Destroy(); documentationPanel = null; } if (inspectEditor != null) { inspectEditor.LinkRequest -= InspectEditorhandleLinkRequest; inspectEditor.Destroy(); inspectEditor = null; } if (this.UIManager != null) { this.UIManager.Dispose(); this.UIManager = null; } this.languageCombobox.Changed -= LanguageComboboxhandleChanged; // this.searchInCombobox.Changed -= SearchInComboboxhandleChanged; // this.searchEntry.Changed -= SearchEntryhandleChanged; this.searchTreeview.RowActivated -= SearchTreeviewhandleRowActivated; hpaned1.ExposeEvent -= HPaneExpose; PropertyService.PropertyChanged -= HandlePropertyChanged; base.OnDestroyed(); }