Skip to content

Instantly share code, notes, and snippets.

@praeclarum
Created March 15, 2011 05:22
Show Gist options
  • Save praeclarum/870347 to your computer and use it in GitHub Desktop.
Save praeclarum/870347 to your computer and use it in GitHub Desktop.
Multi file project operations for IPhone and MonoMac
diff --git a/extras/MonoDevelop.IPhone/MonoDevelop.IPhone/IPhoneProject.cs b/extras/MonoDevelop.IPhone/MonoDevelop.IPhone/IPhoneProject.cs
index c0010f1..a591e12 100644
--- a/extras/MonoDevelop.IPhone/MonoDevelop.IPhone/IPhoneProject.cs
+++ b/extras/MonoDevelop.IPhone/MonoDevelop.IPhone/IPhoneProject.cs
@@ -516,13 +516,18 @@ namespace MonoDevelop.IPhone
return;
}
- if (String.IsNullOrEmpty (MainNibFile) && Path.GetFileName (e.ProjectFile.FilePath) == "MainWindow.xib") {
- MainNibFile = e.ProjectFile.FilePath;
+ foreach (ProjectFileEventInfo info in e) {
+ if (String.IsNullOrEmpty (MainNibFile) && Path.GetFileName (info.ProjectFile.FilePath) == "MainWindow.xib") {
+ MainNibFile = info.ProjectFile.FilePath;
+ }
}
//find any related files, e.g codebehind
//FIXME: base this on the controller class names defined in the xib
- var filesToAdd = MonoDevelop.DesignerSupport.CodeBehind.GuessDependencies (this, e.ProjectFile, groupedExtensions);
+ var filesToAdd = new List<string> ();
+ foreach (ProjectFileEventInfo info in e) {
+ filesToAdd.AddRange (MonoDevelop.DesignerSupport.CodeBehind.GuessDependencies (this, info.ProjectFile, groupedExtensions));
+ }
//let the base fire the event before we add files
//don't want to fire events out of order of files being added
diff --git a/extras/MonoDevelop.MonoMac/MonoDevelop.MonoMac/MonoMacProject.cs b/extras/MonoDevelop.MonoMac/MonoDevelop.MonoMac/MonoMacProject.cs
index 63f10a9..10152fe 100644
--- a/extras/MonoDevelop.MonoMac/MonoDevelop.MonoMac/MonoMacProject.cs
+++ b/extras/MonoDevelop.MonoMac/MonoDevelop.MonoMac/MonoMacProject.cs
@@ -185,7 +185,10 @@ namespace MonoDevelop.MonoMac
//find any related files, e.g codebehind
//FIXME: base this on the controller class names defined in the xib
- var filesToAdd = MonoDevelop.DesignerSupport.CodeBehind.GuessDependencies (this, e.ProjectFile, groupedExtensions);
+ var filesToAdd = new List<string> ();
+ foreach (ProjectFileEventInfo info in e) {
+ filesToAdd.AddRange (MonoDevelop.DesignerSupport.CodeBehind.GuessDependencies (this, info.ProjectFile, groupedExtensions));
+ }
//let the base fire the event before we add files
//don't want to fire events out of order of files being added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment