[Monodevelop-patches-list] r1850 - in trunk/MonoDevelop/Core: . build/AddIns/AddIns/BackendBindings build/AddIns/AddIns/BackendBindings/templates build/data/templates data/resources src/Libraries/MonoDevelop.Core src/Libraries/MonoDevelop.Core/AddIns src/Main/Base src/Main/Base/Internal/Codons src/Main/Base/Internal/Codons/Templates src/Main/Base/Internal/Templates src/Main/StartUp
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Mon Jun 28 00:12:16 EDT 2004
Author: tberman
Date: 2004-06-28 00:12:16 -0400 (Mon, 28 Jun 2004)
New Revision: 1850
Added:
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/CSharpSessionStateWebService.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/CSharpWebService.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyCSharpFile.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyHTMLFile.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyJavaFile.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyNemerleFile.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyResourceFile.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyTextFile.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyXMLFile.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/GnomeSharpProgram.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/GtkSharpWindow.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaApplet.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaApplication.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaDialog.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaFrame.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaOKDialog.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaPanel.xft
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/Makefile.am
trunk/MonoDevelop/Core/src/Main/Base/Internal/Codons/Templates/
trunk/MonoDevelop/Core/src/Main/Base/Internal/Codons/Templates/FileTemplateCodon.cs
Removed:
trunk/MonoDevelop/Core/build/data/templates/file/
Modified:
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/BackendBindings.addin.xml
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/JavaBinding.addin.xml
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/Makefile.am
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/NemerleBinding.addin.xml
trunk/MonoDevelop/Core/build/data/templates/Makefile.am
trunk/MonoDevelop/Core/configure.in
trunk/MonoDevelop/Core/data/resources/AddIn.xsd
trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/AddIns/AddIn.cs
trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/ChangeLog
trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Makefile.am
trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
trunk/MonoDevelop/Core/src/Main/Base/Internal/Templates/FileTemplate.cs
trunk/MonoDevelop/Core/src/Main/Base/Makefile.am
trunk/MonoDevelop/Core/src/Main/StartUp/ChangeLog
trunk/MonoDevelop/Core/src/Main/StartUp/MonoDevelopMain.cs
Log:
move to a new system for file templates that have them specified in the xml files instead of inside some magic directory.
Modified: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/BackendBindings.addin.xml
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/BackendBindings.addin.xml 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/BackendBindings.addin.xml 2004-06-28 04:12:16 UTC (rev 1850)
@@ -13,6 +13,27 @@
<Class id = "CSharp"
class = "MonoDevelop.Services.CSharpAmbience"/>
</Extension>
+
+ <Extension path = "/MonoDevelop/FileTemplates">
+ <FileTemplate id = "SessionState"
+ location = "templates/CSharpSessionStateWebService.xft"/>
+ <FileTemplate id = "WebService"
+ location = "templates/CSharpWebService.xft"/>
+ <FileTemplate id = "Empty"
+ location = "templates/EmptyCSharpFile.xft"/>
+ <FileTemplate id = "GnomeSharpProgram"
+ location = "templates/GnomeSharpProgram.xft"/>
+ <FileTemplate id = "GtkSharpWindow"
+ location = "templates/GtkSharpWindow.xft"/>
+ <FileTemplate id = "EmptyHTMLFile"
+ location = "templates/EmptyHTMLFile.xft"/>
+ <FileTemplate id = "EmptyResourceFile"
+ location = "templates/EmptyResourceFile.xft"/>
+ <FileTemplate id = "EmptyTextFile"
+ location = "templates/EmptyTextFile.xft"/>
+ <FileTemplate id = "EmptyXMLFile"
+ location = "templates/EmptyXMLFile.xft"/>
+ </Extension>
<Extension path = "/SharpDevelop/Workbench/FileFilter">
<FileFilter id = "CSharp"
Modified: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/JavaBinding.addin.xml
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/JavaBinding.addin.xml 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/JavaBinding.addin.xml 2004-06-28 04:12:16 UTC (rev 1850)
@@ -16,6 +16,23 @@
extensions = "*.java"/>
</Extension>
+ <Extension path = "/MonoDevelop/FileTemplates">
+ <FileTemplate id = "JavaApplet"
+ location = "templates/JavaApplet.xft"/>
+ <FileTemplate id = "JavaApplication"
+ location = "templates/JavaApplication.xft"/>
+ <FileTemplate id = "JavaDialog"
+ location = "templates/JavaDialog.xft"/>
+ <FileTemplate id = "JavaFrame"
+ location = "templates/JavaFrame.xft"/>
+ <FileTemplate id = "JavaOKDialog"
+ location = "templates/JavaOKDialog.xft"/>
+ <FileTemplate id = "JavaPanel"
+ location = "templates/JavaPanel.xft"/>
+ <FileTemplate id = "EmptyJavaFile"
+ location = "templates/EmptyJavaFile.xft"/>
+ </Extension>
+
<Extension path = "/SharpDevelop/Workbench/ProjectOptions/ConfigurationProperties">
<Conditional activeproject = "Java">
<DialogPanel id = "JavaProjectPanel"
Modified: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/Makefile.am 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/Makefile.am 2004-06-28 04:12:16 UTC (rev 1850)
@@ -1,8 +1,10 @@
+SUBDIRS = templates
+
monodevelopdir = $(prefix)/lib/monodevelop
backendbindingsdir = $(monodevelopdir)/AddIns/AddIns/BackendBindings
-backendbindings_DATA = BackendBindings.addin.xml
+backendbindings_DATA = BackendBindings.addin.xml ILAsmBinding.addin.xml JavaBinding.addin.xml NemerleBinding.addin.xml
EXTRA_DIST = $(backendbindings_DATA)
Modified: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/NemerleBinding.addin.xml
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/NemerleBinding.addin.xml 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/NemerleBinding.addin.xml 2004-06-28 04:12:16 UTC (rev 1850)
@@ -16,6 +16,11 @@
extensions = "*.n"/>
</Extension>
+ <Extension path = "/MonoDevelop/FileTemplates">
+ <FileTemplate id = "EmptyNemerleFile"
+ location = "templates/EmptyNemerleFile.xft"/>
+ </Extension>
+
<Extension path = "/SharpDevelop/Workbench/ProjectOptions/ConfigurationProperties">
<Conditional activeproject = "Nemerle">
<DialogPanel id = "NemerleCodeGenerationPanel"
Property changes on: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates
___________________________________________________________________
Name: svn:ignore
+ Makefile.in
Makefile
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/CSharpSessionStateWebService.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/CSharp/CSharpSessionStateWebService.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/CSharpWebService.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/CSharp/CSharpWebService.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyCSharpFile.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/CSharp/EmptyCSharpFile.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyHTMLFile.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/EmptyHTMLFile.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyJavaFile.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/EmptyJavaFile.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyNemerleFile.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/Nemerle/EmptyNemerleFile.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyResourceFile.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/EmptyResourceFile.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyTextFile.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/EmptyTextFile.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyXMLFile.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/EmptyXMLFile.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/GnomeSharpProgram.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/CSharp/GnomeSharpProgram.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/GtkSharpWindow.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/CSharp/GtkSharpWindow.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaApplet.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/JavaApplet.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaApplication.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/JavaApplication.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaDialog.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/JavaDialog.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaFrame.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/JavaFrame.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaOKDialog.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/JavaOKDialog.xft)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaPanel.xft (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/file/JavaPanel.xft)
Added: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/Makefile.am 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/Makefile.am 2004-06-28 04:12:16 UTC (rev 1850)
@@ -0,0 +1,22 @@
+monodevelopdir = $(prefix)/lib/monodevelop
+templatedir = $(monodevelopdir)/AddIns/AddIns/BackendBindings/templates
+
+template_DATA = CSharpSessionStateWebService.xft \
+CSharpWebService.xft \
+EmptyCSharpFile.xft \
+EmptyHTMLFile.xft \
+EmptyJavaFile.xft \
+EmptyNemerleFile.xft \
+EmptyResourceFile.xft \
+EmptyTextFile.xft \
+EmptyXMLFile.xft \
+GnomeSharpProgram.xft \
+GtkSharpWindow.xft \
+JavaApplet.xft \
+JavaApplication.xft \
+JavaDialog.xft \
+JavaFrame.xft \
+JavaOKDialog.xft \
+JavaPanel.xft
+
+EXTRA_DIST = $(template_DATA)
Modified: trunk/MonoDevelop/Core/build/data/templates/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/build/data/templates/Makefile.am 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/build/data/templates/Makefile.am 2004-06-28 04:12:16 UTC (rev 1850)
@@ -1 +1 @@
-SUBDIRS = file project
+SUBDIRS = project
Modified: trunk/MonoDevelop/Core/configure.in
===================================================================
--- trunk/MonoDevelop/Core/configure.in 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/configure.in 2004-06-28 04:12:16 UTC (rev 1850)
@@ -134,10 +134,6 @@
build/data/resources/icons/Makefile
build/data/resources/languages/Makefile
build/data/templates/Makefile
-build/data/templates/file/Makefile
-build/data/templates/file/CSharp/Makefile
-build/data/templates/file/SharpDevelop/Makefile
-build/data/templates/file/Nemerle/Makefile
build/data/templates/project/Makefile
build/data/templates/project/CSharp/Makefile
build/data/templates/project/Java/Makefile
@@ -148,6 +144,7 @@
build/AddIns/Makefile
build/AddIns/AddIns/Makefile
build/AddIns/AddIns/BackendBindings/Makefile
+build/AddIns/AddIns/BackendBindings/templates/Makefile
build/AddIns/AddIns/Misc/Makefile
build/AddIns/AddIns/Misc/StartPage/Makefile
build/AddIns/AddIns/Misc/Sonata/Makefile
Modified: trunk/MonoDevelop/Core/data/resources/AddIn.xsd
===================================================================
--- trunk/MonoDevelop/Core/data/resources/AddIn.xsd 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/data/resources/AddIn.xsd 2004-06-28 04:12:16 UTC (rev 1850)
@@ -37,6 +37,7 @@
<xs:element ref="LanguageBinding"/>
<xs:element ref="Class"/>
<xs:element ref="MenuItem"/>
+ <xs:element ref="FileTemplate"/>
</xs:choice>
<xs:attribute name="path" type="xs:string" use="required"/>
</xs:complexType>
@@ -122,6 +123,14 @@
</xs:complexContent>
</xs:complexType>
<xs:element name="Class" type="Class"/>
+ <xs:complexType name="FileTemplate">
+ <xs:complexContent>
+ <xs:extension base="AbstractCodon">
+ <xs:attribute name="location" type="xs:string" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="FileTemplate" type="FileTemplate"/>
<xs:complexType name="DialogPanel">
<xs:complexContent>
<xs:extension base="AbstractCodon">
Modified: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/AddIns/AddIn.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/AddIns/AddIn.cs 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/AddIns/AddIn.cs 2004-06-28 04:12:16 UTC (rev 1850)
@@ -172,6 +172,7 @@
if (errors != null) {
ReportErrors(fileName);
errors = null;
+ Console.WriteLine (fileName + " was malformed, returning");
return;
}
Modified: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/ChangeLog 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/ChangeLog 2004-06-28 04:12:16 UTC (rev 1850)
@@ -1,3 +1,10 @@
+2004-06-28 Todd Berman <tberman at off.net>
+
+ * AddIns/AddIn.cs: Add a C.WL so you dont get weird errors without
+ some more info.
+ * Makefile.am: fixup makefile so that if the AddIn.xsd changes, the
+ assembly is rebuilt.
+
2004-06-23 Todd Berman <tberman at off.net>
* Services/ServiceManager.cs: protected ctor added.
Modified: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Makefile.am 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Makefile.am 2004-06-28 04:12:16 UTC (rev 1850)
@@ -61,14 +61,21 @@
build_sources = $(addprefix $(srcdir)/, $(FILES))
+RESOURCES = \
+./../../../data/resources/AddIn.xsd
+
+build_resources = $(addprefix $(srcdir)/, $(RESOURCES))
+
+COMPILE_RESOURCES = $(foreach res,$(build_resources), $(addprefix -resource:,$(res)),$(notdir $(res)))
+
DLL = MonoDevelop.Core.dll
REFS = /r:System.Drawing.dll
all: $(DLL)
-$(DLL): $(build_sources)
- mcs /debug /out:$(DLL) /target:library $(REFS) /define:LINUX /resource:$(srcdir)/../../../data/resources/AddIn.xsd,AddIn.xsd \
+$(DLL): $(build_sources) $(build_resources)
+ mcs /debug /out:$(DLL) /target:library $(REFS) /define:LINUX $(COMPILE_RESOURCES) \
$(build_sources) && cp $(DLL) ../../../build/bin/.
assemblydir = $(libdir)/monodevelop/bin
Modified: trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-06-28 04:12:16 UTC (rev 1850)
@@ -1,3 +1,14 @@
+2004-06-28 Todd Berman <tberman at off.net>
+
+ * Internal/Codons/Templates/FileTemplateCodon.cs: add new codon for
+ handling file templates.
+ * Internal/Templates/FileTemplate.cs: Use the new codon based system
+ instead of the old find files that end in .xft system. This means
+ that you can now specify file templates in the addin.xml files and
+ it brings us one step closer to being able to split off the backend
+ bindings properly. (You will only see templates for bindings you have
+ installed).
+
2004-06-26 Todd Berman <tberman at off.net>
* Gui/Dialogs/DirtyFilesDialog.cs: small layout fixes.
Added: trunk/MonoDevelop/Core/src/Main/Base/Internal/Codons/Templates/FileTemplateCodon.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Internal/Codons/Templates/FileTemplateCodon.cs 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/src/Main/Base/Internal/Codons/Templates/FileTemplateCodon.cs 2004-06-28 04:12:16 UTC (rev 1850)
@@ -0,0 +1,41 @@
+// <file>
+// <copyright see="prj:///doc/copyright.txt"/>
+// <license see="prj:///doc/license.txt"/>
+// <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
+// <version value="$version"/>
+// </file>
+
+using System;
+using System.Collections;
+using System.Diagnostics;
+
+using MonoDevelop.Core.AddIns.Conditions;
+
+namespace MonoDevelop.Core.AddIns.Codons
+{
+ [CodonNameAttribute("FileTemplate")]
+ public class FileTemplateCodon : AbstractCodon
+ {
+ [XmlMemberAttribute("location", IsRequired = true)]
+ string location;
+
+ public string Location {
+ get {
+ return location;
+ }
+ set {
+ location = value;
+ }
+ }
+
+ /// <summary>
+ /// Creates an item with the specified sub items. And the current
+ /// Condition status for this item.
+ /// </summary>
+ public override object BuildItem(object owner, ArrayList subItems, ConditionCollection conditions)
+ {
+ this.location = System.IO.Path.GetDirectoryName (this.AddIn.FileName) + System.IO.Path.DirectorySeparatorChar + this.location;
+ return this;
+ }
+ }
+}
Modified: trunk/MonoDevelop/Core/src/Main/Base/Internal/Templates/FileTemplate.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Internal/Templates/FileTemplate.cs 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/src/Main/Base/Internal/Templates/FileTemplate.cs 2004-06-28 04:12:16 UTC (rev 1850)
@@ -16,6 +16,9 @@
using MonoDevelop.Core.Services;
using MonoDevelop.Services;
+using MonoDevelop.Core.AddIns;
+using MonoDevelop.Core.AddIns.Codons;
+
namespace MonoDevelop.Internal.Templates
{
/// <summary>
@@ -153,16 +156,18 @@
{
FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
- IMessageService messageService = (IMessageService)ServiceManager.GetService(typeof(IMessageService));
- StringCollection files = fileUtilityService.SearchDirectory(propertyService.DataDirectory +
- Path.DirectorySeparatorChar + "templates" +
- Path.DirectorySeparatorChar + "file", "*.xft");
- foreach (string file in files) {
+ LoadTemplates ((FileTemplateCodon[])(AddInTreeSingleton.AddInTree.GetTreeNode ("/MonoDevelop/FileTemplates").BuildChildItems (new object ()).ToArray (typeof (FileTemplateCodon))));
+ }
+
+ static void LoadTemplates (FileTemplateCodon[] codons)
+ {
+ IMessageService messageService = (IMessageService) ServiceManager.GetService (typeof (IMessageService));
+ foreach (FileTemplateCodon codon in codons) {
try {
- LoadFileTemplate(file);
- } catch(Exception e) {
- messageService.ShowError(e, String.Format (GettextCatalog.GetString ("Error loading template file {0}"), file));
+ LoadFileTemplate (codon.Location);
+ } catch (Exception e) {
+ messageService.ShowError (e, String.Format (GettextCatalog.GetString ("Error loading template file {0}"), codon.Location));
}
}
}
Modified: trunk/MonoDevelop/Core/src/Main/Base/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Makefile.am 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/src/Main/Base/Makefile.am 2004-06-28 04:12:16 UTC (rev 1850)
@@ -242,6 +242,7 @@
./Internal/Codons/MenuItems/AbstractMenuCommand.cs \
./Internal/Codons/MenuItems/ICheckableMenuCommand.cs \
./Internal/Codons/MenuItems/MenuItemCodon.cs \
+./Internal/Codons/Templates/FileTemplateCodon.cs \
./Internal/DataStructures/PriorityQueue.cs \
./Internal/Parser/IRegion.cs \
./Internal/Parser/ICompilationUnitBase.cs \
Modified: trunk/MonoDevelop/Core/src/Main/StartUp/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/Main/StartUp/ChangeLog 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/src/Main/StartUp/ChangeLog 2004-06-28 04:12:16 UTC (rev 1850)
@@ -1,3 +1,7 @@
+2004-06-28 Todd Berman <tberman at off.net>
+
+ * MonoDevelopMain.cs: add Exit (0); and poof, issues are gone.
+
2004-05-24 Todd Berman <tberman at sevenl.net>
* Makefile.am: add Mono.Posix reference
Modified: trunk/MonoDevelop/Core/src/Main/StartUp/MonoDevelopMain.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/StartUp/MonoDevelopMain.cs 2004-06-28 04:01:50 UTC (rev 1849)
+++ trunk/MonoDevelop/Core/src/Main/StartUp/MonoDevelopMain.cs 2004-06-28 04:12:16 UTC (rev 1850)
@@ -143,6 +143,7 @@
// unloading services
File.Delete (socket_filename);
ServiceManager.UnloadAllServices();
+ System.Environment.Exit (0);
}
static string fileToOpen = String.Empty;
More information about the Monodevelop-patches-list
mailing list