Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2011-08-23 10:55:10 +0400
committerMike Krüger <mkrueger@xamarin.com>2011-08-23 10:55:10 +0400
commit6b3680ef10ea4362826607349c848ee07f89ddc8 (patch)
tree85607187df6974c376d0d142696e435eae530ec8 /main/src
parenta940fbee0995f03ab8c67b630642bf03d99647ad (diff)
No longer generate potentially wrong files when type resolving fails.
Diffstat (limited to 'main/src')
-rw-r--r--main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs7
-rw-r--r--main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeSyncedType.cs16
2 files changed, 17 insertions, 6 deletions
diff --git a/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs b/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs
index ec891fdd03..d15ec3c3f7 100644
--- a/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs
+++ b/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs
@@ -45,6 +45,11 @@ namespace MonoDevelop.MacDev.ObjCIntegration
ProjectDom dom;
bool needsUpdating;
+ public bool ContainsErrors {
+ get;
+ private set;
+ }
+
public NSObjectProjectInfo (ProjectDom dom, NSObjectInfoService infoService)
{
this.infoService = infoService;
@@ -76,6 +81,7 @@ namespace MonoDevelop.MacDev.ObjCIntegration
objcTypes.Clear ();
cliTypes.Clear ();
+ ContainsErrors = false;
foreach (var type in infoService.GetRegisteredObjects (dom)) {
objcTypes.Add (type.ObjCName, type);
@@ -197,6 +203,7 @@ namespace MonoDevelop.MacDev.ObjCIntegration
} else {
MessageService.ShowError (GettextCatalog.GetString ("Error while syncing object c type."),
string.Format (GettextCatalog.GetString ("Type '{0}' can't be resolved to a valid cli type."), outlet.ObjCType));
+ ContainsErrors = true;
outlet.CliType = outlet.ObjCType;
}
}
diff --git a/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeSyncedType.cs b/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeSyncedType.cs
index 8c836520c0..e0305162e4 100644
--- a/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeSyncedType.cs
+++ b/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeSyncedType.cs
@@ -96,12 +96,16 @@ namespace MonoDevelop.MacDev.XcodeSyncing
//FIXME: detect unresolved types
parsed.MergeCliInfo (objcType);
context.ProjectInfo.ResolveTypes (parsed);
-
- context.TypeSyncJobs.Add (new XcodeSyncObjcBackJob () {
- HFile = hFile,
- DesignerFile = objcType.GetDesignerFile (),
- Type = parsed,
- });
+ if (!context.ProjectInfo.ContainsErrors) {
+ context.TypeSyncJobs.Add (new XcodeSyncObjcBackJob () {
+ HFile = hFile,
+ DesignerFile = objcType.GetDesignerFile (),
+ Type = parsed,
+ });
+ } else {
+ context.SetSyncTimeToNow (Type.ObjCName + ".h");
+ LoggingService.LogWarning ("Sync back skipped because of errors in project info.");
+ }
}
const string supportingFilesGroup = "Supporting Files";