void CheckFileChanges(ProjectFileEventArgs e) { bool updateTypes = false, updateProject = false; foreach (ProjectFileEventInfo finfo in e) { if (finfo.Project != dnp) { continue; } if (finfo.ProjectFile.BuildAction == BuildAction.Compile) { updateTypes = true; } else if (IncludeInSyncedProject(finfo.ProjectFile)) { updateProject = true; } } if (updateTypes) { using (var monitor = GetStatusMonitor(GettextCatalog.GetString("Syncing types to Xcode..."))) { //FIXME: make this async (and safely async) //FIXME: only update the project if obj-c types change updateProject |= UpdateTypes(monitor); } } if (updateProject) { using (var monitor = GetStatusMonitor(GettextCatalog.GetString("Syncing project to Xcode..."))) { //FIXME: make this async (and safely async) var running = xcode.CheckRunning(); UpdateXcodeProject(monitor); if (running) { try { xcode.OpenProject(monitor); } catch (AppleScriptException) { ShowXcodeScriptError(); } catch (TimeoutException) { ShowXcodeScriptError(); } } } } }
void CheckFileChanges(ProjectFileEventArgs e) { if (!syncing) { return; } XC4Debug.Log("Checking for changed files"); bool updateTypes = false, updateProject = false; foreach (ProjectFileEventInfo finf in e) { if (finf.Project != dnp) { continue; } if (finf.ProjectFile.BuildAction == BuildAction.Compile) { updateTypes = true; } else if (IncludeInSyncedProject(finf.ProjectFile)) { updateProject = true; } } if (updateTypes) { using (var monitor = GetStatusMonitor(GettextCatalog.GetString("Syncing types to Xcode..."))) { //FIXME: make this async (and safely async) //FIXME: only update the project if obj-c types change updateProject |= UpdateTypes(monitor, true); } } if (updateProject) { using (var monitor = GetStatusMonitor(GettextCatalog.GetString("Syncing project to Xcode..."))) { //FIXME: make this async (and safely async) var running = xcode.CheckRunning(); UpdateXcodeProject(monitor); if (running) { xcode.OpenProject(); } } } }