public ClassBrowserPadWidget(ExtensibleTreeView treeView, IPadWindow window)
        {
            this.treeView = treeView;
            PackStart(treeView, true, true, 0);

            IdeApp.Workspace.WorkspaceItemOpened += OnOpenCombine;
            IdeApp.Workspace.WorkspaceItemClosed += OnCloseCombine;

            this.ShowAll();
        }
        public ClassBrowserPadWidget(ExtensibleTreeView treeView, IPadWindow window)
        {
            this.treeView = treeView;

            DockItemToolbar searchBox = window.GetToolbar(PositionType.Top);

            searchEntry = new Entry();
            searchBox.Add(searchEntry, true);
            buttonSearch              = new Button(new Gtk.Image(Gtk.Stock.Find, IconSize.Menu));
            buttonSearch.Relief       = ReliefStyle.None;
            buttonCancelSearch        = new Button(new Gtk.Image(Gtk.Stock.Stop, IconSize.Menu));
            buttonCancelSearch.Relief = ReliefStyle.None;
            searchBox.Add(buttonSearch);
            searchBox.Add(buttonCancelSearch);
            searchBox.ShowAll();

            notebook            = new Notebook();
            notebook.ShowTabs   = false;
            notebook.ShowBorder = false;
            this.PackEnd(notebook, true, true, 0);

            notebook.AppendPage(treeView, null);
            ScrolledWindow scrolledWindow = new ScrolledWindow();

            scrolledWindow.Add(searchResultsTreeView);
            notebook.AppendPage(scrolledWindow, null);

            list = new ListStore(new Type[] {
                typeof(Pixbuf),
                typeof(string),
                typeof(IType)
            });
            model = new TreeModelSort(list);
            searchResultsTreeView.Model = model;
            searchResultsTreeView.AppendColumn(string.Empty, new Gtk.CellRendererPixbuf(), "pixbuf", 0);
            searchResultsTreeView.AppendColumn(string.Empty, new Gtk.CellRendererText(), "text", 1);
            searchResultsTreeView.HeadersVisible  = false;
            searchResultsTreeView.RowActivated   += SearchRowActivated;
            IdeApp.Workspace.WorkspaceItemOpened += OnOpenCombine;
            IdeApp.Workspace.WorkspaceItemClosed += OnCloseCombine;

            this.searchEntry.Changed        += SearchEntryChanged;
            this.buttonCancelSearch.Clicked += CancelSearchClicked;
            this.searchEntry.Activated      += SearchClicked;
            this.searchEntry.KeyPressEvent  += SearchEntryKeyPressEvent;
            this.buttonSearch.Clicked       += SearchClicked;

            this.ShowAll();
        }
        static void SelectFile(ExtensibleTreeView treeView, DnxProject project, string file)
        {
            var projectFile = project.Files.GetFile(file);

            if (projectFile == null)
            {
                return;
            }

            ITreeNavigator navigator = treeView.GetNodeAtObject(projectFile, true);

            if (navigator != null)
            {
                navigator.ExpandToNode();
                navigator.Selected = true;
            }
        }
        public ExtensionModelBrowserWidget()
        {
            this.Build();
            NodeBuilder[] builders = new NodeBuilder [] {
                new ExtensionNodeBuilder(),
                new ExtensionNodeNodeBuilder(),
                new ExtensionPointNodeBuilder(),
                new AddinNodeBuilder(),
                new SolutionNodeBuilder(true),
                new RegistryNodeBuilder(),
                new AddinCategoryNodeBuilder(),
                new MonoDevelop.Ide.Gui.Pads.ProjectPad.WorkspaceNodeBuilder(),
                new MonoDevelop.Ide.Gui.Pads.ProjectPad.SolutionFolderNodeBuilder()
            };
            TreePadOption[] options = new TreePadOption [] {
                new TreePadOption("ShowExistingNodes", GettextCatalog.GetString("Show existing nodes"), true)
            };

            tree = new ExtensibleTreeView(builders, options);
            tree.ShowAll();
            paned.Add1(tree);

            foreach (Solution sol in IdeApp.Workspace.GetAllSolutions())
            {
                AddSolution(sol);
            }

            docView = new Gtk.Label();
            paned.Add2(docView);

            tree.ShadowType              = Gtk.ShadowType.In;
            tree.Tree.Selection.Changed += HandleSelectionChanged;

            AddinAuthoringService.RegistryChanged  += OnRegistryChanged;
            IdeApp.Workspace.WorkspaceItemLoaded   += OnSolutionLoaded;
            IdeApp.Workspace.WorkspaceItemUnloaded += OnSolutionUnloaded;
        }
        public AssemblyBrowserWidget()
        {
            this.Build();
            TreeView = new ExtensibleTreeView(new NodeBuilder[]   {
                new ErrorNodeBuilder(),
                new AssemblyNodeBuilder(this),
                new ModuleReferenceNodeBuilder(),
                new ModuleDefinitionNodeBuilder(this),
                new ReferenceFolderNodeBuilder(this),
                new ResourceFolderNodeBuilder(),
                new ResourceNodeBuilder(),
                new NamespaceBuilder(this),
                new DomTypeNodeBuilder(this),
                new DomMethodNodeBuilder(this),
                new DomFieldNodeBuilder(this),
                new DomEventNodeBuilder(this),
                new DomPropertyNodeBuilder(this),
                new BaseTypeFolderNodeBuilder(this),
                new DomReturnTypeNodeBuilder(this),
                new ReferenceNodeBuilder(this),
            }, new TreePadOption [] {
                new TreePadOption("PublicApiOnly", GettextCatalog.GetString("Show public members only"), true)
            });
            TreeView.Tree.Selection.Mode = Gtk.SelectionMode.Single;
            TreeView.Tree.CursorChanged += HandleCursorChanged;

            TreeView.ShadowType = ShadowType.In;
            treeViewPlaceholder.Add(TreeView);
            treeViewPlaceholder.ShowAll();

//			this.descriptionLabel.ModifyFont (Pango.FontDescription.FromString ("Sans 9"));
            this.documentationLabel.ModifyFont(Pango.FontDescription.FromString("Sans 12"));
            this.documentationLabel.ModifyBg(Gtk.StateType.Normal, new Gdk.Color(255, 255, 225));
            this.documentationLabel.Wrap = true;

            Mono.TextEditor.TextEditorOptions options = new Mono.TextEditor.TextEditorOptions();
            options.FontName             = PropertyService.Get <string> ("FontName");
            options.ShowFoldMargin       = false;
            options.ShowIconMargin       = false;
            options.ShowInvalidLines     = false;
            options.ShowLineNumberMargin = false;
            options.ShowSpaces           = false;
            options.ShowTabs             = false;
            options.HighlightCaretLine   = true;
            options.ColorScheme          = PropertyService.Get("ColorScheme", "Default");
            this.inspectEditor.Options   = options;

            PropertyService.PropertyChanged       += HandlePropertyChanged;
            this.inspectEditor.Document.ReadOnly   = true;
            this.inspectEditor.Document.SyntaxMode = new Mono.TextEditor.Highlighting.MarkupSyntaxMode();
            this.inspectEditor.LinkRequest        += InspectEditorhandleLinkRequest;

//			this.inspectLabel.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (255, 255, 250));

//			this.vpaned1.ExposeEvent += VPaneExpose;
            this.hpaned1.ExposeEvent += HPaneExpose;

/*			this.notebook1.SwitchPage += delegate {
 *                              // Hack for the switch page select all bug.
 * //				this.inspectLabel.Selectable = false;
 *                      };*/
            this.notebook1.GetNthPage(0).Hide();
            this.languageCombobox.AppendText(GettextCatalog.GetString("Summary"));
            this.languageCombobox.AppendText(GettextCatalog.GetString("IL"));
            this.languageCombobox.AppendText(GettextCatalog.GetString("C#"));
            this.languageCombobox.Active          = PropertyService.Get("AssemblyBrowser.InspectLanguage", 2);
            this.languageCombobox.Changed        += LanguageComboboxhandleChanged;
            this.searchentry1.Ready               = true;
            this.searchentry1.WidthRequest        = 200;
            this.searchentry1.Visible             = true;
            this.searchentry1.EmptyMessage        = GettextCatalog.GetString("Search for types or members");
            this.searchentry1.InnerEntry.Changed += SearchEntryhandleChanged;

            CheckMenuItem checkMenuItem = this.searchentry1.AddFilterOption(0, GettextCatalog.GetString("Types"));

            checkMenuItem.Active   = true;
            checkMenuItem.Toggled += delegate {
                if (checkMenuItem.Active)
                {
                    searchMode = AssemblyBrowserWidget.SearchMode.Type;
                    CreateColumns();
                    StartSearch();
                }
            };

            CheckMenuItem checkMenuItem1 = this.searchentry1.AddFilterOption(1, GettextCatalog.GetString("Members"));

            checkMenuItem1.Toggled += delegate {
                if (checkMenuItem1.Active)
                {
                    searchMode = AssemblyBrowserWidget.SearchMode.Member;
                    CreateColumns();
                    StartSearch();
                }
            };
            comboboxVisibilty.InsertText(0, GettextCatalog.GetString("Only public members"));
            comboboxVisibilty.InsertText(1, GettextCatalog.GetString("All members"));
            comboboxVisibilty.Active   = 0;
            comboboxVisibilty.Changed += delegate {
                PublicApiOnly = comboboxVisibilty.Active == 0;
                this.TreeView.GetRootNode().Options["PublicApiOnly"] = PublicApiOnly;
                FillInspectLabel();
            };

            /*
             * this.searchInCombobox.Active = 0;
             * this.searchInCombobox.Changed += SearchInComboboxhandleChanged;
             */
            this.notebook1.SetTabLabel(this.documentationScrolledWindow, new Label(GettextCatalog.GetString("Documentation")));
            this.notebook1.SetTabLabel(this.vboxInspect, new Label(GettextCatalog.GetString("Inspect")));
            this.notebook1.SetTabLabel(this.searchWidget, new Label(GettextCatalog.GetString("Search")));
            //this.searchWidget.Visible = false;

            typeListStore = new Gtk.ListStore(typeof(Gdk.Pixbuf),               // type image
                                              typeof(string),                   // name
                                              typeof(string),                   // namespace
                                              typeof(string),                   // assembly
                                              typeof(IMember)
                                              );

            memberListStore = new Gtk.ListStore(typeof(Gdk.Pixbuf),             // member image
                                                typeof(string),                 // name
                                                typeof(string),                 // Declaring type full name
                                                typeof(string),                 // assembly
                                                typeof(IMember)
                                                );
            CreateColumns();
            SetInpectWidget();
//			this.searchEntry.Changed += SearchEntryhandleChanged;
            this.searchTreeview.RowActivated += SearchTreeviewhandleRowActivated;
            this.searchentry1.ShowAll();
            this.buttonBack.Clicked     += this.OnNavigateBackwardActionActivated;
            this.buttonForeward.Clicked += this.OnNavigateForwardActionActivated;
        }