[Monodevelop-patches-list] r2244 - in trunk/MonoDevelop: . Core/src/MonoDevelop.Base Core/src/MonoDevelop.Base/Commands Core/src/MonoDevelop.Base/Gui/Dialogs Core/src/MonoDevelop.Base/Internal/Project Core/src/MonoDevelop.Base/Internal/Project/Combine Core/src/MonoDevelop.Base/Internal/Project/Project Core/src/MonoDevelop.Base/Internal/Templates/ProjectTemplates Core/src/MonoDevelop.Base/Services Core/src/MonoDevelop.Base/Services/Project
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Thu Feb 10 20:41:59 EST 2005
Author: tberman
Date: 2005-02-10 20:41:58 -0500 (Thu, 10 Feb 2005)
New Revision: 2244
Added:
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/MdpFileFormat.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/MdsFileFormat.cs
Modified:
trunk/MonoDevelop/ChangeLog
trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/FileCommands.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/NewProjectDialog.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/CmbxFileFormat.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/Combine/Combine.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/PrjxFileFormat.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/Project/Project.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Templates/ProjectTemplates/CombineDescriptor.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Templates/ProjectTemplates/ProjectDescriptor.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am
trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelopCore.addin.xml
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/IconService.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Project/DefaultProjectService.cs
trunk/MonoDevelop/Makefile.am
trunk/MonoDevelop/monodevelop.xml
Log:
In .:
2005-02-10 Todd Berman <tberman at off.net>
* Makefile.am: add --debug to make run.
* monodevelop.xml: Add .mds and .mdp
In Core/src/MonoDevelop.Base:
2005-02-10 Todd Berman <tberman at off.net>
* Commands/FileCommands.cs:
* Services/Project/DefaultProjectService.cs:
* Services/IconService.cs:
* Gui/Dialogs/NewProjectDialog.cs:
* Makefile.am:
* Internal/Project/PrjxFileFormat.cs:
* Internal/Project/MdsFileFormat.cs:
* Internal/Project/Project/Project.cs:
* Internal/Project/CmbxFileFormat.cs:
* Internal/Project/Combine/Combine.cs:
* Internal/Project/MdpFileFormat.cs:
* Internal/Templates/ProjectTemplates/CombineDescriptor.cs:
* Internal/Templates/ProjectTemplates/ProjectDescriptor.cs:
* MonoDevelopCore.addin.xml:
Changes to make the default file extensions .mds and .mdp. Your
projects will be converted to this fileformat by default.
Also a lot of misc changes across the codebase to make this work
properly with other bad code that checks for .CMBX and .PRJX.
Modified: trunk/MonoDevelop/ChangeLog
===================================================================
--- trunk/MonoDevelop/ChangeLog 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/ChangeLog 2005-02-11 01:41:58 UTC (rev 2244)
@@ -1,3 +1,8 @@
+2005-02-10 Todd Berman <tberman at off.net>
+
+ * Makefile.am: add --debug to make run.
+ * monodevelop.xml: Add .mds and .mdp
+
2005-02-09 John Luke <john.luke at gmail.com>
* configure.in: remove obsolete NOTE
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-02-11 01:41:58 UTC (rev 2244)
@@ -1,3 +1,26 @@
+2005-02-10 Todd Berman <tberman at off.net>
+
+ * Commands/FileCommands.cs:
+ * Services/Project/DefaultProjectService.cs:
+ * Services/IconService.cs:
+ * Gui/Dialogs/NewProjectDialog.cs:
+ * Makefile.am:
+ * Internal/Project/PrjxFileFormat.cs:
+ * Internal/Project/MdsFileFormat.cs:
+ * Internal/Project/Project/Project.cs:
+ * Internal/Project/CmbxFileFormat.cs:
+ * Internal/Project/Combine/Combine.cs:
+ * Internal/Project/MdpFileFormat.cs:
+ * Internal/Templates/ProjectTemplates/CombineDescriptor.cs:
+ * Internal/Templates/ProjectTemplates/ProjectDescriptor.cs:
+ * MonoDevelopCore.addin.xml:
+
+ Changes to make the default file extensions .mds and .mdp. Your
+ projects will be converted to this fileformat by default.
+
+ Also a lot of misc changes across the codebase to make this work
+ properly with other bad code that checks for .CMBX and .PRJX.
+
2005-02-09 John Luke <john.luke at gmail.com>
* Gui/Dialogs/TreeViewOptions.cs
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/FileCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/FileCommands.cs 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/FileCommands.cs 2005-02-11 01:41:58 UTC (rev 2244)
@@ -236,6 +236,8 @@
switch (Path.GetExtension(name).ToUpper()) {
case ".CMBX": // Don't forget the 'recent' projects if you chance something here
case ".PRJX":
+ case ".MDP":
+ case ".MDS":
try {
//Runtime.ProjectService.OpenCombine(name);
Runtime.FileService.OpenFile(name);
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/NewProjectDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/NewProjectDialog.cs 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Dialogs/NewProjectDialog.cs 2005-02-11 01:41:58 UTC (rev 2244)
@@ -251,7 +251,7 @@
item.OpenCreatedCombine();
// TODO :: THIS DOESN'T WORK !!!
- NewProjectLocation = System.IO.Path.ChangeExtension(NewCombineLocation, ".prjx");
+ NewProjectLocation = System.IO.Path.ChangeExtension(NewCombineLocation, ".mdp");
//DialogResult = DialogResult.OK;
if (OnOked != null)
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/CmbxFileFormat.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/CmbxFileFormat.cs 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/CmbxFileFormat.cs 2005-02-11 01:41:58 UTC (rev 2244)
@@ -191,6 +191,7 @@
{
DataItem data = (DataItem) Read (reader);
serializer.Deserialize (combine, data);
+ combine.FileFormat = new MdsFileFormat ();
return combine;
}
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/Combine/Combine.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/Combine/Combine.cs 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/Combine/Combine.cs 2005-02-11 01:41:58 UTC (rev 2244)
@@ -211,6 +211,11 @@
public override void Save (IProgressMonitor monitor)
{
base.Save (monitor);
+ foreach (CombineEntry entry in Entries)
+ {
+ if (entry is Combine || entry is Project)
+ entry.Save (monitor);
+ }
GenerateMakefiles ();
}
Copied: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/MdpFileFormat.cs (from rev 2242, trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/PrjxFileFormat.cs)
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/PrjxFileFormat.cs 2005-02-09 19:30:58 UTC (rev 2242)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/MdpFileFormat.cs 2005-02-11 01:41:58 UTC (rev 2244)
@@ -0,0 +1,130 @@
+//
+// FileFormatManager.cs
+//
+// Author:
+// Lluis Sanchez Gual
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// 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.IO;
+using System.Xml;
+using MonoDevelop.Internal.Serialization;
+using MonoDevelop.Services;
+
+namespace MonoDevelop.Internal.Project
+{
+ public class MdpFileFormat: IFileFormat
+ {
+ public string Name {
+ get { return "MonoDevelop Project"; }
+ }
+
+ public string GetValidFormatName (string fileName)
+ {
+ return Path.ChangeExtension (fileName, ".mdp");
+ }
+
+ public bool CanReadFile (string file)
+ {
+ return String.Compare (Path.GetExtension (file), ".mdp", true) == 0;
+ }
+
+ public bool CanWriteFile (object obj)
+ {
+ return obj is Project;
+ }
+
+ public void WriteFile (string file, object node, IProgressMonitor monitor)
+ {
+ Project project = node as Project;
+ if (project == null)
+ throw new InvalidOperationException ("The provided object is not a Project");
+
+ StreamWriter sw = new StreamWriter (file);
+ try {
+ monitor.BeginTask (string.Format (GettextCatalog.GetString("Saving project: {0}"), file), 1);
+ XmlDataSerializer ser = new XmlDataSerializer (Runtime.ProjectService.DataContext);
+ ser.SerializationContext.BaseFile = file;
+ ser.Serialize (sw, project, typeof(Project));
+ } catch (Exception ex) {
+ monitor.ReportError (string.Format (GettextCatalog.GetString ("Could not save project: {0}"), file), ex);
+ } finally {
+ monitor.EndTask ();
+ sw.Close ();
+ }
+ }
+
+ public object ReadFile (string fileName, IProgressMonitor monitor)
+ {
+ XmlTextReader reader = new XmlTextReader (new StreamReader (fileName));
+ reader.MoveToContent ();
+
+ string version = reader.GetAttribute ("version");
+ if (version == null) version = reader.GetAttribute ("fileversion");
+
+ DataSerializer serializer = new DataSerializer (Runtime.ProjectService.DataContext, fileName);
+ IProjectReader projectReader = null;
+
+ if (version == "1.0" || version == "1") {
+ string tempFile = Path.GetTempFileName();
+
+ ConvertXml.Convert(fileName,
+ Runtime.Properties.DataDirectory + Path.DirectorySeparatorChar +
+ "ConversionStyleSheets" + Path.DirectorySeparatorChar +
+ "ConvertPrjx10to11.xsl",
+ tempFile);
+ reader.Close ();
+ StreamReader sr = new StreamReader (tempFile);
+ string fdata = sr.ReadToEnd ();
+ sr.Close ();
+ File.Delete (tempFile);
+ reader = new XmlTextReader (new StringReader (fdata));
+ projectReader = new ProjectReaderV1 (serializer);
+ }
+ else if (version == "1.1") {
+ projectReader = new ProjectReaderV1 (serializer);
+ }
+ else if (version == "2.0") {
+ projectReader = new ProjectReaderV2 (serializer);
+ }
+
+ if (version != "2.0")
+ monitor.ReportWarning (string.Format (GettextCatalog.GetString ("The file '{0}' is using an old project file format. It will be automatically converted to the current format."), fileName));
+
+ try {
+ monitor.BeginTask (string.Format (GettextCatalog.GetString ("Loading project: {0}"), fileName), 1);
+ if (projectReader != null)
+ return projectReader.ReadProject (reader);
+ else
+ throw new UnknownProjectVersionException (fileName, version);
+ } catch (Exception ex) {
+ monitor.ReportError (string.Format (GettextCatalog.GetString ("Could not load project: {0}"), fileName), ex);
+ throw;
+ } finally {
+ monitor.EndTask ();
+ reader.Close ();
+ }
+ }
+ }
+}
Copied: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/MdsFileFormat.cs (from rev 2242, trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/CmbxFileFormat.cs)
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/CmbxFileFormat.cs 2005-02-09 19:30:58 UTC (rev 2242)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/MdsFileFormat.cs 2005-02-11 01:41:58 UTC (rev 2244)
@@ -0,0 +1,109 @@
+//
+// CmbxFileFormat.cs
+//
+// Author:
+// Lluis Sanchez Gual
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// 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.Collections;
+using System.IO;
+using System.Xml;
+using MonoDevelop.Services;
+using MonoDevelop.Internal.Serialization;
+
+namespace MonoDevelop.Internal.Project
+{
+ public class MdsFileFormat: IFileFormat
+ {
+ public string Name {
+ get { return "MonoDevelop Combine"; }
+ }
+
+ public string GetValidFormatName (string fileName)
+ {
+ return Path.ChangeExtension (fileName, ".mds");
+ }
+
+ public bool CanReadFile (string file)
+ {
+ return String.Compare (Path.GetExtension (file), ".mds", true) == 0;
+ }
+
+ public bool CanWriteFile (object obj)
+ {
+ return obj is Combine;
+ }
+
+ public void WriteFile (string file, object node, IProgressMonitor monitor)
+ {
+ Combine combine = node as Combine;
+ if (combine == null)
+ throw new InvalidOperationException ("The provided object is not a Combine");
+
+ StreamWriter sw = new StreamWriter (file);
+ try {
+ monitor.BeginTask (string.Format (GettextCatalog.GetString("Saving combine: {0}"), file), 1);
+ XmlTextWriter tw = new XmlTextWriter (sw);
+ tw.Formatting = Formatting.Indented;
+ DataSerializer serializer = new DataSerializer (Runtime.ProjectService.DataContext, file);
+ CombineWriterV2 combineWriter = new CombineWriterV2 (serializer, monitor);
+ combineWriter.WriteCombine (tw, combine);
+ } catch (Exception ex) {
+ monitor.ReportError (string.Format (GettextCatalog.GetString ("Could not save combine: {0}"), file), ex);
+ } finally {
+ monitor.EndTask ();
+ sw.Close ();
+ }
+ }
+
+ public object ReadFile (string file, IProgressMonitor monitor)
+ {
+ XmlTextReader reader = new XmlTextReader (new StreamReader (file));
+ reader.MoveToContent ();
+
+ string version = reader.GetAttribute ("version");
+ if (version == null) version = reader.GetAttribute ("fileversion");
+
+ DataSerializer serializer = new DataSerializer (Runtime.ProjectService.DataContext, file);
+ ICombineReader combineReader = null;
+
+ if (version == "1.0" || version == "1") {
+ combineReader = new CombineReaderV1 (serializer, monitor);
+ monitor.ReportWarning (string.Format (GettextCatalog.GetString ("The file '{0}' is using an old combine file format. It will be automatically converted to the current format."), file));
+ }
+ else if (version == "2.0")
+ combineReader = new CombineReaderV2 (serializer, monitor);
+
+ try {
+ if (combineReader != null)
+ return combineReader.ReadCombine (reader);
+ else
+ throw new UnknownProjectVersionException (file, version);
+ } finally {
+ reader.Close ();
+ }
+ }
+ }
+}
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/PrjxFileFormat.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/PrjxFileFormat.cs 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/PrjxFileFormat.cs 2005-02-11 01:41:58 UTC (rev 2244)
@@ -37,7 +37,7 @@
public class PrjxFileFormat: IFileFormat
{
public string Name {
- get { return "MonoDevelop Project"; }
+ get { return "SharpDevelop Project"; }
}
public string GetValidFormatName (string fileName)
@@ -114,7 +114,7 @@
try {
monitor.BeginTask (string.Format (GettextCatalog.GetString ("Loading project: {0}"), fileName), 1);
- if (projectReader != null)
+ if (projectReader != null)
return projectReader.ReadProject (reader);
else
throw new UnknownProjectVersionException (fileName, version);
@@ -163,6 +163,7 @@
project.FileName = file;
DataItem data = (DataItem) Read (reader);
serializer.Deserialize (project, data);
+ project.FileFormat = new MdpFileFormat ();
return project;
}
@@ -217,6 +218,7 @@
DataNode data = Read (reader);
Project project = (Project) serializer.Deserialize (typeof(Project), data);
project.FileName = serializer.SerializationContext.BaseFile;
+ project.FileFormat = new MdpFileFormat ();
return project;
}
}
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/Project/Project.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/Project/Project.cs 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Project/Project/Project.cs 2005-02-11 01:41:58 UTC (rev 2244)
@@ -181,6 +181,8 @@
extension != ".PRJX" &&
extension != ".SWP" &&
extension != ".MDSX" &&
+ extension != ".MDS" &&
+ extension != ".MDP" &&
extension != ".PIDB" &&
!file.EndsWith ("make.sh") &&
!file.EndsWith ("~") &&
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Templates/ProjectTemplates/CombineDescriptor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Templates/ProjectTemplates/CombineDescriptor.cs 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Templates/ProjectTemplates/CombineDescriptor.cs 2005-02-11 01:41:58 UTC (rev 2244)
@@ -91,7 +91,7 @@
// Save combine
using (IProgressMonitor monitor = Runtime.TaskService.GetSaveProgressMonitor ()) {
- string combineLocation = Runtime.FileUtilityService.GetDirectoryNameWithSeparator(projectCreateInformation.CombinePath) + newCombineName + ".cmbx";
+ string combineLocation = Runtime.FileUtilityService.GetDirectoryNameWithSeparator(projectCreateInformation.CombinePath) + newCombineName + ".mds";
if (File.Exists(combineLocation)) {
IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
if (messageService.AskQuestion(String.Format (GettextCatalog.GetString ("Solution file {0} already exists, do you want to overwrite\nthe existing file ?"), combineLocation))) {
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Templates/ProjectTemplates/ProjectDescriptor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Templates/ProjectTemplates/ProjectDescriptor.cs 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Internal/Templates/ProjectTemplates/ProjectDescriptor.cs 2005-02-11 01:41:58 UTC (rev 2244)
@@ -147,7 +147,7 @@
}
// Save project
- string projectLocation = fileUtilityService.GetDirectoryNameWithSeparator(projectCreateInformation.ProjectBasePath) + newProjectName + ".prjx";
+ string projectLocation = fileUtilityService.GetDirectoryNameWithSeparator(projectCreateInformation.ProjectBasePath) + newProjectName + ".mdp";
using (IProgressMonitor monitor = Runtime.TaskService.GetSaveProgressMonitor ()) {
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am 2005-02-11 01:41:58 UTC (rev 2244)
@@ -355,6 +355,8 @@
Internal/ProgressMonitoring/ProgressTracker.cs \
Internal/Project/PrjxFileFormat.cs \
Internal/Project/CmbxFileFormat.cs \
+Internal/Project/MdsFileFormat.cs \
+Internal/Project/MdpFileFormat.cs \
Internal/Project/IFileFormat.cs \
Internal/Project/ProjectPathItemPropertyAttribute.cs \
Internal/Project/Project/Deployment/DeployInformation.cs \
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelopCore.addin.xml
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelopCore.addin.xml 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelopCore.addin.xml 2005-02-11 01:41:58 UTC (rev 2244)
@@ -70,6 +70,10 @@
</Extension>
<Extension path = "/SharpDevelop/Workbench/ProjectFileFormats">
+ <FileFormat id="PrjxFileFormat"
+ class="MonoDevelop.Internal.Project.PrjxFileFormat"/>
+ <FileFormat id="CmbxFileFormat"
+ class="MonoDevelop.Internal.Project.CmbxFileFormat"/>
</Extension>
<Extension path = "/SharpDevelop/Workbench/DisplayBindings">
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/IconService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/IconService.cs 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/IconService.cs 2005-02-11 01:41:58 UTC (rev 2244)
@@ -58,6 +58,8 @@
{
extensionHashtable[".PRJX"] = Stock.SolutionIcon;
extensionHashtable[".CMBX"] = Stock.CombineIcon;
+ extensionHashtable[".MDS"] = Stock.CombineIcon;
+ extensionHashtable[".MDP"] = Stock.SolutionIcon;
IconCodon[] icons = (IconCodon[])treeNode.BuildChildItems(null).ToArray(typeof(IconCodon));
for (int i = 0; i < icons.Length; ++i) {
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Project/DefaultProjectService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Project/DefaultProjectService.cs 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Project/DefaultProjectService.cs 2005-02-11 01:41:58 UTC (rev 2244)
@@ -44,8 +44,8 @@
IAsyncOperation currentRunOperation;
FileFormatManager formatManager = new FileFormatManager ();
- IFileFormat defaultProjectFormat = new PrjxFileFormat ();
- IFileFormat defaultCombineFormat = new CmbxFileFormat ();
+ IFileFormat defaultProjectFormat = new MdsFileFormat ();
+ IFileFormat defaultCombineFormat = new MdpFileFormat ();
ICompilerResult lastResult = new DefaultCompilerResult ();
@@ -134,8 +134,10 @@
CombineEntry obj = format.ReadFile (file, monitor) as CombineEntry;
if (obj == null)
throw new InvalidOperationException ("Invalid file format: " + file);
-
- obj.FileFormat = format;
+
+ if (obj.FileFormat == null)
+ obj.FileFormat = format;
+
return obj;
}
@@ -150,8 +152,8 @@
if (format == null)
throw new InvalidOperationException ("FileFormat not provided for combine entry '" + entry.Name + "'");
}
-
- format.WriteFile (file, entry, monitor);
+ entry.FileName = format.GetValidFormatName (file);
+ format.WriteFile (entry.FileName, entry, monitor);
}
public Project CreateSingleFileProject (string file)
@@ -234,11 +236,14 @@
return;
}
- string validcombine = Path.ChangeExtension (filename, ".cmbx");
+ string validcombine = Path.ChangeExtension (filename, ".mds");
- if (Path.GetExtension (filename).ToLower() != ".cmbx") {
+ if (Path.GetExtension (filename).ToLower() != ".mds") {
if (File.Exists (validcombine))
filename = validcombine;
+ } else if (Path.GetExtension (filename).ToLower () != ".cmbx") {
+ if (File.Exists (Path.ChangeExtension (filename, ".cmbx")))
+ filename = Path.ChangeExtension (filename, ".cmbx");
}
CombineEntry entry = ReadFile (filename, monitor);
@@ -261,8 +266,8 @@
openCombine.ReferenceRemovedFromProject += new ProjectReferenceEventHandler (NotifyReferenceRemovedFromProject);
RestoreCombinePreferences (CurrentOpenCombine);
+ SaveCombine ();
monitor.ReportSuccess (GettextCatalog.GetString ("Combine loaded."));
-
OnCombineOpened(new CombineEventArgs(openCombine));
} catch (Exception ex) {
monitor.ReportError ("Load operation failed.", ex);
Modified: trunk/MonoDevelop/Makefile.am
===================================================================
--- trunk/MonoDevelop/Makefile.am 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/Makefile.am 2005-02-11 01:41:58 UTC (rev 2244)
@@ -27,7 +27,7 @@
run: runmd
runmd: $(PROGRAM)
- cd build/bin && LD_LIBRARY_PATH=`echo "$(LD_LIBRARY_PATH):$(MOZILLA_HOME)" | sed 's/^://g'` $(RUNTIME) MonoDevelop.exe
+ cd build/bin && LD_LIBRARY_PATH=`echo "$(LD_LIBRARY_PATH):$(MOZILLA_HOME)" | sed 's/^://g'` $(RUNTIME) --debug MonoDevelop.exe
pad: $(MONOPAD)
Modified: trunk/MonoDevelop/monodevelop.xml
===================================================================
--- trunk/MonoDevelop/monodevelop.xml 2005-02-10 23:44:07 UTC (rev 2243)
+++ trunk/MonoDevelop/monodevelop.xml 2005-02-11 01:41:58 UTC (rev 2244)
@@ -77,17 +77,25 @@
<glob pattern="*.asmx"/>
</mime-type>
<mime-type type="application/x-prjx">
- <comment xml:lang="en">MonoDevelop project</comment>
+ <comment xml:lang="en">SharpDevelop project</comment>
<glob pattern="*.prjx"/>
</mime-type>
<mime-type type="application/x-cmbx">
- <comment xml:lang="en">MonoDevelop solution</comment>
+ <comment xml:lang="en">SharpDevelop solution</comment>
<glob pattern="*.cmbx"/>
</mime-type>
<mime-type type="application/x-mdsx">
- <comment xml:lang="en">MonoDevelop solution</comment>
+ <comment xml:lang="en">SharpDevelop solution extension</comment>
<glob pattern="*.mdsx"/>
</mime-type>
+ <mime-type type="application/x-mdp">
+ <comment xml:lang="en">MonoDevelop project</comment>
+ <glob pattern="*.mdp"/>
+ </mime-type>
+ <mime-type type="application/x-mds">
+ <comment xml:lang="en">MonoDevelop solution</comment>
+ <glob pattern="*.mds"/>
+ </mime-type>
<mime-type type="application/x-disco">
<comment xml:lang="en">Static Discovery File</comment>
<glob pattern="*.disco"/>
More information about the Monodevelop-patches-list
mailing list