Improved commenting on initialiser of properties which have type='entity' and a default value. We still can't generate the right code but I am generating a comment which explains why not. Using fully qualified class names in -with- entrypoints in controllers.

This commit is contained in:
sb 2009-05-08 16:27:24 +00:00
parent 9628ed0b71
commit 74e730c444
2 changed files with 16 additions and 16 deletions

View file

@ -9,8 +9,8 @@
Transform ADL into (partial) controller classes
$Author: sb $
$Revision: 1.39 $
$Date: 2009-05-01 15:28:58 $
$Revision: 1.40 $
$Date: 2009-05-08 16:27:24 $
-->
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
@ -72,7 +72,7 @@
//
// Automatically generated abstract super class for controllers for the
// <xsl:value-of select="/adl:application/@name"/> application; generated using
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.39 $', 10)"/>
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.40 $', 10)"/>
//
// <xsl:value-of select="/adl:application/@revision"/>
//
@ -182,7 +182,7 @@
//
// Controller for auto-generated forms for editing <xsl:value-of select="@name"/>s
// Automatically generated from application description using
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.39 $', 10)"/>
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.40 $', 10)"/>
//
// This file is automatically generated; DO NOT EDIT IT.
//
@ -927,7 +927,7 @@
{
AssertUserCanRead();
ISession hibernator = GetDBSession();
<xsl:value-of select="ancestor::adl:entity/@name"/> record = new <xsl:value-of select="ancestor::adl:entity/@name"/>();
<xsl:value-of select="ancestor::adl:entity/@name"/> record = new <xsl:value-of select="concat( $entityns, '.', ancestor::adl:entity/@name)"/>();
record.<xsl:value-of select="@name"/> = <xsl:call-template name="fetch-property-instance">
<xsl:with-param name="property" select="."/>

View file

@ -8,8 +8,8 @@
Transform ADL into C# entity classes
$Author: sb $
$Revision: 1.25 $
$Date: 2009-05-07 10:31:26 $
$Revision: 1.26 $
$Date: 2009-05-08 16:27:24 $
-->
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
@ -70,7 +70,7 @@
// (c)2007 Cygnet Solutions Ltd
//
// Automatically generated from application description using
// adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.25 $', 10)"/>
// adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.26 $', 10)"/>
//
// <xsl:value-of select="/adl:application/@revision"/>
//
@ -97,7 +97,7 @@
/// &lt;/summary&gt;
/// &lt;remarks&gt;
/// Automatically generated from description of group <xsl:value-of select="@name"/>
/// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.25 $', 10)"/>.
/// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.26 $', 10)"/>.
///
/// DO NOT EDIT THIS FILE!
/// &lt;/remarks&gt;
@ -123,7 +123,7 @@
// (c)2007 Cygnet Solutions Ltd
//
// Automatically generated from application description using
// adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.25 $', 10)"/>
// adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.26 $', 10)"/>
//
// <xsl:value-of select="/adl:application/@revision"/>
//
@ -149,7 +149,7 @@
/// &lt;/summary&gt;
/// &lt;remarks&gt;
/// Automatically generated from description of entity <xsl:value-of select="@name"/>
/// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.25 $', 10)"/>.
/// using adl2entityclass.xsl revision <xsl:value-of select="substring( '$Revision: 1.26 $', 10)"/>.
/// Note that manually maintained parts of this class may be defined in
/// a separate file called <xsl:value-of select="@name"/>.manual.cs, q.v.
///
@ -458,8 +458,8 @@
= "<xsl:value-of select="@default"/>"
</xsl:when>
<xsl:when test="$base-type = 'entity'">
= null /* this isn't right but will do for now */
</xsl:when>
= null /* should collect the <xsl:value-of select="@entity"/> whose keyfield value is <xsl:value-of select="@default"/>, but don't have a session in scope through which this could be done */
</xsl:when>
<xsl:when test="$csharp-base-type = 'String'">
= "<xsl:value-of select="@default"/>"
</xsl:when>
@ -840,9 +840,9 @@
<xsl:when test="$csharp-type = 'String'">
"<xsl:value-of select="@default"/>"
</xsl:when>
<xsl:when test="$base-type='entity'">
null /* not right but will do for now */
</xsl:when>
<xsl:when test="$base-type='entity'">
null /* should collect the <xsl:value-of select="@entity"/> whose keyfield value is <xsl:value-of select="@default"/>, but don't have a session in scope through which this could be done */
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@default"/>
</xsl:otherwise>