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-22 12:43:27 +0400
committerMike Krüger <mkrueger@xamarin.com>2011-08-22 12:43:56 +0400
commit939f7206e5571b2279f2cb82536f1c63858ce251 (patch)
tree1a6c7132713ae8bb60c20ef3c9b756e3845c7beb /main/src
parenta3013e320b62f5f7999a9f97880c8cbabbdb7145 (diff)
Added error for the unlikely case that the objctype can't be parsed
correctly. see 'Bug 337 - MonoDevelop 2.8a1 its not synching correctly with Xcode 4 xibs' That should never happen at this place.
Diffstat (limited to 'main/src')
-rw-r--r--main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs b/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs
index 4033db0abd..dc0d68f320 100644
--- a/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs
+++ b/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs
@@ -32,6 +32,8 @@ using System.Text.RegularExpressions;
using MonoDevelop.Projects;
using MonoDevelop.Projects.Dom;
using MonoDevelop.Projects.Dom.Parser;
+using MonoDevelop.Ide;
+using MonoDevelop.Core;
namespace MonoDevelop.MacDev.ObjCIntegration
{
@@ -244,10 +246,16 @@ namespace MonoDevelop.MacDev.ObjCIntegration
var split = def.Split (whitespaceChars, StringSplitOptions.RemoveEmptyEntries);
if (split.Length != 2)
continue;
- string objcType = split[1].TrimStart ('*');
+ string objcName = split[1].TrimStart ('*');
+ string objcType = split[0].TrimEnd ('*');
if (objcType == "id")
objcType = "NSObject";
- type.Outlets.Add (new IBOutlet ((objcType), null, split[0].TrimEnd ('*'), null));
+ if (string.IsNullOrEmpty (objcType)) {
+ MessageService.ShowError (GettextCatalog.GetString ("Error while parsing header file."),
+ string.Format (GettextCatalog.GetString ("The definition '{0}' can't be parsed."), def));
+ objcType = "NSObject";
+ }
+ type.Outlets.Add (new IBOutlet (objcName, null, objcType, null));
} else {
string[] split = def.Split (colonChar);
var action = new IBAction (split[0].Trim (), null);