diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2014-01-20 19:32:53 +0400 |
---|---|---|
committer | Lluis Sanchez Gual <lluis@xamarin.com> | 2014-10-21 18:39:14 +0400 |
commit | f73b2a9990495587d514aa1856919c21170a3940 (patch) | |
tree | 9842411ee8644ead5915a715ee7e53984a601df4 /main/src/addins/MonoDevelop.Autotools/MakefileData.cs | |
parent | a2046b6331a271e8203df7d3d0f14500d33d60fa (diff) |
Initial drop of the new project model
Diffstat (limited to 'main/src/addins/MonoDevelop.Autotools/MakefileData.cs')
-rw-r--r-- | main/src/addins/MonoDevelop.Autotools/MakefileData.cs | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/main/src/addins/MonoDevelop.Autotools/MakefileData.cs b/main/src/addins/MonoDevelop.Autotools/MakefileData.cs index 8101bcfe67..01a6b1cb51 100644 --- a/main/src/addins/MonoDevelop.Autotools/MakefileData.cs +++ b/main/src/addins/MonoDevelop.Autotools/MakefileData.cs @@ -38,6 +38,7 @@ using MonoDevelop.Core.Serialization; using MonoDevelop.Projects; using MonoDevelop.Core.Assemblies; using MonoDevelop.Ide; +using System.Xml; namespace MonoDevelop.Autotools { @@ -70,6 +71,24 @@ namespace MonoDevelop.Autotools if (assemblyContext == null) integrationEnabled = false; } + + public static MakefileData Read (XmlElement ext) + { + XmlDataSerializer ser = new XmlDataSerializer (new DataContext ()); + return (MakefileData) ser.Deserialize (new XmlNodeReader (ext), typeof(MakefileData)); + } + + public XmlElement Write () + { + XmlDataSerializer ser = new XmlDataSerializer (new DataContext ()); + var sw = new StringWriter (); + ser.Serialize (new XmlTextWriter (sw), this); + XmlDocument doc = new XmlDocument (); + doc.LoadXml (sw.ToString ()); + var elem = doc.DocumentElement; + doc.RemoveChild (elem); + return elem; + } internal static IAssemblyContext GetMonoRuntimeContext () { @@ -613,7 +632,7 @@ namespace MonoDevelop.Autotools return customRegex [index]; } - IProgressMonitor monitor = null; + ProgressMonitor monitor = null; // VarName -> Encode filenames Eg. $(srcdir) Dictionary<string, bool> encodeValues; @@ -651,7 +670,7 @@ namespace MonoDevelop.Autotools } //use events.. - public void UpdateProject (IProgressMonitor monitor, bool promptForRemoval) + public void UpdateProject (ProgressMonitor monitor, bool promptForRemoval) { if (!IntegrationEnabled) return; @@ -1177,7 +1196,7 @@ namespace MonoDevelop.Autotools return pref; } - public static void ResolveProjectReferences (SolutionFolder folder, IProgressMonitor monitor) + public static void ResolveProjectReferences (SolutionFolder folder, ProgressMonitor monitor) { Dictionary<string, DotNetProject> projects = new Dictionary<string, DotNetProject> (); foreach (DotNetProject p in folder.GetAllItems<DotNetProject> ()) { @@ -1325,7 +1344,7 @@ namespace MonoDevelop.Autotools //Writing methods - public void UpdateMakefile (IProgressMonitor monitor) + public void UpdateMakefile (ProgressMonitor monitor) { //FIXME: AssemblyName & OutputDir |