Ejemplo n.º 1
0
        public Gtk.Widget CreatePathWidget(int index)
        {
            PathEntry[] path = CurrentPath;
            if (null == path || 0 > index || path.Length <= index)
            {
                return(null);
            }

            object tag = path[index].Tag;

            DropDownBoxListWindow.IListDataProvider provider = null;
            if (tag is ParsedDocument)
            {
                provider = new CompilationUnitDataProvider(Document);
            }
            else
            {
                provider = new DataProvider(Document, tag, GetAmbience());
            }

            DropDownBoxListWindow window = new DropDownBoxListWindow(provider);

            window.SelectItem(tag);
            return(window);
        }
Ejemplo n.º 2
0
        public Control CreatePathWidget(int index)
        {
            PathEntry[] path = CurrentPath;
            if (null == path || 0 > index || path.Length <= index)
            {
                return(null);
            }

            object tag = path[index].Tag;

            DropDownBoxListWindow.IListDataProvider provider = null;
            if (tag is ParsedDocument)
            {
                provider = new CompilationUnitDataProvider(Editor, DocumentContext);
            }
            else
            {
                // TODO: Roslyn port
                //provider = new DataProvider (Editor, DocumentContext, tag, new NetAmbience ());
            }

            DropDownBoxListWindow window = new DropDownBoxListWindow(provider);

            window.SelectItem(tag);
            return(window);
        }
Ejemplo n.º 3
0
        public Gtk.Widget CreatePathWidget(int index)
        {
            PathEntry[] path = CurrentPath;
            if (null == path || 0 > index || path.Length <= index)
            {
                return(null);
            }

            object tag = path[index].Tag;

            DropDownBoxListWindow.IListDataProvider provider = null;
            if (!((tag is D_Parser.Dom.IBlockNode) || (tag is DEnumValue) || (tag is NoSelectionCustomNode)))
            {
                return(null);
            }
            provider = new EditorPathbarProvider(Document, tag);

            var window = new DropDownBoxListWindow(provider);

            window.SelectItem(tag);
            return(window);
        }