public override IViewContent CreateContentForUri (string fileName)
		{
			excludeThis = true;
			var db = DisplayBindingService.GetDefaultBindingForUri (fileName);
			GuiBuilderView view = new GuiBuilderView (db.CreateContentForUri (fileName), GetWindow (fileName));
			excludeThis = false;
			return view;
		}
Esempio n. 2
0
        public override IViewContent CreateContentForUri(string fileName)
        {
            excludeThis = true;
            var            db   = DisplayBindingService.GetDefaultBindingForUri(fileName);
            GuiBuilderView view = new GuiBuilderView(db.CreateContentForUri(fileName), GetWindow(fileName));

            excludeThis = false;
            return(view);
        }
		public IViewContent CreateContent (MonoDevelop.Core.FilePath fileName, string mimeType, Project ownerProject)
		{
			excludeThis = true;
			var db = DisplayBindingService.GetDefaultViewBinding (fileName, mimeType, ownerProject);
			var content = db.CreateContent (fileName, mimeType, ownerProject);
			GuiBuilderView view = new GuiBuilderView (content, GetWindow (fileName));
			excludeThis = false;
			return view;
		}
        public IViewContent CreateContent(MonoDevelop.Core.FilePath fileName, string mimeType, Project ownerProject)
        {
            excludeThis = true;
            var            db      = DisplayBindingService.GetDefaultViewBinding(fileName, mimeType, ownerProject);
            var            content = db.CreateContent(fileName, mimeType, ownerProject);
            GuiBuilderView view    = new GuiBuilderView(content, GetWindow(fileName));

            excludeThis = false;
            return(view);
        }
Esempio n. 5
0
        //static void OnAssemblyInfoChanged (object s, AssemblyInformationEventArgs args)
//		{
        //SteticApp.UpdateWidgetLibraries (false);
//		}

        internal static void AddCurrentWidgetToClass()
        {
            if (IdeApp.Workbench.ActiveDocument != null)
            {
                GuiBuilderView view = IdeApp.Workbench.ActiveDocument.GetContent <GuiBuilderView> ();
                if (view != null)
                {
                    view.AddCurrentWidgetToClass();
                }
            }
        }
        public override async Task <DocumentController> CreateController(FileDescriptor file, DocumentControllerDescription controllerDescription)
        {
            var window = GetWindow(file.FilePath, (Project)file.Owner);

            if (window == null)
            {
                throw new InvalidOperationException("GetWindow == null");
            }
            var view = new GuiBuilderView(window);

            return(view);
        }
		public IViewContent CreateContent (MonoDevelop.Core.FilePath fileName, string mimeType, Project ownerProject)
		{
			excludeThis = true;
			var db = DisplayBindingService.GetDefaultViewBinding (fileName, mimeType, ownerProject);
			var content = db.CreateContent (fileName, mimeType, ownerProject);
			var window = GetWindow (fileName, ownerProject);
			if (window == null)
				throw new InvalidOperationException ("GetWindow == null");
			GuiBuilderView view = new GuiBuilderView (content, window);
			excludeThis = false;
			return view;
		}
        public ViewContent CreateContent(MonoDevelop.Core.FilePath fileName, string mimeType, Project ownerProject)
        {
            excludeThis = true;
            var db      = DisplayBindingService.GetDefaultViewBinding(fileName, mimeType, ownerProject);
            var content = db.CreateContent(fileName, mimeType, ownerProject);
            var window  = GetWindow(fileName, ownerProject);

            if (window == null)
            {
                throw new InvalidOperationException("GetWindow == null");
            }
            GuiBuilderView view = new GuiBuilderView(content, window);

            excludeThis = false;
            return(view);
        }
        public IEnumerable <ItemToolboxNode> GetDynamicItems(IToolboxConsumer consumer)
        {
            GuiBuilderView view = consumer as GuiBuilderView;

            if (view == null)
            {
                return(null);
            }

            ComponentType[] types = view.GetComponentTypes();
            if (types == null)
            {
                return(null);
            }

            Hashtable refs     = new Hashtable();
            Hashtable projects = new Hashtable();
            string    of       = FileService.GetFullPath(view.Project.GetOutputFileName(IdeApp.Workspace.ActiveConfiguration));

            projects [of] = view.Project.Name;
            foreach (ProjectReference pr in ((DotNetProject)view.Project).References)
            {
                foreach (string f in pr.GetReferencedFileNames(IdeApp.Workspace.ActiveConfiguration))
                {
                    if (pr.ReferenceType == ReferenceType.Project)
                    {
                        projects[FileService.GetFullPath(f)] = pr.Reference;
                    }
                    else
                    {
                        refs[FileService.GetFullPath(f)] = f;
                    }
                }
            }

            List <ItemToolboxNode> list = new List <ItemToolboxNode> ();

            foreach (ComponentType type in types)
            {
                if (type.Category == "window")
                {
                    continue;
                }

                string fullName = null;
                if (!String.IsNullOrEmpty(type.Library))
                {
                    fullName = FileService.GetFullPath(type.Library);
                }

                if (type.ClassName == "Gtk.Action" || (fullName != null && refs.Contains(fullName)))
                {
                    ComponentToolboxNode node = new ComponentToolboxNode(type);
                    list.Add(node);
                }
                else if (fullName != null && projects.Contains(fullName))
                {
                    ComponentToolboxNode node = new ComponentToolboxNode(type);
                    node.Category = (string)projects [fullName];
                    list.Add(node);
                }
            }
            list.Sort();
            return(list);
        }