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:
authorLluis Sanchez <lluis@xamarin.com>2013-09-16 23:13:30 +0400
committerLluis Sanchez <lluis@xamarin.com>2013-09-16 23:13:30 +0400
commit34676aec40a956983ddd53be062585390d444fdf (patch)
tree50d8f0edd13eb546c0db3e5041acd01cc8f87add /main/src/addins/MonoDevelop.DesignerSupport
parent8dff0d01ff6bbc7a55fb9e1df6ffe7decc374620 (diff)
parent745236832f12e6fbe5d116de85e1e688a6a17dd6 (diff)
Merge remote-tracking branch 'origin/master' into retina
Conflicts: main/src/addins/WindowsPlatform/WindowsPlatform.cs version-checks
Diffstat (limited to 'main/src/addins/MonoDevelop.DesignerSupport')
-rw-r--r--main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Projects/ImplicitFrameworkAssemblyReferenceDescriptor.cs68
-rw-r--r--main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Projects/ProjectItemPropertyProvider.cs18
-rw-r--r--main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.csproj1
3 files changed, 80 insertions, 7 deletions
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Projects/ImplicitFrameworkAssemblyReferenceDescriptor.cs b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Projects/ImplicitFrameworkAssemblyReferenceDescriptor.cs
new file mode 100644
index 0000000000..efec032059
--- /dev/null
+++ b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Projects/ImplicitFrameworkAssemblyReferenceDescriptor.cs
@@ -0,0 +1,68 @@
+//
+// ImplicitFrameworkAssemblyReferenceDescriptor.cs
+//
+// Author:
+// Michael Hutchinson <m.j.hutchinson@gmail.com>
+//
+// Copyright (c) 2013 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.Ide.Gui.Pads.ProjectPad;
+using MonoDevelop.Core;
+
+namespace MonoDevelop.DesignerSupport.Projects
+{
+ class ImplicitFrameworkAssemblyReferenceDescriptor : CustomDescriptor
+ {
+ readonly ImplicitFrameworkAssemblyReference aref;
+
+ public ImplicitFrameworkAssemblyReferenceDescriptor (ImplicitFrameworkAssemblyReference aref)
+ {
+ this.aref = aref;
+ }
+
+ [LocalizedCategory ("Reference")]
+ [LocalizedDisplayName ("Assembly Name")]
+ [LocalizedDescription ("Name of the assembly.")]
+ public string FullName {
+ get {
+ return aref.Assembly.FullName;
+ }
+ }
+
+ [LocalizedCategory ("Reference")]
+ [LocalizedDisplayName ("Path")]
+ [LocalizedDescription ("Path to the assembly.")]
+ public string Path {
+ get {
+ return aref.Assembly.Location;
+ }
+ }
+
+ [LocalizedCategory ("Reference")]
+ [LocalizedDisplayName ("Framework")]
+ [LocalizedDescription ("Framework that provides this reference.")]
+ public string Package {
+ get {
+ return aref.Assembly.Package.TargetFramework.ToString ();
+ }
+ }
+ }
+}
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Projects/ProjectItemPropertyProvider.cs b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Projects/ProjectItemPropertyProvider.cs
index 84e609aa55..b2221848ff 100644
--- a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Projects/ProjectItemPropertyProvider.cs
+++ b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Projects/ProjectItemPropertyProvider.cs
@@ -1,7 +1,6 @@
-using System;
-using System.ComponentModel;
using MonoDevelop.Projects;
+using MonoDevelop.Ide.Gui.Pads.ProjectPad;
namespace MonoDevelop.DesignerSupport.Projects
{
@@ -9,15 +8,20 @@ namespace MonoDevelop.DesignerSupport.Projects
{
public object CreateProvider (object obj)
{
- if (obj is ProjectFile)
- return new ProjectFileDescriptor ((ProjectFile)obj);
- else
- return new ProjectReferenceDescriptor ((ProjectReference)obj);
+ var projectFile = obj as ProjectFile;
+ if (projectFile != null)
+ return new ProjectFileDescriptor (projectFile);
+
+ var projectReference = obj as ProjectReference;
+ if (projectReference != null)
+ return new ProjectReferenceDescriptor (projectReference);
+
+ return new ImplicitFrameworkAssemblyReferenceDescriptor ((ImplicitFrameworkAssemblyReference)obj);
}
public bool SupportsObject (object obj)
{
- return obj is ProjectFile || obj is ProjectReference;
+ return obj is ProjectFile || obj is ProjectReference || obj is ImplicitFrameworkAssemblyReference;
}
}
}
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.csproj b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.csproj
index 28f4b2375c..cf35086049 100644
--- a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.csproj
+++ b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.csproj
@@ -164,6 +164,7 @@
<Compile Include="MonoDevelop.DesignerSupport\ClassOutlineSettings.cs" />
<Compile Include="MonoDevelop.DesignerSupport.Toolbox\IToolboxCustomizer.cs" />
<Compile Include="AddinInfo.cs" />
+ <Compile Include="MonoDevelop.DesignerSupport.Projects\ImplicitFrameworkAssemblyReferenceDescriptor.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MonoDevelop.DesignerSupport.addin.xml">