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
diff options
context:
space:
mode:
authorMichael Hutchinson <m.j.hutchinson@gmail.com>2011-11-09 00:43:48 +0400
committerMichael Hutchinson <m.j.hutchinson@gmail.com>2011-11-09 00:43:48 +0400
commitd2fcfcaa3b92b8d609001be38238ff9b728dd13c (patch)
tree9e67266af93ec2eb786f3ca4496be9387d1d6767 /main/src/addins/MonoDevelop.MacDev
parent3d7a7f93a50819a5089e21bfedd332dc08d4f0ce (diff)
parent0b16444d2f4006eb7b46617b304bc568630033fe (diff)
Merge remote-tracking branch 'origin/master' into macgtk
Conflicts: main/src/addins/MonoDevelop.MacDev/Makefile.am
Diffstat (limited to 'main/src/addins/MonoDevelop.MacDev')
-rw-r--r--main/src/addins/MonoDevelop.MacDev/BindingProject/ObjcBindingProject.cs111
-rw-r--r--main/src/addins/MonoDevelop.MacDev/BindingProject/ObjcBindingProjectConfiguration.cs46
-rw-r--r--main/src/addins/MonoDevelop.MacDev/Makefile.am2
-rw-r--r--main/src/addins/MonoDevelop.MacDev/MonoDevelop.MacDev.csproj3
-rw-r--r--main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs2
5 files changed, 163 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.MacDev/BindingProject/ObjcBindingProject.cs b/main/src/addins/MonoDevelop.MacDev/BindingProject/ObjcBindingProject.cs
new file mode 100644
index 0000000000..7f2ae6f03a
--- /dev/null
+++ b/main/src/addins/MonoDevelop.MacDev/BindingProject/ObjcBindingProject.cs
@@ -0,0 +1,111 @@
+//
+// ObjcBindingProject.cs
+//
+// Author: Jeffrey Stedfast <jeff@xamarin.com>
+//
+// Copyright (c) 2011 Xamarin Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+using System.Xml;
+using System.Collections.Generic;
+
+using MonoDevelop.Core;
+using MonoDevelop.Projects;
+using MonoDevelop.Core.Assemblies;
+
+using MonoDevelop.MacDev.NativeReferences;
+
+namespace MonoDevelop.MacDev.BindingProject
+{
+ static class ObjcBindingBuildAction
+ {
+ public static readonly string ApiDefinition = "ObjcBindingApiDefinition";
+ public static readonly string CoreSource = "ObjcBindingCoreSource";
+ public static readonly string NativeLibrary = "ObjcBindingNativeLibrary";
+ }
+
+ public class ObjcBindingProject : DotNetProject
+ {
+ public ObjcBindingProject ()
+ {
+ }
+
+ public ObjcBindingProject (string languageName)
+ : base (languageName)
+ {
+ }
+
+ public ObjcBindingProject (string languageName, ProjectCreateInformation info, XmlElement projectOptions)
+ : base (languageName, info, projectOptions)
+ {
+ }
+
+ public override bool IsLibraryBasedProjectType {
+ get { return true; }
+ }
+
+ public override string ProjectType {
+ get { return "ObjcBinding"; }
+ }
+
+ protected override IList<string> GetCommonBuildActions ()
+ {
+ return new string[] {
+ BuildAction.Compile,
+ ObjcBindingBuildAction.ApiDefinition,
+ ObjcBindingBuildAction.CoreSource,
+ ObjcBindingBuildAction.NativeLibrary,
+ BuildAction.None,
+ };
+ }
+
+ public override string GetDefaultBuildAction (string fileName)
+ {
+ // If the file extension is ".a", then it is a NativeLibrary.
+ if (fileName.EndsWith (".a"))
+ return ObjcBindingBuildAction.NativeLibrary;
+
+ var baseAction = base.GetDefaultBuildAction (fileName);
+ if (baseAction != BuildAction.Compile)
+ return baseAction;
+
+ // If the base default BuildAction is Compile, then it's a source file... which means that it can actually
+ // be any one of: Compile, CoreSource (enum & struct defs), or an ApiDefinition (although we can fairly
+ // safely assume that it's not an ApiDefinition because btouch will only allow one of those, and that will
+ // have been created by the template).
+
+ return baseAction;
+ }
+
+ public override bool SupportsFormat (FileFormat format)
+ {
+ return format.Id == "MSBuild10";
+ }
+
+ public override SolutionItemConfiguration CreateConfiguration (string name)
+ {
+ var conf = new ObjcBindingProjectConfiguration (name);
+ conf.CopyFrom (base.CreateConfiguration (name));
+ return conf;
+ }
+ }
+}
diff --git a/main/src/addins/MonoDevelop.MacDev/BindingProject/ObjcBindingProjectConfiguration.cs b/main/src/addins/MonoDevelop.MacDev/BindingProject/ObjcBindingProjectConfiguration.cs
new file mode 100644
index 0000000000..7d5faf87f4
--- /dev/null
+++ b/main/src/addins/MonoDevelop.MacDev/BindingProject/ObjcBindingProjectConfiguration.cs
@@ -0,0 +1,46 @@
+//
+// ObjcBindingProjectConfiguration.cs
+//
+// Author: Jeffrey Stedfast <jeff@xamarin.com>
+//
+// Copyright (c) 2011 Xamarin Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+
+using MonoDevelop.Core;
+using MonoDevelop.Core.Serialization;
+using MonoDevelop.Projects;
+
+namespace MonoDevelop.MacDev.BindingProject
+{
+ public class ObjcBindingProjectConfiguration : DotNetProjectConfiguration
+ {
+ public ObjcBindingProjectConfiguration () : base ()
+ {
+ }
+
+ public ObjcBindingProjectConfiguration (string name) : base (name)
+ {
+ }
+ }
+}
+
diff --git a/main/src/addins/MonoDevelop.MacDev/Makefile.am b/main/src/addins/MonoDevelop.MacDev/Makefile.am
index 597344c5e5..2e842ea8c0 100644
--- a/main/src/addins/MonoDevelop.MacDev/Makefile.am
+++ b/main/src/addins/MonoDevelop.MacDev/Makefile.am
@@ -26,6 +26,8 @@ FILES = \
AppleSdkSettings.cs \
AppleSdkSettingsPanel.cs \
AssemblyInfo.cs \
+ BindingProject/ObjcBindingProject.cs \
+ BindingProject/ObjcBindingProjectConfiguration.cs \
MacBuildUtilities.cs \
MonoDevelop.MacDev.InterfaceBuilder/Collections.cs \
MonoDevelop.MacDev.InterfaceBuilder/IBConnectionRecord.cs \
diff --git a/main/src/addins/MonoDevelop.MacDev/MonoDevelop.MacDev.csproj b/main/src/addins/MonoDevelop.MacDev/MonoDevelop.MacDev.csproj
index 51965b9963..0bcd4d6298 100644
--- a/main/src/addins/MonoDevelop.MacDev/MonoDevelop.MacDev.csproj
+++ b/main/src/addins/MonoDevelop.MacDev/MonoDevelop.MacDev.csproj
@@ -59,6 +59,7 @@
<Folder Include="XcodeSyncing\" />
<Folder Include="XcodeIntegration\" />
<Folder Include="MonoDevelop.MacDev.PlistEditor\" />
+ <Folder Include="BindingProject\" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
@@ -139,6 +140,8 @@
<DependentUpon>CSharpCodeTypeDefinition.tt</DependentUpon>
</Compile>
<Compile Include="MonoDevelop.MacDev.PlistEditor\PlistDiffHandler.cs" />
+ <Compile Include="BindingProject\ObjcBindingProject.cs" />
+ <Compile Include="BindingProject\ObjcBindingProjectConfiguration.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MonoDevelop.MacDev.addin.xml">
diff --git a/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs b/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs
index f4872c18e6..0856ee8c47 100644
--- a/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs
+++ b/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs
@@ -172,7 +172,7 @@ namespace MonoDevelop.MacDev.ObjCIntegration
if (string.IsNullOrEmpty (objcName))
return null;
- var info = new NSObjectTypeInfo (objcName, type.FullName, null, type.BaseType.FullName, isModel,
+ var info = new NSObjectTypeInfo (objcName, type.DecoratedFullName, null, type.BaseType.DecoratedFullName, isModel,
type.SourceProject != null, registeredInDesigner);
if (info.IsUserType) {