[Monodevelop-patches-list] r2478 - in trunk/MonoDevelop/Core/src/MonoDevelop.Core: . AddIns
Lluis Sanchez <lluis@ximian.com>
lluis at mono-cvs.ximian.com
Mon Apr 25 16:37:04 EDT 2005
Author: lluis
Date: 2005-04-25 16:37:04 -0400 (Mon, 25 Apr 2005)
New Revision: 2478
Modified:
trunk/MonoDevelop/Core/src/MonoDevelop.Core/AddIns/AddIn.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Core/ChangeLog
Log:
2005-04-25 Lluis Sanchez Gual <lluis at novell.com>
* AddIns/AddIn.cs: Added GetType method.
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Core/AddIns/AddIn.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Core/AddIns/AddIn.cs 2005-04-25 20:36:47 UTC (rev 2477)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Core/AddIns/AddIn.cs 2005-04-25 20:37:04 UTC (rev 2478)
@@ -453,6 +453,29 @@
}
/// <summary>
+ /// Returns a type which is related to this Add-In.
+ /// </summary>
+ /// <exception cref="TypeNotFoundException">
+ /// If className could not be found
+ /// </exception>
+ public Type GetType (string className)
+ {
+ object newInstance;
+ foreach (DictionaryEntry library in runtimeLibraries) {
+ Type t = ((Assembly)library.Value).GetType (className);
+ if (t != null)
+ return t;
+ }
+
+ Type ct = Assembly.GetExecutingAssembly().GetType (className);
+
+ if (ct == null) {
+ //MessageBox.Show("Type not found: " + className + ". Please check : " + fileName, "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
+ }
+
+ return ct;
+ }
+ /// <summary>
/// Definies an extension point (path in the tree) with its codons.
/// </summary>
public class Extension
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Core/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Core/ChangeLog 2005-04-25 20:36:47 UTC (rev 2477)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Core/ChangeLog 2005-04-25 20:37:04 UTC (rev 2478)
@@ -1,3 +1,7 @@
+2005-04-25 Lluis Sanchez Gual <lluis at novell.com>
+
+ * AddIns/AddIn.cs: Added GetType method.
+
2005-03-24 Raja R Harinath <rharinath at novell.com>
* Makefile.am (FILES): Move AssemblyInfo.cs ...
More information about the Monodevelop-patches-list
mailing list