void HandleProjectChanged(object sender, ProjectFileEventArgs e)
 {
     if (e.Any(f => f.ProjectFile.FilePath == DocumentContext.Name))
     {
         UpdateOwnerProjects();
     }
 }
Exemplo n.º 2
0
        void FileRemovedFromProject(object sender, ProjectFileEventArgs e)
        {
            lock (xcode_lock) {
                if (!SyncingEnabled)
                {
                    return;
                }

                XC4Debug.Log("Files removed from project '{0}'", dnp.Name);
                foreach (var file in e)
                {
                    XC4Debug.Log("   * Removed: {0}", file.ProjectFile.ProjectVirtualPath);
                }

                XC4Debug.Indent();
                try {
                    if (e.Any(finf => finf.Project == dnp && IsInterfaceDefinition(finf.ProjectFile)))
                    {
                        if (!dnp.Files.Any(IsInterfaceDefinition))
                        {
                            XC4Debug.Log("Last Interface Definition file removed from '{0}', disabling Xcode sync.", dnp.Name);
                            DisableSyncing(true);
                            return;
                        }
                    }
                } finally {
                    XC4Debug.Unindent();
                }

                CheckFileChanges(e);
            }
        }
Exemplo n.º 3
0
        void FilePropertyChangedInProject(object sender, ProjectFileEventArgs e)
        {
            if (!syncing && e.Any(finf => IsPage(finf.ProjectFile)))
            {
                EnableSyncing();
            }

            if (!xcodeProjectDirty && syncing && e.Any(finf => IsContent(finf.ProjectFile)))
            {
                xcodeProjectDirty = true;
            }

            if (syncing)
            {
                UpdateTypes(true);
            }

            UpdateXcodeProject();
        }
Exemplo n.º 4
0
        void FilePropertyChangedInProject(object sender, ProjectFileEventArgs e)
        {
            if (!xcodeProjectDirty && syncing && e.Any(finf => IsContent(finf.ProjectFile)))
            {
                xcodeProjectDirty = true;
            }

            //FIXME: make this async
            UpdateTypes(true);
            UpdateXcodeProject();
        }
Exemplo n.º 5
0
        protected override void OnFilePropertyChangedInProject(ProjectFileEventArgs e)
        {
            base.OnFilePropertyChangedInProject(e);
            if (Loading)
            {
                return;
            }

            if (e.Any(f => f.ProjectFile.BuildAction == MonoDroidBuildAction.AndroidResource))
            {
                QueueResgenUpdate();
            }
        }
Exemplo n.º 6
0
        void FileRemovedFromProject(object sender, ProjectFileEventArgs e)
        {
            if (syncing && e.Any(finf => finf.Project == dnp && IsInterfaceDefinition(finf.ProjectFile)))
            {
                if (!dnp.Files.Any(IsInterfaceDefinition))
                {
                    XC4Debug.Log("All page files removed, disabling sync");
                    DisableSyncing();
                    return;
                }
            }

            CheckFileChanges(e);
        }
Exemplo n.º 7
0
        void FileRemovedFromProject(object sender, ProjectFileEventArgs e)
        {
            //FIXME: do we need to disable syncing here?
            if (syncing && e.Any(finf => IsPage(finf.ProjectFile)))
            {
                if (!dnp.Files.Any(IsPage))
                {
                    DisableSyncing();
                }
            }

            //FIXME: make this async
            UpdateTypes(true);
        }
Exemplo n.º 8
0
        void FileAddedToProject(object sender, ProjectFileEventArgs e)
        {
            if (!syncing && e.Any(finf => IsPage(finf.ProjectFile)))
            {
                EnableSyncing();
            }

            if (syncing)
            {
                UpdateTypes(true);
            }

            UpdateXcodeProject();
        }
Exemplo n.º 9
0
        void FileRemovedFromProject(object sender, ProjectFileEventArgs e)
        {
            if (syncing && e.Any(finf => IsPage(finf.ProjectFile)))
            {
                if (!dnp.Files.Any(IsPage))
                {
                    DisableSyncing();
                }
            }

            if (syncing)
            {
                UpdateTypes(true);
            }
        }
        void OnFilePropertyChangedInProject(object sender, ProjectFileEventArgs args)
        {
            var pad = IdeApp.Workbench.GetPad <PropertyPad> ();

            if (pad == null)
            {
                return;
            }

            var grid = ((PropertyPad)pad.Content).PropertyGrid;

            if (args.Any(arg => arg.ProjectFile == file))
            {
                grid.Refresh();
            }
        }
Exemplo n.º 11
0
        void OnFilePropertyChangedInProject(object sender, ProjectFileEventArgs args)
        {
            var pad = IdeApp.Workbench.GetPad <PropertyPad> ();

            if (pad == null)
            {
                return;
            }

            var grid = ((PropertyPad)pad.Content).PropertyGrid;

            if (grid.IsEditing)
            {
                return;
            }

            if (args.Any(arg => arg.ProjectFile == file))
            {
                grid.Populate(saveEditSession: false);
            }
        }