[Monodevelop-patches-list] r1862 - in trunk/MonoDevelop/Core: . build/AddIns/AddIns/BackendBindings build/AddIns/AddIns/BackendBindings/templates build/data data/resources src/Main/Base src/Main/Base/Internal/Codons/Templates src/Main/Base/Internal/Templates/ProjectTemplates
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Tue Jun 29 18:11:10 EDT 2004
Author: tberman
Date: 2004-06-29 18:11:10 -0400 (Tue, 29 Jun 2004)
New Revision: 1862
Added:
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/BlankCombine.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/ConsoleProject.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyJavaProject.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyProject.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/GladeSharpProject.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/GnomeSharpProject.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/GtkSharpProject.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/ILAsmConsoleProject.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/IkvmConsoleApplicationProject.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/IkvmGladeApplicationProject.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/IkvmGnomeApplicationProject.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/IkvmGtkApplicationProject.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaApplicationProject.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaConsoleApplicationProject.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/Library.xpt
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/NemerleEmptyProject.xpt
trunk/MonoDevelop/Core/src/Main/Base/Internal/Codons/Templates/ProjectTemplateCodon.cs
Removed:
trunk/MonoDevelop/Core/build/data/templates/
Modified:
trunk/MonoDevelop/Core/ChangeLog
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/BackendBindings.addin.xml
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/ILAsmBinding.addin.xml
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/JavaBinding.addin.xml
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/NemerleBinding.addin.xml
trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/Makefile.am
trunk/MonoDevelop/Core/build/data/Makefile.am
trunk/MonoDevelop/Core/configure.in
trunk/MonoDevelop/Core/data/resources/AddIn.xsd
trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
trunk/MonoDevelop/Core/src/Main/Base/Internal/Templates/ProjectTemplates/ProjectTemplate.cs
trunk/MonoDevelop/Core/src/Main/Base/Makefile.am
Log:
convert to using project template codons, one more step away from the monolithic setup.
Modified: trunk/MonoDevelop/Core/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/ChangeLog 2004-06-29 19:15:11 UTC (rev 1861)
+++ trunk/MonoDevelop/Core/ChangeLog 2004-06-29 22:11:10 UTC (rev 1862)
@@ -1,3 +1,7 @@
+2004-06-29 Todd Berman <tberman at off.net>
+
+ * configure.in: remove dead directories.
+
2004-06-24 John Luke <jluke at cfl.rr.com>
fix all the projects and generated makefiles
Modified: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/BackendBindings.addin.xml
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/BackendBindings.addin.xml 2004-06-29 19:15:11 UTC (rev 1861)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/BackendBindings.addin.xml 2004-06-29 22:11:10 UTC (rev 1862)
@@ -34,6 +34,23 @@
<FileTemplate id = "EmptyXMLFile"
location = "templates/EmptyXMLFile.xft"/>
</Extension>
+
+ <Extension path = "/MonoDevelop/ProjectTemplates">
+ <ProjectTemplate id = "ConsoleProject"
+ location = "templates/ConsoleProject.xpt"/>
+ <ProjectTemplate id = "EmptyProject"
+ location = "templates/EmptyProject.xpt"/>
+ <ProjectTemplate id = "GladeSharpProject"
+ location = "templates/GladeSharpProject.xpt"/>
+ <ProjectTemplate id = "GnomeSharpProject"
+ location = "templates/GnomeSharpProject.xpt"/>
+ <ProjectTemplate id = "GtkSharpProject"
+ location = "templates/GtkSharpProject.xpt"/>
+ <ProjectTemplate id = "Library"
+ location = "templates/Library.xpt"/>
+ <ProjectTemplate id = "BlankCombine"
+ location = "templates/BlankCombine.xpt"/>
+ </Extension>
<Extension path = "/SharpDevelop/Workbench/FileFilter">
<FileFilter id = "CSharp"
Modified: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/ILAsmBinding.addin.xml
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/ILAsmBinding.addin.xml 2004-06-29 19:15:11 UTC (rev 1861)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/ILAsmBinding.addin.xml 2004-06-29 22:11:10 UTC (rev 1862)
@@ -9,6 +9,11 @@
<Import assembly = "ILAsmBinding.dll"/>
</Runtime>
+ <Extension path = "/MonoDevelop/ProjectTemplates">
+ <ProjectTemplate id = "ILAsmConsoleProject"
+ location = "templates/ILAsmConsoleProject.xpt"/>
+ </Extension>
+
<Extension path = "/SharpDevelop/Workbench/ProjectOptions/ConfigurationProperties">
<Conditional activeproject = "ILAsm">
<DialogPanel id = "ILAsmCompilerParametersPanel"
Modified: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/JavaBinding.addin.xml
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/JavaBinding.addin.xml 2004-06-29 19:15:11 UTC (rev 1861)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/JavaBinding.addin.xml 2004-06-29 22:11:10 UTC (rev 1862)
@@ -33,6 +33,23 @@
location = "templates/EmptyJavaFile.xft"/>
</Extension>
+ <Extension path = "/MonoDevelop/ProjectTemplates">
+ <ProjectTemplate id = "EmptyJavaProject"
+ location = "templates/EmptyJavaProject.xpt"/>
+ <ProjectTemplate id = "IkvmConsoleApplicationProject"
+ location = "templates/IkvmConsoleApplicationProject.xpt"/>
+ <ProjectTemplate id = "IkvmGladeApplicationProject"
+ location = "templates/IkvmGladeApplicationProject.xpt"/>
+ <ProjectTemplate id = "IkvmGnomeApplicationProject"
+ location = "templates/IkvmGnomeApplicationProject.xpt"/>
+ <ProjectTemplate id = "IkvmGtkApplicationProject"
+ location = "templates/IkvmGtkApplicationProject.xpt"/>
+ <ProjectTemplate id = "JavaApplicationProject"
+ location = "templates/JavaApplicationProject.xpt"/>
+ <ProjectTemplate id = "JavaConsoleApplicationProject"
+ location = "templates/JavaConsoleApplicationProject.xpt"/>
+ </Extension>
+
<Extension path = "/SharpDevelop/Workbench/ProjectOptions/ConfigurationProperties">
<Conditional activeproject = "Java">
<DialogPanel id = "JavaProjectPanel"
Modified: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/NemerleBinding.addin.xml
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/NemerleBinding.addin.xml 2004-06-29 19:15:11 UTC (rev 1861)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/NemerleBinding.addin.xml 2004-06-29 22:11:10 UTC (rev 1862)
@@ -21,6 +21,11 @@
location = "templates/EmptyNemerleFile.xft"/>
</Extension>
+ <Extension path = "/MonoDevelop/ProjectTemplates">
+ <ProjectTemplate id = "EmptyNemerleProject"
+ location = "templates/NemerleEmptyProject.xpt"/>
+ </Extension>
+
<Extension path = "/SharpDevelop/Workbench/ProjectOptions/ConfigurationProperties">
<Conditional activeproject = "Nemerle">
<DialogPanel id = "NemerleCodeGenerationPanel"
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/BlankCombine.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/Misc/BlankCombine.xpt)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/ConsoleProject.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/CSharp/ConsoleProject.xpt)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyJavaProject.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/Java/EmptyJavaProject.xpt)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/EmptyProject.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/CSharp/EmptyProject.xpt)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/GladeSharpProject.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/CSharp/GladeSharpProject.xpt)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/GnomeSharpProject.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/CSharp/GnomeSharpProject.xpt)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/GtkSharpProject.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/CSharp/GtkSharpProject.xpt)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/ILAsmConsoleProject.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/ILAsm/ConsoleProject.xpt)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/IkvmConsoleApplicationProject.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/Java/IkvmConsoleApplicationProject.xpt)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/IkvmGladeApplicationProject.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/Java/IkvmGladeApplicationProject.xpt)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/IkvmGnomeApplicationProject.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/Java/IkvmGnomeApplicationProject.xpt)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/IkvmGtkApplicationProject.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/Java/IkvmGtkApplicationProject.xpt)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaApplicationProject.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/Java/JavaApplicationProject.xpt)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/JavaConsoleApplicationProject.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/Java/JavaConsoleApplicationProject.xpt)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/Library.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/CSharp/Library.xpt)
Modified: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/Makefile.am 2004-06-29 19:15:11 UTC (rev 1861)
+++ trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/Makefile.am 2004-06-29 22:11:10 UTC (rev 1862)
@@ -17,6 +17,22 @@
JavaDialog.xft \
JavaFrame.xft \
JavaOKDialog.xft \
-JavaPanel.xft
+JavaPanel.xft \
+BlankCombine.xpt \
+ConsoleProject.xpt \
+EmptyJavaProject.xpt \
+EmptyProject.xpt \
+GladeSharpProject.xpt \
+GnomeSharpProject.xpt \
+GtkSharpProject.xpt \
+IkvmConsoleApplicationProject.xpt \
+IkvmGladeApplicationProject.xpt \
+IkvmGnomeApplicationProject.xpt \
+IkvmGtkApplicationProject.xpt \
+ILAsmConsoleProject.xpt \
+JavaApplicationProject.xpt \
+JavaConsoleApplicationProject.xpt \
+Library.xpt \
+NemerleEmptyProject.xpt
EXTRA_DIST = $(template_DATA)
Copied: trunk/MonoDevelop/Core/build/AddIns/AddIns/BackendBindings/templates/NemerleEmptyProject.xpt (from rev 1847, trunk/MonoDevelop/Core/build/data/templates/project/Nemerle/EmptyProject.xpt)
Modified: trunk/MonoDevelop/Core/build/data/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/build/data/Makefile.am 2004-06-29 19:15:11 UTC (rev 1861)
+++ trunk/MonoDevelop/Core/build/data/Makefile.am 2004-06-29 22:11:10 UTC (rev 1862)
@@ -1 +1 @@
-SUBDIRS = resources options templates
+SUBDIRS = resources options
Modified: trunk/MonoDevelop/Core/configure.in
===================================================================
--- trunk/MonoDevelop/Core/configure.in 2004-06-29 19:15:11 UTC (rev 1861)
+++ trunk/MonoDevelop/Core/configure.in 2004-06-29 22:11:10 UTC (rev 1862)
@@ -133,13 +133,6 @@
build/data/resources/css/Makefile
build/data/resources/icons/Makefile
build/data/resources/languages/Makefile
-build/data/templates/Makefile
-build/data/templates/project/Makefile
-build/data/templates/project/CSharp/Makefile
-build/data/templates/project/Java/Makefile
-build/data/templates/project/ILAsm/Makefile
-build/data/templates/project/Misc/Makefile
-build/data/templates/project/Nemerle/Makefile
build/doc/Makefile
build/AddIns/Makefile
build/AddIns/AddIns/Makefile
Modified: trunk/MonoDevelop/Core/data/resources/AddIn.xsd
===================================================================
--- trunk/MonoDevelop/Core/data/resources/AddIn.xsd 2004-06-29 19:15:11 UTC (rev 1861)
+++ trunk/MonoDevelop/Core/data/resources/AddIn.xsd 2004-06-29 22:11:10 UTC (rev 1862)
@@ -38,6 +38,7 @@
<xs:element ref="Class"/>
<xs:element ref="MenuItem"/>
<xs:element ref="FileTemplate"/>
+ <xs:element ref="ProjectTemplate"/>
</xs:choice>
<xs:attribute name="path" type="xs:string" use="required"/>
</xs:complexType>
@@ -131,6 +132,14 @@
</xs:complexContent>
</xs:complexType>
<xs:element name="FileTemplate" type="FileTemplate"/>
+ <xs:complexType name="ProjectTemplate">
+ <xs:complexContent>
+ <xs:extension base="AbstractCodon">
+ <xs:attribute name="location" type="xs:string" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="ProjectTemplate" type="ProjectTemplate"/>
<xs:complexType name="DialogPanel">
<xs:complexContent>
<xs:extension base="AbstractCodon">
Modified: trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-06-29 19:15:11 UTC (rev 1861)
+++ trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-06-29 22:11:10 UTC (rev 1862)
@@ -1,3 +1,11 @@
+2004-06-29 Todd Berman <tberman at off.net>
+
+ * Internal/Codons/Templates/ProjectTemplateCodon.cs: new codon for
+ project templates.
+ * Internal/Templates/ProjectTemplates/ProjectTemplate.cs: convert to
+ using new codon based system.
+ * Makefile.am: add new file.
+
2004-06-28 Todd Berman <tberman at off.net>
* Gui/Workbench/Layouts/SdiWorkspaceWindow.cs: make sure everything is
Added: trunk/MonoDevelop/Core/src/Main/Base/Internal/Codons/Templates/ProjectTemplateCodon.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Internal/Codons/Templates/ProjectTemplateCodon.cs 2004-06-29 19:15:11 UTC (rev 1861)
+++ trunk/MonoDevelop/Core/src/Main/Base/Internal/Codons/Templates/ProjectTemplateCodon.cs 2004-06-29 22:11:10 UTC (rev 1862)
@@ -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("ProjectTemplate")]
+ public class ProjectTemplateCodon : 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/ProjectTemplates/ProjectTemplate.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Internal/Templates/ProjectTemplates/ProjectTemplate.cs 2004-06-29 19:15:11 UTC (rev 1861)
+++ trunk/MonoDevelop/Core/src/Main/Base/Internal/Templates/ProjectTemplates/ProjectTemplate.cs 2004-06-29 22:11:10 UTC (rev 1862)
@@ -19,6 +19,9 @@
using MonoDevelop.Services;
using MonoDevelop.Gui.Dialogs;
+using MonoDevelop.Core.AddIns;
+using MonoDevelop.Core.AddIns.Codons;
+
namespace MonoDevelop.Internal.Templates
{
public class OpenFileAction
@@ -211,16 +214,17 @@
{
FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
- StringCollection files = fileUtilityService.SearchDirectory(propertyService.DataDirectory +
- Path.DirectorySeparatorChar + "templates" +
- Path.DirectorySeparatorChar + "project", "*.xpt");
- foreach (string fileName in files) {
+ LoadTemplates ((ProjectTemplateCodon[])(AddInTreeSingleton.AddInTree.GetTreeNode ("/MonoDevelop/ProjectTemplates").BuildChildItems (new object ()).ToArray (typeof (ProjectTemplateCodon))));
+ }
+
+ static void LoadTemplates (ProjectTemplateCodon[] codons)
+ {
+ IMessageService messageService = (IMessageService) ServiceManager.GetService (typeof (IMessageService));
+ foreach (ProjectTemplateCodon codon in codons) {
try {
- ProjectTemplates.Add(new ProjectTemplate(fileName));
+ ProjectTemplates.Add (new ProjectTemplate (codon.Location));
} catch (Exception e) {
- IResourceService resourceService = (IResourceService)ServiceManager.GetService(typeof(IResourceService));
- IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
- messageService.ShowError(e, resourceService.GetString("Internal.Templates.ProjectTemplate.LoadingError") + "\n(" + fileName + ")\n");
+ 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-29 19:15:11 UTC (rev 1861)
+++ trunk/MonoDevelop/Core/src/Main/Base/Makefile.am 2004-06-29 22:11:10 UTC (rev 1862)
@@ -243,6 +243,7 @@
./Internal/Codons/MenuItems/ICheckableMenuCommand.cs \
./Internal/Codons/MenuItems/MenuItemCodon.cs \
./Internal/Codons/Templates/FileTemplateCodon.cs \
+./Internal/Codons/Templates/ProjectTemplateCodon.cs \
./Internal/DataStructures/PriorityQueue.cs \
./Internal/Parser/IRegion.cs \
./Internal/Parser/ICompilationUnitBase.cs \
More information about the Monodevelop-patches-list
mailing list