From: Chris M. <cm...@us...> - 2006-05-28 19:32:29
|
User: cmicali Date: 06/05/28 12:32:27 Modified: etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn AndroMDA.VS80AddIn.csproj Resource1.Designer.cs Resource1.resx WizardSolutionProcessor.cs Added: etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resources/Web web.config web.config.nhibernate etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resources nhibernate.config Removed: etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resources/SchemaExport nhibernate.config Log: - Added web.config export for web site generation in solution wizard Revision Changes Path 1.11 +4 -2 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn.csproj Index: AndroMDA.VS80AddIn.csproj =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn.csproj,v retrieving revision 1.10 retrieving revision 1.11 diff -u -w -r1.10 -r1.11 --- AndroMDA.VS80AddIn.csproj 28 May 2006 15:49:55 -0000 1.10 +++ AndroMDA.VS80AddIn.csproj 28 May 2006 19:32:27 -0000 1.11 @@ -35,6 +35,7 @@ </PropertyGroup> <ItemGroup> <Reference Include="Extensibility, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <Reference Include="Microsoft.VisualStudio.VCCodeModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <Reference Include="Microsoft.VisualStudio.VCProject, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <Reference Include="Microsoft.VisualStudio.VCProjectEngine, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <Reference Include="System" /> @@ -277,6 +278,7 @@ <None Include="Resources\cvsignore" /> <None Include="Resources\maven.xml" /> <None Include="Resources\mda\cvsignore" /> + <None Include="Resources\nhibernate.config" /> <None Include="Resources\project.properties" /> <None Include="Resources\project.xml" /> <None Include="Resources\mda\maven.xml" /> @@ -288,7 +290,6 @@ <None Include="Resources\Core\project.xml" /> <None Include="Resources\SchemaExport\App.config" /> <None Include="Resources\SchemaExport\cvsignore" /> - <None Include="Resources\SchemaExport\nhibernate.config" /> <None Include="Resources\SchemaExport\Program.cs" /> <None Include="Resources\Lib\AndroMDA.NHibernateSupport.dll" /> <None Include="Resources\Lib\Bamboo.Prevalence.dll" /> @@ -302,7 +303,8 @@ <None Include="Resources\Lib\NHibernate.Nullables2.dll" /> <None Include="Resources\Web\Bin\cvsignore" /> <None Include="Resources\Web\cvsignore" /> - <None Include="Resources\Web\nhibernate.config" /> + <None Include="Resources\Web\web.config" /> + <None Include="Resources\Web\web.config.nhibernate" /> </ItemGroup> <ItemGroup> <Folder Include="MavenProxy\" /> 1.5 +28 -26 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resource1.Designer.cs Index: Resource1.Designer.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resource1.Designer.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- Resource1.Designer.cs 28 May 2006 15:49:55 -0000 1.4 +++ Resource1.Designer.cs 28 May 2006 19:32:27 -0000 1.5 @@ -339,6 +339,22 @@ } /// <summary> + /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?> + ///<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0" > + /// <session-factory name="nhibernator"> + /// <!-- properties --> + /// <property name="hibernate.connection.provider">NHibernate.Connection.DriverConnectionProvider</property> + /// <property name="hibernate.dialect">${wizard.database.nhibernatedialect}</property> + /// <property name="hibernate.connection.driver_class">${wizard.hibernate.connection.driver_class}</property> + /// < [rest of string was truncated]";. + /// </summary> + internal static string nhibernate_config { + get { + return ResourceManager.GetString("nhibernate_config", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to # ---------- Default Build Properties ---------- ///# Change this to generate to the correct MDA database mappings ///# For SQL Server use: MSSQL @@ -416,22 +432,6 @@ } /// <summary> - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?> - ///<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0" > - /// <session-factory name="nhibernator"> - /// <!-- properties --> - /// <property name="hibernate.connection.provider">NHibernate.Connection.DriverConnectionProvider</property> - /// <property name="hibernate.dialect">${wizard.database.nhibernatedialect}</property> - /// <property name="hibernate.connection.driver_class">${wizard.hibernate.connection.driver_class}</property> - /// < [rest of string was truncated]";. - /// </summary> - internal static string SchemaExport_nhibernate_config { - get { - return ResourceManager.GetString("SchemaExport_nhibernate_config", resourceCulture); - } - } - - /// <summary> /// Looks up a localized string similar to using System; ///using NHibernate; ///using AndroMDA.NHibernateSupport; @@ -475,18 +475,20 @@ } /// <summary> - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?> - ///<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0" > - /// <session-factory name="nhibernator"> - /// <!-- properties --> - /// <property name="hibernate.connection.provider">NHibernate.Connection.DriverConnectionProvider</property> - /// <property name="hibernate.dialect">${wizard.database.nhibernatedialect}</property> - /// <property name="hibernate.connection.driver_class">${wizard.hibernate.connection.driver_class}</property> - /// < [rest of string was truncated]";. + /// Looks up a localized string similar to . + /// </summary> + internal static string web_web_config { + get { + return ResourceManager.GetString("web_web_config", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to . /// </summary> - internal static string web_nhibernate_config { + internal static string web_web_config_nhibernate { get { - return ResourceManager.GetString("web_nhibernate_config", resourceCulture); + return ResourceManager.GetString("web_web_config_nhibernate", resourceCulture); } } } 1.5 +7 -4 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resource1.resx Index: Resource1.resx =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resource1.resx,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- Resource1.resx 28 May 2006 15:49:55 -0000 1.4 +++ Resource1.resx 28 May 2006 19:32:27 -0000 1.5 @@ -196,8 +196,8 @@ <data name="SchemaExport_cvsignore" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>Resources\SchemaExport\cvsignore;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </data> - <data name="SchemaExport_nhibernate_config" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>Resources\SchemaExport\nhibernate.config;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> + <data name="nhibernate_config" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>Resources\nhibernate.config;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> </data> <data name="SchemaExport_Program_cs" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>Resources\SchemaExport\Program.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> @@ -208,7 +208,10 @@ <data name="web_cvsignore" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>Resources\Web\cvsignore;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </data> - <data name="web_nhibernate_config" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>Resources\Web\nhibernate.config;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> + <data name="web_web_config" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>Resources\Web\web.config;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> + </data> + <data name="web_web_config_nhibernate" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>Resources\Web\web.config.nhibernate;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </data> </root> \ No newline at end of file 1.6 +8 -5 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/WizardSolutionProcessor.cs Index: WizardSolutionProcessor.cs =================================================================== RCS file: /cvsroot/andromdaplugins/plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/WizardSolutionProcessor.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- WizardSolutionProcessor.cs 28 May 2006 15:49:55 -0000 1.5 +++ WizardSolutionProcessor.cs 28 May 2006 19:32:27 -0000 1.6 @@ -156,7 +156,7 @@ AddToStatus("Creating schema export project " + m_configuration["projects.schemaexport.name"] + "..."); schemaExportProject = VSSolutionUtils.AddConsoleAppProjectToSolution(m_configuration["projects.schemaexport.name"], (Solution2)m_applicationObject.Solution); WriteFile(basePath + "\\" + m_configuration["projects.schemaexport.dir"] + "\\App.config", ParseVariables(Resource1.SchemaExport_App_config)); - WriteFile(basePath + "\\" + m_configuration["projects.schemaexport.dir"] + "\\nhibernate.config", ParseVariables(Resource1.SchemaExport_nhibernate_config)); + WriteFile(basePath + "\\" + m_configuration["projects.schemaexport.dir"] + "\\nhibernate.config", ParseVariables(Resource1.nhibernate_config)); WriteFile(basePath + "\\" + m_configuration["projects.schemaexport.dir"] + "\\Program.cs", ParseVariables(Resource1.SchemaExport_Program_cs)); ProjectItem appConfig = schemaExportProject.ProjectItems.AddFromFile(basePath + "\\" + m_configuration["projects.schemaexport.dir"] + "\\App.config"); ProjectItem nhibernateConfig = schemaExportProject.ProjectItems.AddFromFile(basePath + "\\" + m_configuration["projects.schemaexport.dir"] + "\\nhibernate.config"); @@ -183,17 +183,20 @@ webProject = VSSolutionUtils.AddWebProjectToSolution(m_configuration["projects.web.name"], (Solution2)m_applicationObject.Solution); VsWebSite.VSWebSite webSite = webProject.Object as VsWebSite.VSWebSite; - // TODO: Create or modify web.config to include AndroMDA.NHibernateSupport - + string webconfig; if (m_configuration["projects.web.usenhibernateconfig"] == "true") { - WriteFile(basePath + "\\" + m_configuration["projects.web.dir"] + "\\nhibernate.config", ParseVariables(Resource1.web_nhibernate_config)); + WriteFile(basePath + "\\" + m_configuration["projects.web.dir"] + "\\nhibernate.config", ParseVariables(Resource1.nhibernate_config)); + webconfig = Resource1.web_web_config; } else { - // TODO: Add NHibernate settings to web.config + webconfig = Resource1.web_web_config_nhibernate; } + WriteFile(basePath + "\\" + m_configuration["projects.web.dir"] + "\\Web.config", ParseVariables(webconfig)); + webProject.ProjectItems.AddFromFile(basePath + "\\" + m_configuration["projects.web.dir"] + "\\Web.config"); + // TODO: Render Global.asax (if applicable) // Write Web/cvsignore and Web\Bin\cvsignore 1.1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resources/Web/web.config Index: web.config =================================================================== <?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config --> <configuration> <appSettings> <add key="nhibernate.config" value="~/nhibernate.config"/> </appSettings> <connectionStrings/> <system.web> <!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --> <compilation debug="true" /> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <authentication mode="Windows" /> <!-- <authentication mode="Forms"> <forms name="FormsAuth" timeout="30" loginUrl="~/Public/Login.aspx" defaultUrl="~/Default.aspx" path="/" protection="All"/> </authentication> <authorization> <deny users="?"/> </authorization> --> <!-- <membership defaultProvider="DomainMembershipProvider"> <providers> <clear/> <add name="DomainMembershipProvider" type="MembershipExample.Web.Shared.DomainMembershipProvider, MembershipExample.Web.Shared" enablePasswordRetrieval="false" enablePasswordReset="false" requiresUniqueEmail="true" requiresQuestionAndAnswer="false" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" hashAlgorithmType="SHA1" passwordFormat="Hashed"/> </providers> </membership> <roleManager enabled="true" cacheRolesInCookie="true" cookieName=".DRPRoles" defaultProvider="DomainRoleProvider"> <providers> <add name="DomainRoleProvider" type="MembershipExample.Web.Shared.DomainRoleProvider, MembershipExample.Web.Shared" /> </providers> </roleManager> --> <httpModules> <add type="AndroMDA.NHibernateSupport.HttpSessionManagerModule, AndroMDA.NHibernateSupport" name="HttpSessionManagerModule"/> </httpModules> <!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> </system.web> <!-- <location path="Public"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location> --> </configuration> 1.1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resources/Web/web.config.nhibernate Index: web.config.nhibernate =================================================================== <?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config --> <configuration> <configSections> <section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089"/> </configSections> <appSettings/> <connectionStrings/> <nhibernate> <!-- properties --> <add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/> <add key="hibernate.dialect" value="${wizard.database.nhibernatedialect}"/> <add key="hibernate.connection.driver_class" value="${wizard.hibernate.connection.driver_class}"/> <add key="hibernate.connection.connection_string" value="server=localhost;database=${wizard.database.name};Integrated Security=SSPI;"/> <add key="hibernate.use_outer_join" value="true"/> <add key="hibernate.query.substitutions" value="true 1, false 0, yes 'Y', no 'N'"/> <add key="hibernate.cache.provider_class" value="NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache"/> <add key="hibernate.show_sql" value="false"/> <add key="nhibernate.mapping_assembly" value="${wizard.projects.core.name}"/> </nhibernate> <system.web> <!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --> <compilation debug="true" /> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <authentication mode="Windows" /> <!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> <!-- <authentication mode="Forms"> <forms name="FormsAuth" timeout="30" loginUrl="~/Public/Login.aspx" defaultUrl="~/Default.aspx" path="/" protection="All"/> </authentication> <authorization> <deny users="?"/> </authorization> --> <!-- <membership defaultProvider="DomainMembershipProvider"> <providers> <clear/> <add name="DomainMembershipProvider" type="MembershipExample.Web.Shared.DomainMembershipProvider, MembershipExample.Web.Shared" enablePasswordRetrieval="false" enablePasswordReset="false" requiresUniqueEmail="true" requiresQuestionAndAnswer="false" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" hashAlgorithmType="SHA1" passwordFormat="Hashed"/> </providers> </membership> <roleManager enabled="true" cacheRolesInCookie="true" cookieName=".DRPRoles" defaultProvider="DomainRoleProvider"> <providers> <add name="DomainRoleProvider" type="MembershipExample.Web.Shared.DomainRoleProvider, MembershipExample.Web.Shared" /> </providers> </roleManager> --> <httpModules> <add type="AndroMDA.NHibernateSupport.HttpSessionManagerModule, AndroMDA.NHibernateSupport" name="HttpSessionManagerModule"/> </httpModules> </system.web> <!-- <location path="Public"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location> --> </configuration> 1.1 plugins/etc/andromda-dotnet/AndroMDA.VS80AddIn/AndroMDA.VS80AddIn/Resources/nhibernate.config Index: nhibernate.config =================================================================== <?xml version="1.0" encoding="utf-8" ?> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.0" > <session-factory name="nhibernator"> <!-- properties --> <property name="hibernate.connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="hibernate.dialect">${wizard.database.nhibernatedialect}</property> <property name="hibernate.connection.driver_class">${wizard.hibernate.connection.driver_class}</property> <property name="hibernate.connection.connection_string">server=localhost;database=${wizard.database.name};Integrated Security=SSPI;</property> <property name="hibernate.use_outer_join">true</property> <property name="hibernate.query.substitutions">true 1, false 0, yes 'Y', no 'N'</property> <property name="hibernate.cache.provider_class">NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache</property> <property name="hibernate.show_sql">false</property> <!-- mapping files --> <mapping assembly="${wizard.projects.core.name}" /> </session-factory> </hibernate-configuration> |