You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(21) |
Sep
(25) |
Oct
(13) |
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
(1) |
Oct
(1) |
Nov
(8) |
Dec
(3) |
2009 |
Jan
(5) |
Feb
(3) |
Mar
(10) |
Apr
(6) |
May
(3) |
Jun
(4) |
Jul
(1) |
Aug
(3) |
Sep
(5) |
Oct
(1) |
Nov
(2) |
Dec
(2) |
2010 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
(3) |
Oct
(2) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2012 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(4) |
Nov
(4) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(3) |
Dec
(2) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
(5) |
2015 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <mcu...@us...> - 2008-11-19 22:47:21
|
Revision: 1337 http://orm.svn.sourceforge.net/orm/?rev=1337&view=rev Author: mcurland Date: 2008-11-19 22:47:15 +0000 (Wed, 19 Nov 2008) Log Message: ----------- Modified LinqToSql service layer generation based on forum recommendations from John Bailey. refs #364 Incremented version number in preparation for 2008-10 CTP release. refs #193 Modified Paths: -------------- trunk/VersionGenerator.exe.config trunk/XML/DCILtoLINQ/DCILtoLinqAttributeMapping.xslt trunk/XML/DCILtoLINQ/LinqToSqlSettings.xml trunk/XML/DCILtoLINQ/LinqToSqlSettings.xslt Modified: trunk/VersionGenerator.exe.config =================================================================== --- trunk/VersionGenerator.exe.config 2008-11-18 22:29:11 UTC (rev 1336) +++ trunk/VersionGenerator.exe.config 2008-11-19 22:47:15 UTC (rev 1337) @@ -2,7 +2,7 @@ <configuration> <appSettings> <add key="RevisionStartYearMonth" value="2006-01"/> - <add key="ReleaseYearMonth" value="2008-05"/> + <add key="ReleaseYearMonth" value="2008-10"/> <!-- ReleaseType: "CTP" or "RTM" --> <add key="ReleaseType" value="CTP"/> <!-- Changes to the major and/or minor version numbers have extreme effects across every part of the product. --> Modified: trunk/XML/DCILtoLINQ/DCILtoLinqAttributeMapping.xslt =================================================================== --- trunk/XML/DCILtoLINQ/DCILtoLinqAttributeMapping.xslt 2008-11-18 22:29:11 UTC (rev 1336) +++ trunk/XML/DCILtoLINQ/DCILtoLinqAttributeMapping.xslt 2008-11-19 22:47:15 UTC (rev 1337) @@ -131,14 +131,14 @@ <xsl:variable name="setting" select="string($LinqToSqlSettings/opt:ServiceLayer/@Generate)"/> <xsl:choose> <xsl:when test="$setting"> - <xsl:value-of select="$setting='false' or $setting='0'"/> + <xsl:value-of select="$setting='true' or $setting='1'"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="false()"/> </xsl:otherwise> </xsl:choose> </xsl:variable> - <xsl:variable name="GenerateServiceLayer" select="string($GenerateServiceLayerFragment)"/> + <xsl:variable name="GenerateServiceLayer" select="string($GenerateServiceLayerFragment)='true'"/> <xsl:variable name="CreateKeywordFragment"> <xsl:variable name="setting" select="string($LinqToSqlSettings/opt:ServiceLayer/@CreateKeyword)"/> <xsl:choose> @@ -234,7 +234,31 @@ </xsl:otherwise> </xsl:choose> </xsl:variable> - <xsl:variable name="UseTransactionScopes" select="string($UseTransactionScopesFragment)"/> + <xsl:variable name="UseTransactionScopes" select="string($UseTransactionScopesFragment)='true'"/> + <xsl:variable name="UseTransactionFlowFragment"> + <xsl:variable name="setting" select="string($LinqToSqlSettings/opt:ServiceLayer/@UseTransactionFlow)"/> + <xsl:choose> + <xsl:when test="$setting"> + <xsl:value-of select="$setting='true' or $setting='1'"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="false()"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="UseTransactionFlow" select="string($UseTransactionFlowFragment)='true'"/> + <xsl:variable name="OptimizeOperationalMethodsFragment"> + <xsl:variable name="setting" select="string($LinqToSqlSettings/opt:ServiceLayer/@OptimizeOperationalMethods)"/> + <xsl:choose> + <xsl:when test="$setting"> + <xsl:value-of select="$setting='true' or $setting='1'"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="false()"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="OptimizeOperationalMethods" select="string($OptimizeOperationalMethodsFragment)='true'"/> <xsl:variable name="InstanceContextModeFragment"> <xsl:variable name="setting" select="string($LinqToSqlSettings/opt:ServiceLayer/@InstanceContextMode)"/> <xsl:choose> @@ -324,7 +348,7 @@ </xsl:template> <xsl:template name="GenerateOperationContractAttribute"> - <xsl:param name="isOneWay" select="true()"/> + <xsl:param name="isOneWay" select="$OptimizeOperationalMethods"/> <plx:attribute dataTypeName="OperationContract"> <plx:passParam> <plx:binaryOperator type="assignNamed"> @@ -367,13 +391,11 @@ <xsl:variable name="deleteFunctionParameterName" select="concat($parameterEntityNamePrefix,$to,$DeleteKeyword)"/> <!--NOTE: readFunctionName & readFunctionParameterName are more complicated and are not defined here.--> <plx:function visibility="public" name="{$createFunctionName}"> - <xsl:call-template name="GenerateOperationContractAttribute"> - <xsl:with-param name="isOneWay" select="true()"/> - </xsl:call-template> - <xsl:if test="$UseTransactionScopes"> + <xsl:call-template name="GenerateOperationContractAttribute"/> + <xsl:if test="$UseTransactionFlow and not($OptimizeOperationalMethods)"> <plx:attribute dataTypeName="TransactionFlow"> <plx:passParam> - <plx:callStatic dataTypeName="TransactionFlowOption" name="Allowed" type="property"/> + <plx:callStatic dataTypeName="TransactionFlowOption" name="Allowed" type="field"/> </plx:passParam> </plx:attribute> </xsl:if> @@ -433,13 +455,11 @@ </plx:function> </xsl:for-each> <plx:function visibility="public" name="{$updateFunctionName}"> - <xsl:call-template name="GenerateOperationContractAttribute"> - <xsl:with-param name="isOneWay" select="true()"/> - </xsl:call-template> - <xsl:if test="$UseTransactionScopes"> + <xsl:call-template name="GenerateOperationContractAttribute"/> + <xsl:if test="$UseTransactionFlow and not($OptimizeOperationalMethods)"> <plx:attribute dataTypeName="TransactionFlow"> <plx:passParam> - <plx:callStatic dataTypeName="TransactionFlowOption" name="Allowed" type="property"/> + <plx:callStatic dataTypeName="TransactionFlowOption" name="Allowed" type="field"/> </plx:passParam> </plx:attribute> </xsl:if> @@ -447,13 +467,11 @@ <plx:param dataTypeName="{$entityName}" name="{$updateFunctionParameterNameOld}"/> </plx:function> <plx:function name="{$deleteFunctionName}" visibility="public"> - <xsl:call-template name="GenerateOperationContractAttribute"> - <xsl:with-param name="isOneWay" select="true()"/> - </xsl:call-template> - <xsl:if test="$UseTransactionScopes"> + <xsl:call-template name="GenerateOperationContractAttribute"/> + <xsl:if test="$UseTransactionFlow and not($OptimizeOperationalMethods)"> <plx:attribute dataTypeName="TransactionFlow"> <plx:passParam> - <plx:callStatic dataTypeName="TransactionFlowOption" name="Allowed" type="property"/> + <plx:callStatic dataTypeName="TransactionFlowOption" name="Allowed" type="field"/> </plx:passParam> </plx:attribute> </xsl:if> @@ -543,7 +561,7 @@ <plx:attribute dataTypeName="OnSerializingAttribute"/> <plx:attribute dataTypeName="EditorBrowsableAttribute"> <plx:passParam> - <plx:callStatic dataTypeName="EditorBrowsableState" name="Never" type="property"/> + <plx:callStatic dataTypeName="EditorBrowsableState" name="Never" type="field"/> </plx:passParam> </plx:attribute> <plx:param dataTypeName="StreamingContext" name="context"/> @@ -560,7 +578,7 @@ <plx:attribute dataTypeName="OnSerializedAttribute"/> <plx:attribute dataTypeName="EditorBrowsableAttribute"> <plx:passParam> - <plx:callStatic dataTypeName="EditorBrowsableState" name="Never" type="property"/> + <plx:callStatic dataTypeName="EditorBrowsableState" name="Never" type="field"/> </plx:passParam> </plx:attribute> <plx:param dataTypeName="StreamingContext" name="context"/> @@ -577,7 +595,7 @@ <plx:attribute dataTypeName="OnDeserializingAttribute"/> <plx:attribute dataTypeName="EditorBrowsableAttribute"> <plx:passParam> - <plx:callStatic dataTypeName="EditorBrowsableState" name="Never" type="property"/> + <plx:callStatic dataTypeName="EditorBrowsableState" name="Never" type="field"/> </plx:passParam> </plx:attribute> <plx:param dataTypeName="StreamingContext" name="context"/> @@ -1791,7 +1809,7 @@ <plx:nameRef name="InstanceContextMode"/> </plx:left> <plx:right> - <plx:callStatic dataTypeName="InstanceContextMode" name="{$InstanceContextMode}" type="property"/> + <plx:callStatic dataTypeName="InstanceContextMode" name="{$InstanceContextMode}" type="field"/> </plx:right> </plx:binaryOperator> </plx:passParam> @@ -2195,7 +2213,7 @@ <plx:nameRef name="InstanceContextMode"/> </plx:left> <plx:right> - <plx:callStatic dataTypeName="InstanceContextMode" name="{$InstanceContextMode}" type="property"/> + <plx:callStatic dataTypeName="InstanceContextMode" name="{$InstanceContextMode}" type="field"/> </plx:right> </plx:binaryOperator> </plx:passParam> Modified: trunk/XML/DCILtoLINQ/LinqToSqlSettings.xml =================================================================== --- trunk/XML/DCILtoLINQ/LinqToSqlSettings.xml 2008-11-18 22:29:11 UTC (rev 1336) +++ trunk/XML/DCILtoLINQ/LinqToSqlSettings.xml 2008-11-19 22:47:15 UTC (rev 1337) @@ -1,17 +1,17 @@ <?xml version="1.0" encoding="utf-8"?> <LinqToSqlSettings xmlns="http://schemas.neumont.edu/ORM/2008-04/LinqToSql/Settings"> <!--These settings affect LinqToSql generators, but modifications here - have no effect until the .ORM file is regenerated. To force regenerationt, right + have no effect until the .ORM file is regenerated. To force regeneration, right click the parent .ORM file in the Solution Explorer and choose 'Run Custom Tool'. The schema file at the end this settings file is designed to help you customize your settings. For any of the settings areas, click immediately after the element - name and click space to see a list of individual attributes.--> + name and press space to see a list of individual attributes.--> <!--Change connection string properties here--> <ConnectionString DataSource="." SettingsProperty="" DatabaseName="" /> <!--Change basic name generation settings--> <NameParts /> - <!--Change WCF name generation settings--> - <ServiceLayer /> + <!--Change WCF service layer generation settings.--> + <ServiceLayer Generate="true" /> <!--Inline settings schema, do not modify--> <xs:schema targetNamespace="http://schemas.neumont.edu/ORM/2008-04/LinqToSql/Settings" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="LinqToSqlSettings"> @@ -43,27 +43,27 @@ <xs:complexType> <xs:attribute name="DataContextClassSuffix" type="NamePartType" default="DataContext"> <xs:annotation> - <xs:documentation>The text appended to the name of the generated class that is derived from System.Data.Linq.DataContext</xs:documentation> + <xs:documentation>The text appended to the name of the generated class that is derived from System.Data.Linq.DataContext. Default='DataContext'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="DataContextTableSuffix" type="NamePartType" default="Table"> <xs:annotation> - <xs:documentation>The text appended to the names of typed table getters in a DataContext class.</xs:documentation> + <xs:documentation>The text appended to the names of typed table getters in a DataContext class. Default='Table'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="CollectionSuffix" type="NamePartType" default="Collection"> <xs:annotation> - <xs:documentation>The text appended to the names of typed EntitySet properties.</xs:documentation> + <xs:documentation>The text appended to the names of typed EntitySet properties. Default='Collection'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="AssociationReferenceSuffix" type="NamePartType" default="Reference"> <xs:annotation> - <xs:documentation>The text appended to the names of typed properties used for association navigation (the source or target of a foreign key).</xs:documentation> + <xs:documentation>The text appended to the names of typed properties used for association navigation (the source or target of a foreign key). Default='Reference'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="PrivateFieldPrefix" type="NamePartType" default="_"> <xs:annotation> - <xs:documentation>The text prepended to private field names.</xs:documentation> + <xs:documentation>The text prepended to private field names. Default='_'</xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> @@ -72,47 +72,62 @@ <xs:complexType> <xs:attribute name="Generate" type="xs:boolean" default="false"> <xs:annotation> - <xs:documentation>Determines whether or not the generator should include WCF DataContract attributes and ServiceContract calls.</xs:documentation> + <xs:documentation>Determines whether or not the generator should include WCF DataContract attributes and ServiceContract calls. Default=false</xs:documentation> </xs:annotation> </xs:attribute> + <xs:attribute name="UseTransactionScopes" type="xs:boolean" default="true"> + <xs:annotation> + <xs:documentation>Determines whether or not the generator should use Transaction Scopes in the operational methods. Default=true</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="UseTransactionFlow" type="xs:boolean" default="false"> + <xs:annotation> + <xs:documentation>Determines whether or not the generator should support transaction flow from the client in the WCF contract. Default=false</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="OptimizeOperationalMethods" type="xs:boolean" default="false"> + <xs:annotation> + <xs:documentation>Determines whether or not the generator should mark operational methods as one way in the contract. Transaction Flow is not used if set to true. Default=false</xs:documentation> + </xs:annotation> + </xs:attribute> <xs:attribute name="CreateKeyword" type="NamePartType" default="Insert"> <xs:annotation> - <xs:documentation>The text prepended to the name of 'create' service methods in the WCF service contract.</xs:documentation> + <xs:documentation>The text prepended to the name of 'create' service methods in the WCF service contract. Default='Insert'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="ReadKeyword" type="NamePartType" default="Select"> <xs:annotation> - <xs:documentation>The text prepended to the name of 'read' service methods in the WCF service contract.</xs:documentation> + <xs:documentation>The text prepended to the name of 'read' service methods in the WCF service contract. Default='Select'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="UpdateKeyword" type="NamePartType" default="Update"> <xs:annotation> - <xs:documentation>The text prepended to the name of 'update' service methods in the WCF service contract.</xs:documentation> + <xs:documentation>The text prepended to the name of 'update' service methods in the WCF service contract. Default='Update'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="DeleteKeyword" type="NamePartType" default="Delete"> <xs:annotation> - <xs:documentation>The text prepended to the name of 'delete' service methods in the WCF service contract.</xs:documentation> + <xs:documentation>The text prepended to the name of 'delete' service methods in the WCF service contract. Default='Delete'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="PreferredIdKeyword" type="NamePartType" default="PreferredIdentifier"> <xs:annotation> - <xs:documentation>The text appended to the name of service methods used to select by the preferred identifier.</xs:documentation> + <xs:documentation>The text appended to the name of service methods used to select by the preferred identifier. Default='PreferredIdentifier'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="ServiceNameSuffix" type="NamePartType" default="Service"> <xs:annotation> - <xs:documentation>The text appended to the name of service contract interfaces.</xs:documentation> + <xs:documentation>The text appended to the name of service contract interfaces. Default='Service'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="InitializeFunctionName" type="NamePartType" default="Initialize"> <xs:annotation> - <xs:documentation>If WCF service is generated, this specifes the function name for initializing EntitySet members for serialization.</xs:documentation> + <xs:documentation>If WCF service is generated, this specifes the function name for initializing EntitySet members for serialization. Default='Initialize'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="InstanceContextMode" default="PerCall"> <xs:annotation> - <xs:documentation>Determines the InstanceContextMode used with the ServiceBehavior attribute.</xs:documentation> + <xs:documentation>Determines the InstanceContextMode used with the ServiceBehavior attribute. Default='PerCall'</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:token"> @@ -133,4 +148,4 @@ </xs:restriction> </xs:simpleType> </xs:schema> -</LinqToSqlSettings> \ No newline at end of file +</LinqToSqlSettings> Modified: trunk/XML/DCILtoLINQ/LinqToSqlSettings.xslt =================================================================== --- trunk/XML/DCILtoLINQ/LinqToSqlSettings.xslt 2008-11-18 22:29:11 UTC (rev 1336) +++ trunk/XML/DCILtoLINQ/LinqToSqlSettings.xslt 2008-11-19 22:47:15 UTC (rev 1337) @@ -7,17 +7,17 @@ <xsl:template match="/"> <LinqToSqlSettings xmlns="http://schemas.neumont.edu/ORM/2008-04/LinqToSql/Settings"> <xsl:comment>These settings affect LinqToSql generators, but modifications here - have no effect until the .ORM file is regenerated. To force regenerationt, right - click the parent .ORM file in the Solution Explorer and choose 'Run Custom Tool'. + have no effect until the .ORM file is regenerated. To force regeneration, right + click the parent .ORM file in the Solution Explorer and choose 'Run Custom Tool'. The schema file at the end this settings file is designed to help you customize your settings. For any of the settings areas, click immediately after the element - name and click space to see a list of individual attributes.</xsl:comment> + name and press space to see a list of individual attributes.</xsl:comment> <xsl:comment>Change connection string properties here</xsl:comment> <ConnectionString DataSource="." SettingsProperty="" DatabaseName=""/> <xsl:comment>Change basic name generation settings</xsl:comment> <NameParts/> - <xsl:comment>Change WCF name generation settings</xsl:comment> - <ServiceLayer/> + <xsl:comment>Change WCF service layer generation settings</xsl:comment> + <ServiceLayer Generate="true"/> <xsl:comment>Inline settings schema, do not modify</xsl:comment> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.neumont.edu/ORM/2008-04/LinqToSql/Settings" @@ -51,27 +51,27 @@ <xs:complexType> <xs:attribute name="DataContextClassSuffix" type="NamePartType" default="DataContext"> <xs:annotation> - <xs:documentation>The text appended to the name of the generated class that is derived from System.Data.Linq.DataContext</xs:documentation> + <xs:documentation>The text appended to the name of the generated class that is derived from System.Data.Linq.DataContext. Default='DataContext'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="DataContextTableSuffix" type="NamePartType" default="Table"> <xs:annotation> - <xs:documentation>The text appended to the names of typed table getters in a DataContext class.</xs:documentation> + <xs:documentation>The text appended to the names of typed table getters in a DataContext class. Default='Table'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="CollectionSuffix" type="NamePartType" default="Collection"> <xs:annotation> - <xs:documentation>The text appended to the names of typed EntitySet properties.</xs:documentation> + <xs:documentation>The text appended to the names of typed EntitySet properties. Default='Collection'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="AssociationReferenceSuffix" type="NamePartType" default="Reference"> <xs:annotation> - <xs:documentation>The text appended to the names of typed properties used for association navigation (the source or target of a foreign key).</xs:documentation> + <xs:documentation>The text appended to the names of typed properties used for association navigation (the source or target of a foreign key). Default='Reference'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="PrivateFieldPrefix" type="NamePartType" default="_"> <xs:annotation> - <xs:documentation>The text prepended to private field names.</xs:documentation> + <xs:documentation>The text prepended to private field names. Default='_'</xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> @@ -80,47 +80,62 @@ <xs:complexType> <xs:attribute name="Generate" type="xs:boolean" default="false"> <xs:annotation> - <xs:documentation>Determines whether or not the generator should include WCF DataContract attributes and ServiceContract calls.</xs:documentation> + <xs:documentation>Determines whether or not the generator should include WCF DataContract attributes and ServiceContract calls. Default=false</xs:documentation> </xs:annotation> </xs:attribute> + <xs:attribute name="UseTransactionScopes" type="xs:boolean" default="true"> + <xs:annotation> + <xs:documentation>Determines whether or not the generator should use Transaction Scopes in the operational methods. Default=true</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="UseTransactionFlow" type="xs:boolean" default="false"> + <xs:annotation> + <xs:documentation>Determines whether or not the generator should support transaction flow from the client in the WCF contract. Default=false</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="OptimizeOperationalMethods" type="xs:boolean" default="false"> + <xs:annotation> + <xs:documentation>Determines whether or not the generator should mark operational methods as one way in the contract. Transaction Flow is not used if set to true. Default=false</xs:documentation> + </xs:annotation> + </xs:attribute> <xs:attribute name="CreateKeyword" type="NamePartType" default="Insert"> <xs:annotation> - <xs:documentation>The text prepended to the name of 'create' service methods in the WCF service contract.</xs:documentation> + <xs:documentation>The text prepended to the name of 'create' service methods in the WCF service contract. Default='Insert'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="ReadKeyword" type="NamePartType" default="Select"> <xs:annotation> - <xs:documentation>The text prepended to the name of 'read' service methods in the WCF service contract.</xs:documentation> + <xs:documentation>The text prepended to the name of 'read' service methods in the WCF service contract. Default='Select'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="UpdateKeyword" type="NamePartType" default="Update"> <xs:annotation> - <xs:documentation>The text prepended to the name of 'update' service methods in the WCF service contract.</xs:documentation> + <xs:documentation>The text prepended to the name of 'update' service methods in the WCF service contract. Default='Update'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="DeleteKeyword" type="NamePartType" default="Delete"> <xs:annotation> - <xs:documentation>The text prepended to the name of 'delete' service methods in the WCF service contract.</xs:documentation> + <xs:documentation>The text prepended to the name of 'delete' service methods in the WCF service contract. Default='Delete'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="PreferredIdKeyword" type="NamePartType" default="PreferredIdentifier"> <xs:annotation> - <xs:documentation>The text appended to the name of service methods used to select by the preferred identifier.</xs:documentation> + <xs:documentation>The text appended to the name of service methods used to select by the preferred identifier. Default='PreferredIdentifier'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="ServiceNameSuffix" type="NamePartType" default="Service"> <xs:annotation> - <xs:documentation>The text appended to the name of service contract interfaces.</xs:documentation> + <xs:documentation>The text appended to the name of service contract interfaces. Default='Service'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="InitializeFunctionName" type="NamePartType" default="Initialize"> <xs:annotation> - <xs:documentation>If WCF service is generated, this specifes the function name for initializing EntitySet members for serialization.</xs:documentation> + <xs:documentation>If WCF service is generated, this specifes the function name for initializing EntitySet members for serialization. Default='Initialize'</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="InstanceContextMode" default="PerCall"> <xs:annotation> - <xs:documentation>Determines the InstanceContextMode used with the ServiceBehavior attribute.</xs:documentation> + <xs:documentation>Determines the InstanceContextMode used with the ServiceBehavior attribute. Default='PerCall'</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:token"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2008-11-18 22:29:15
|
Revision: 1336 http://orm.svn.sourceforge.net/orm/?rev=1336&view=rev Author: mcurland Date: 2008-11-18 22:29:11 +0000 (Tue, 18 Nov 2008) Log Message: ----------- Fix trailing comma in MySQL DDL. Add commas in table definitions before a non-lead element is rendered, not after an earlier one. This fix is not totally bullet proof, but a DDIL renderer would need to not render a column to break it, which is much less likely than not rendering a constraint. fixes #378 Modified Paths: -------------- trunk/XML/DILtoSQL/DDILtoPostgreSQL.xslt trunk/XML/DILtoSQL/DDILtoSQLStandard.xslt trunk/XML/GenerationSamples/SampleModel.MySQL.sql Modified: trunk/XML/DILtoSQL/DDILtoPostgreSQL.xslt =================================================================== (Binary files differ) Modified: trunk/XML/DILtoSQL/DDILtoSQLStandard.xslt =================================================================== (Binary files differ) Modified: trunk/XML/GenerationSamples/SampleModel.MySQL.sql =================================================================== --- trunk/XML/GenerationSamples/SampleModel.MySQL.sql 2008-11-18 19:57:24 UTC (rev 1335) +++ trunk/XML/GenerationSamples/SampleModel.MySQL.sql 2008-11-18 22:29:11 UTC (rev 1336) @@ -42,7 +42,7 @@ CONSTRAINT Person_UC8 UNIQUE(mandatoryUniqueString), CONSTRAINT Person_UC9 UNIQUE(optionalUniqueTinyInt), CONSTRAINT Person_UC10 UNIQUE(mandatoryUniqueTinyInt), - CONSTRAINT Person_UC11 UNIQUE(childPersonFather, childPersonBirthOrderNr, childPersonMother), + CONSTRAINT Person_UC11 UNIQUE(childPersonFather, childPersonBirthOrderNr, childPersonMother) ); CREATE TABLE Task This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2008-11-18 19:57:27
|
Revision: 1335 http://orm.svn.sourceforge.net/orm/?rev=1335&view=rev Author: mcurland Date: 2008-11-18 19:57:24 +0000 (Tue, 18 Nov 2008) Log Message: ----------- Selecting the context window is causing a phantom 'New Page' diagram to appear in the model browser and diagram spy windows. We need to ignore any diagrams that are not in the default partition. refs #376 refs #377 Modified Paths: -------------- trunk/ORMModel/Shell/DiagramSurvey.cs trunk/ORMModel/Shell/ORMDiagramSpy.cs Modified: trunk/ORMModel/Shell/DiagramSurvey.cs =================================================================== --- trunk/ORMModel/Shell/DiagramSurvey.cs 2008-11-18 10:12:46 UTC (rev 1334) +++ trunk/ORMModel/Shell/DiagramSurvey.cs 2008-11-18 19:57:24 UTC (rev 1335) @@ -176,11 +176,16 @@ if (expansionKey == null) { Dictionary<Diagram, DiagramNode> diagramToNodeMap = myDiagramToNodeMap ?? (myDiagramToNodeMap = new Dictionary<Diagram, DiagramNode>()); + Store store = Store; + Partition defaultPartition = store.DefaultPartition; foreach (Diagram diagram in Store.ElementDirectory.FindElements<Diagram>(true)) { - DiagramNode node = new DiagramNode(diagram); - diagramToNodeMap.Add(diagram, node); - yield return node; + if (diagram.Partition == defaultPartition) + { + DiagramNode node = new DiagramNode(diagram); + diagramToNodeMap.Add(diagram, node); + yield return node; + } } } } @@ -213,7 +218,10 @@ { INotifySurveyElementChanged eventNotify; ModelElement element = e.ModelElement; - if (!element.IsDeleted && null != (eventNotify = (element.Store as IORMToolServices).NotifySurveyElementChanged)) + Store store; + if (!element.IsDeleted && + (store = element.Store).DefaultPartition == element.Partition && + null != (eventNotify = (store as IORMToolServices).NotifySurveyElementChanged)) { Diagram diagram = (Diagram)element; DiagramNode node = new DiagramNode(diagram); @@ -228,8 +236,10 @@ Dictionary<Diagram, DiagramNode> nodeMap; DiagramNode node; Diagram diagram; + Store store; if (null != (nodeMap = myDiagramToNodeMap) && - null != (eventNotify = (element.Store as IORMToolServices).NotifySurveyElementChanged) && + (store = element.Store).DefaultPartition == element.Partition && + null != (eventNotify = (store as IORMToolServices).NotifySurveyElementChanged) && nodeMap.TryGetValue(diagram = (Diagram)element, out node)) { nodeMap.Remove(diagram); @@ -242,9 +252,11 @@ ModelElement element = e.ModelElement; Dictionary<Diagram, DiagramNode> nodeMap; DiagramNode node; + Store store; if (!element.IsDeleted && null != (nodeMap = myDiagramToNodeMap) && - null != (eventNotify = (element.Store as IORMToolServices).NotifySurveyElementChanged) && + (store = element.Store).DefaultPartition == element.Partition && + null != (eventNotify = (store as IORMToolServices).NotifySurveyElementChanged) && nodeMap.TryGetValue((Diagram)element, out node)) { eventNotify.ElementRenamed(node); Modified: trunk/ORMModel/Shell/ORMDiagramSpy.cs =================================================================== --- trunk/ORMModel/Shell/ORMDiagramSpy.cs 2008-11-18 10:12:46 UTC (rev 1334) +++ trunk/ORMModel/Shell/ORMDiagramSpy.cs 2008-11-18 19:57:24 UTC (rev 1335) @@ -222,15 +222,23 @@ } private void DiagramAddedEvent(object sender, ElementAddedEventArgs e) { - myDiagramSetChanged = true; + ModelElement element = e.ModelElement; + if (element.Store.DefaultPartition == element.Partition) + { + myDiagramSetChanged = true; + } } private void DiagramRemovedEvent(object sender, ElementDeletedEventArgs e) { - myDiagramSetChanged = true; - if (e.ModelElement == myDiagramView.Diagram) + ModelElement element = e.ModelElement; + if (element.Store.DefaultPartition == element.Partition) { - // Note that this is unlikely, the diagram will be disassociatin firts - AdjustVisibility(false, true); + myDiagramSetChanged = true; + if (element == myDiagramView.Diagram) + { + // Note that this is unlikely, the diagram will be disassociatin firts + AdjustVisibility(false, true); + } } } private void Disassociate() @@ -261,7 +269,11 @@ } private void DiagramNameChangedEvent(object sender, ElementPropertyChangedEventArgs e) { - myDiagramSetChanged = true; + ModelElement element = e.ModelElement; + if (element.Store.DefaultPartition == element.Partition) + { + myDiagramSetChanged = true; + } } private void ElementEventsEnded(object sender, ElementEventsEndedEventArgs e) { @@ -323,32 +335,61 @@ { Diagram[] diagramArray = new Diagram[diagramCount]; diagrams.CopyTo(diagramArray, 0); + Partition targetPartition = store.DefaultPartition; Array.Sort<Diagram>( diagramArray, delegate(Diagram left, Diagram right) { + // Filter diagrams, such as the context window, that are not in the default partition + if (left.Partition != targetPartition) + { + if (right.Partition == targetPartition) + { + return 1; + } + } + else if (right.Partition != targetPartition) + { + return -1; + } return string.Compare(left.Name, right.Name, StringComparison.CurrentCultureIgnoreCase); }); - StringBuilder builder = new StringBuilder(ResourceStrings.DiagramSpyDiagramListStart); - string listSeparator = CultureInfo.CurrentCulture.TextInfo.ListSeparator + " "; - int separatorLength = listSeparator.Length; - int offset = builder.Length; - links.Clear(); - for (int i = 0; i < diagramCount; ++i) + for (int i = diagramCount - 1; i >= 0; --i) { - Diagram diagram = diagramArray[i]; - string diagramName = diagram.Name; - int nameLength = diagramName.Length; - if (i != 0) + if (diagramArray[i].Partition == targetPartition) { - offset += separatorLength; - builder.Append(listSeparator); + break; } - builder.Append(diagramName); - links.Add(offset, nameLength, diagram); - offset += nameLength; + --diagramCount; } - watermarkLabel.Text = builder.ToString(); + if (diagramCount == 0) + { + watermarkLabel.Text = ResourceStrings.DiagramSpyNoSelection; + links.Clear(); + } + else + { + StringBuilder builder = new StringBuilder(ResourceStrings.DiagramSpyDiagramListStart); + string listSeparator = CultureInfo.CurrentCulture.TextInfo.ListSeparator + " "; + int separatorLength = listSeparator.Length; + int offset = builder.Length; + links.Clear(); + for (int i = 0; i < diagramCount; ++i) + { + Diagram diagram = diagramArray[i]; + string diagramName = diagram.Name; + int nameLength = diagramName.Length; + if (i != 0) + { + offset += separatorLength; + builder.Append(listSeparator); + } + builder.Append(diagramName); + links.Add(offset, nameLength, diagram); + offset += nameLength; + } + watermarkLabel.Text = builder.ToString(); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2008-11-16 06:30:33
|
Revision: 1333 http://orm.svn.sourceforge.net/orm/?rev=1333&view=rev Author: mcurland Date: 2008-11-16 06:30:27 +0000 (Sun, 16 Nov 2008) Log Message: ----------- Preverify FactType state before verbalizing in associated FactTypes list on ObjectType selection. Fixes verbalization crash introduced with [1331] selecting an ObjectType attached to a role on a FactType with no reading. refs #376 Modified Paths: -------------- trunk/ORMModel/ObjectModel/Verbalization.cs trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml trunk/ORMModel/ObjectModel/VerbalizationGenerator.xsd trunk/ORMModel/ObjectModel/VerbalizationGenerator.xslt Modified: trunk/ORMModel/ObjectModel/Verbalization.cs =================================================================== --- trunk/ORMModel/ObjectModel/Verbalization.cs 2008-11-16 02:07:55 UTC (rev 1332) +++ trunk/ORMModel/ObjectModel/Verbalization.cs 2008-11-16 06:30:27 UTC (rev 1333) @@ -1004,6 +1004,10 @@ /// </summary> public static void WriteVerbalizerSentence(TextWriter writer, string body, string closeSentenceWith) { + if (string.IsNullOrEmpty(body)) + { + return; + } Match match = FirstBodyCharacterPatternLower.Match(body); if (match.Success) { Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2008-11-16 02:07:55 UTC (rev 1332) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2008-11-16 06:30:27 UTC (rev 1333) @@ -1788,7 +1788,7 @@ for (snippet8ReplaceFilteredIter1 = 0; snippet8ReplaceFilteredIter1 < playedRoleCount; ++snippet8ReplaceFilteredIter1) { RoleBase primaryRole = playedRoles[snippet8ReplaceFilteredIter1]; - if (Array.IndexOf(snippet8ReplaceUniqueFactTypes1, snippet8ReplaceTestUniqueFactType1 = primaryRole.FactType) == -1) + if (primaryRole.FactType.ReadingRequiredError == null && Array.IndexOf(snippet8ReplaceUniqueFactTypes1, snippet8ReplaceTestUniqueFactType1 = primaryRole.FactType) == -1) { snippet8ReplaceUniqueFactTypes1[snippet8ReplaceFilteredIter1] = snippet8ReplaceTestUniqueFactType1; ++snippet8ReplaceFilteredCount1; @@ -1827,7 +1827,7 @@ } basicRoleReplacements[i] = basicReplacement; } - if (Array.IndexOf(snippet8ReplaceUniqueFactTypes1, snippet8ReplaceTestUniqueFactType1 = primaryRole.FactType) == -1) + if (primaryRole.FactType.ReadingRequiredError == null && Array.IndexOf(snippet8ReplaceUniqueFactTypes1, snippet8ReplaceTestUniqueFactType1 = primaryRole.FactType) == -1) { snippet8ReplaceUniqueFactTypes1[RoleIter1] = snippet8ReplaceTestUniqueFactType1; CoreVerbalizationSnippetType listSnippet; Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml 2008-11-16 02:07:55 UTC (rev 1332) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml 2008-11-16 06:30:27 UTC (rev 1333) @@ -82,7 +82,7 @@ <PortableDataType/> </Snippet> <Snippet ref="SelfReference" conditionalMatch="VerbalizeFactTypesWithBrowserObjectType"> - <IterateRoles match="playedRoles" listStyle="FactTypeList" uniqueFactType="true"> + <IterateRoles match="playedRoles" listStyle="FactTypeList" verifyCanVerbalizeFactType="true" uniqueFactType="true"> <Fact subtypeMetaReading="true" closeSentence="true"/> </IterateRoles> </Snippet> Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.xsd =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.xsd 2008-11-16 02:07:55 UTC (rev 1332) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.xsd 2008-11-16 06:30:27 UTC (rev 1333) @@ -1047,6 +1047,11 @@ <xs:documentation>Set to true if a visited FactTypes should be tracked. If this is set, then a later role with the same FactType will be ignored.</xs:documentation> </xs:annotation> </xs:attribute> + <xs:attribute name="verifyCanVerbalizeFactType" type="xs:boolean" default="false"> + <xs:annotation> + <xs:documentation>Set to true if the FactType has not already been verified as have sufficient state to support verbalization.</xs:documentation> + </xs:annotation> + </xs:attribute> </xs:complexType> <xs:complexType name="IterateRolesType"> <xs:complexContent> Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.xslt =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2008-11-14 03:28:41
|
Revision: 1329 http://orm.svn.sourceforge.net/orm/?rev=1329&view=rev Author: mcurland Date: 2008-11-14 03:28:31 +0000 (Fri, 14 Nov 2008) Log Message: ----------- Fix a couple of bugs from [1327]. Simple subtype fields activating a text editor, and initial new objectified FactType instances with a supertype identifier were not getting an identifier required error. refs #374 Modified Paths: -------------- trunk/ORMModel/ObjectModel/SamplePopulation.cs trunk/ORMModel/ShapeModel/ObjectTypeShape.cs trunk/ORMModel/Shell/SamplePopulationEditor.cs Modified: trunk/ORMModel/ObjectModel/SamplePopulation.cs =================================================================== --- trunk/ORMModel/ObjectModel/SamplePopulation.cs 2008-11-08 21:43:45 UTC (rev 1328) +++ trunk/ORMModel/ObjectModel/SamplePopulation.cs 2008-11-14 03:28:31 UTC (rev 1329) @@ -1074,13 +1074,14 @@ ObjectType entityType; UniquenessConstraint pid; if (null != (entityType = factType.NestingType) && - null != (pid = entityType.PreferredIdentifier)) + null != (pid = entityType.ResolvedPreferredIdentifier)) { LinkedElementCollection<FactType> pidFactTypes; FactType identifierFactType; Role unaryRole = null; ObjectifiedUnaryRole objectifiedUnaryRole = null; - if (pid.IsInternal && + if (pid.PreferredIdentifierFor == entityType && + pid.IsInternal && 1 == (pidFactTypes = pid.FactTypeCollection).Count && ((identifierFactType = pidFactTypes[0]) == factType || (null != (unaryRole = factType.UnaryRole) && Modified: trunk/ORMModel/ShapeModel/ObjectTypeShape.cs =================================================================== --- trunk/ORMModel/ShapeModel/ObjectTypeShape.cs 2008-11-08 21:43:45 UTC (rev 1328) +++ trunk/ORMModel/ShapeModel/ObjectTypeShape.cs 2008-11-14 03:28:31 UTC (rev 1329) @@ -470,7 +470,7 @@ /// <param name="objectType">The associated model element</param> private static void ResizeAssociatedShapes(ObjectType objectType) { - if (!objectType.IsDeleted && objectType != null) + if (objectType != null && !objectType.IsDeleted) { LinkedElementCollection<PresentationElement> pels = PresentationViewsSubject.GetPresentation(objectType); int pelCount = pels.Count; Modified: trunk/ORMModel/Shell/SamplePopulationEditor.cs =================================================================== --- trunk/ORMModel/Shell/SamplePopulationEditor.cs 2008-11-08 21:43:45 UTC (rev 1328) +++ trunk/ORMModel/Shell/SamplePopulationEditor.cs 2008-11-14 03:28:31 UTC (rev 1329) @@ -2361,6 +2361,14 @@ { EntityTypeSubtypeInstance subtypeInstance = objectInstance as EntityTypeSubtypeInstance; EntityTypeInstance entityInstance = (subtypeInstance != null) ? subtypeInstance.SupertypeInstance : (EntityTypeInstance)objectInstance; + ObjectType entityTypeSubtype; + if (subtypeInstance == null && + null != (entityTypeSubtype = myEntityTypeSubtype)) + { + // Doing this simple sanity check means that we can call this + // update function for all subtype cases. + subtypeInstance = EntityTypeSubtypeInstance.GetSubtypeInstance(entityInstance, entityTypeSubtype, true, false); + } UpdateInstanceFields(entityInstance, subtypeInstance); } /// <summary> @@ -2476,7 +2484,7 @@ get { Role role = myRole; - return (role != null) ? role.RolePlayer : myIsEntityTypeEditor ? myEntityType : (myEntityTypeSubtype ?? myEntityType); + return (role != null && (!(role is SubtypeMetaRole) || myEntityType == null)) ? role.RolePlayer : myIsEntityTypeEditor ? myEntityType : (myEntityTypeSubtype ?? myEntityType); } } #endregion // Accessor Properties @@ -2488,8 +2496,9 @@ public IVirtualTreeInPlaceControl CreateInPlaceEditControl() { ObjectType rolePlayer; + Role role = myRole; bool blockEdits = - (null == (rolePlayer = ContextTargetObjectType)) || + (null == (rolePlayer = (role is SubtypeMetaRole) ? ContextTargetObjectType : ContextObjectType)) || (myRole != null && rolePlayer.NestedFactType != null) || HasComplexIdentifier(rolePlayer); TypeEditorHost host = EditContextTypeEditorHost.Create( @@ -2524,10 +2533,10 @@ Role role = instance.myRole; if (columnInstance == null) { - ObjectType objectifyingType = (role != null) ? role.RolePlayer : (instance.myEntityTypeSubtype ?? instance.myEntityType); + ObjectType objectifyingType = (role != null) ? ((role is SubtypeMetaRole) ? instance.myEntityType : role.RolePlayer) : (instance.myEntityTypeSubtype ?? instance.myEntityType); if (objectifyingType != null) { - return ObjectTypeInstance.GetDisplayString(null, instance.myEntityTypeSubtype ?? objectifyingType, role == null); + return ObjectTypeInstance.GetDisplayString(null, (role is SubtypeMetaRole) ? objectifyingType : (instance.myEntityTypeSubtype ?? objectifyingType), role == null); } } else if (role == null) @@ -5915,7 +5924,7 @@ editContext = new CellEditContext( (supertypeIdentifyingRole != null) ? supertypeIdentifyingRole.RolePlayer : rowType, (supertypeIdentifyingRole != null) ? rowType : null, - supertypeIdentifyingRole, + GetPreferredSubtypeRole(rowType), myEditInstance, myEditSubtypeInstance, this); break; @@ -7477,7 +7486,7 @@ EntityTypeInstance editInstance = myEditInstance; ObjectTypeInstance recurseConnectInstance = null; - if (identifierRole is SupertypeMetaRole && (factInstance == null || !(factInstance.FactType is SubtypeFact))) + if ((identifierRole is SupertypeMetaRole || identifierRole is SubtypeMetaRole) && (factInstance == null || !(factInstance.FactType is SubtypeFact))) { ObjectType subtype = ContextObjectType; EntityTypeInstance entityInstance = (EntityTypeInstance)instance; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2008-10-17 15:32:27
|
Revision: 1326 http://orm.svn.sourceforge.net/orm/?rev=1326&view=rev Author: mcurland Date: 2008-10-17 15:32:09 +0000 (Fri, 17 Oct 2008) Log Message: ----------- Add role player change rule to automatically set the ExpandRefMode property as needed. fixes #373 Modified Paths: -------------- trunk/ORMModel/ShapeModel/ORMShape.AttachRules.cs trunk/ORMModel/ShapeModel/ORMShape.AttachRules.xml trunk/ORMModel/ShapeModel/ObjectTypeShape.cs Modified: trunk/ORMModel/ShapeModel/ORMShape.AttachRules.cs =================================================================== --- trunk/ORMModel/ShapeModel/ORMShape.AttachRules.cs 2008-09-05 00:45:22 UTC (rev 1325) +++ trunk/ORMModel/ShapeModel/ORMShape.AttachRules.cs 2008-10-17 15:32:09 UTC (rev 1326) @@ -70,6 +70,7 @@ typeof(ObjectTypeShape).GetNestedType("PreferredIdentifierShortenedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), typeof(ObjectTypeShape).GetNestedType("RolePlayerAddedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), typeof(ObjectTypeShape).GetNestedType("RolePlayerDeleteRuleClass", BindingFlags.Public | BindingFlags.NonPublic), + typeof(ObjectTypeShape).GetNestedType("RolePlayerRolePlayerChangedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), typeof(ORMBaseBinaryLinkShape).GetNestedType("LinkChangeRuleClass", BindingFlags.Public | BindingFlags.NonPublic), typeof(ORMBaseShape).GetNestedType("AbsoluteBoundsChangedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), typeof(ORMBaseShape).GetNestedType("ModelErrorAddedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), @@ -144,7 +145,7 @@ { Microsoft.VisualStudio.Modeling.RuleManager ruleManager = store.RuleManager; Type[] disabledRuleTypes = ORMShapeDomainModel.CustomDomainModelTypes; - for (int i = 0; i < 77; ++i) + for (int i = 0; i < 78; ++i) { ruleManager.EnableRule(disabledRuleTypes[i]); } @@ -1120,6 +1121,32 @@ Neumont.Tools.Modeling.Diagnostics.TraceUtility.TraceRuleEnd(e.ModelElement.Store, "Neumont.Tools.ORM.ShapeModel.ObjectTypeShape.RolePlayerDeleteRule"); } } + [Microsoft.VisualStudio.Modeling.RuleOn(typeof(Neumont.Tools.ORM.ObjectModel.ObjectTypePlaysRole), Priority=Neumont.Tools.Modeling.FrameworkDomainModel.InlineRulePriority)] + private sealed class RolePlayerRolePlayerChangedRuleClass : Microsoft.VisualStudio.Modeling.RolePlayerChangeRule + { + [System.Diagnostics.DebuggerStepThrough()] + public RolePlayerRolePlayerChangedRuleClass() + { + base.IsEnabled = false; + } + /// <summary> + /// Provide the following method in class: + /// Neumont.Tools.ORM.ShapeModel.ObjectTypeShape + /// /// <summary> + /// /// RolePlayerChangeRule: typeof(Neumont.Tools.ORM.ObjectModel.ObjectTypePlaysRole) + /// /// </summary> + /// private static void RolePlayerRolePlayerChangedRule(RolePlayerChangedEventArgs e) + /// { + /// } + /// </summary> + [System.Diagnostics.DebuggerStepThrough()] + public override void RolePlayerChanged(Microsoft.VisualStudio.Modeling.RolePlayerChangedEventArgs e) + { + Neumont.Tools.Modeling.Diagnostics.TraceUtility.TraceRuleStart(e.ElementLink.Store, "Neumont.Tools.ORM.ShapeModel.ObjectTypeShape.RolePlayerRolePlayerChangedRule"); + ObjectTypeShape.RolePlayerRolePlayerChangedRule(e); + Neumont.Tools.Modeling.Diagnostics.TraceUtility.TraceRuleEnd(e.ElementLink.Store, "Neumont.Tools.ORM.ShapeModel.ObjectTypeShape.RolePlayerRolePlayerChangedRule"); + } + } } #endregion // Rule classes for ObjectTypeShape #region Rule classes for ORMBaseBinaryLinkShape Modified: trunk/ORMModel/ShapeModel/ORMShape.AttachRules.xml =================================================================== --- trunk/ORMModel/ShapeModel/ORMShape.AttachRules.xml 2008-09-05 00:45:22 UTC (rev 1325) +++ trunk/ORMModel/ShapeModel/ORMShape.AttachRules.xml 2008-10-17 15:32:09 UTC (rev 1326) @@ -139,6 +139,9 @@ <arg:DeleteRule methodName="RolePlayerDeleteRule"> <arg:RuleOn targetType="ObjectTypePlaysRole" targetTypeQualifier="Neumont.Tools.ORM.ObjectModel" fireTime="TopLevelCommit" priority="DiagramFixupConstants.ResizeParentRulePriority"/> </arg:DeleteRule> + <arg:RolePlayerChangeRule methodName="RolePlayerRolePlayerChangedRule"> + <arg:RuleOn targetType="ObjectTypePlaysRole" targetTypeQualifier="Neumont.Tools.ORM.ObjectModel"/> + </arg:RolePlayerChangeRule> </arg:RuleContainer> <arg:RuleContainer class="ORMBaseBinaryLinkShape"> <arg:ChangeRule methodName="LinkChangeRule"> Modified: trunk/ORMModel/ShapeModel/ObjectTypeShape.cs =================================================================== --- trunk/ORMModel/ShapeModel/ObjectTypeShape.cs 2008-09-05 00:45:22 UTC (rev 1325) +++ trunk/ORMModel/ShapeModel/ObjectTypeShape.cs 2008-10-17 15:32:09 UTC (rev 1326) @@ -718,6 +718,76 @@ } } } + /// <summary> + /// RolePlayerChangeRule: typeof(Neumont.Tools.ORM.ObjectModel.ObjectTypePlaysRole) + /// Changing the identifying role player of a FactType that participates in the refmode + /// pattern needs to appropriately update the ExpandRefMode property and to resize + /// shapes for the identified object types. + /// </summary> + private static void RolePlayerRolePlayerChangedRule(RolePlayerChangedEventArgs e) + { + ObjectTypePlaysRole link = e.ElementLink as ObjectTypePlaysRole; + if (e.DomainRole.Id == ObjectTypePlaysRole.RolePlayerDomainRoleId) + { + bool newPlayerIsValueType = link.RolePlayer.IsValueType; + bool oldPlayerIsValueType = ((ObjectType)e.OldRolePlayer).IsValueType; + if ((newPlayerIsValueType || oldPlayerIsValueType) && + (newPlayerIsValueType != oldPlayerIsValueType)) + { + LinkedElementCollection<ConstraintRoleSequence> sequences = link.PlayedRole.ConstraintRoleSequenceCollection; + int constraintsCount = sequences.Count; + for (int i = 0; i < constraintsCount; ++i) + { + UniquenessConstraint iuc = sequences[i] as UniquenessConstraint; + if (iuc != null && iuc.IsInternal) + { + ObjectType preferredFor = iuc.PreferredIdentifierFor; + if (preferredFor != null) + { + if (newPlayerIsValueType) + { + EnsureRefModeExpanded(iuc, preferredFor); + } + else + { + ResizeAssociatedShapes(preferredFor); + } + } + } + } + } + } + else + { + // This can add an expanded reference mode for an object type associated with the new + // role player and remove the reference mode for the old player + if (link.RolePlayer.IsValueType) + { + LinkedElementCollection<ConstraintRoleSequence> sequences = link.PlayedRole.ConstraintRoleSequenceCollection; + int constraintsCount = sequences.Count; + for (int i = 0; i < constraintsCount; ++i) + { + UniquenessConstraint iuc = sequences[i] as UniquenessConstraint; + if (iuc != null && iuc.IsInternal) + { + ObjectType preferredFor = iuc.PreferredIdentifierFor; + if (preferredFor != null) + { + EnsureRefModeExpanded(iuc, preferredFor); + } + } + } + foreach (ConstraintRoleSequence sequence in ((Role)e.OldRolePlayer).ConstraintRoleSequenceCollection) + { + UniquenessConstraint iuc = sequence as UniquenessConstraint; + if (iuc != null && iuc.IsInternal) + { + ResizeAssociatedShapes(iuc.PreferredIdentifierFor); + } + } + } + } + } #endregion // Shape display update rules #region Store Event Handlers /// <summary> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2008-09-05 00:45:12
|
Revision: 1325 http://orm.svn.sourceforge.net/orm/?rev=1325&view=rev Author: mcurland Date: 2008-09-05 00:45:22 +0000 (Fri, 05 Sep 2008) Log Message: ----------- NavigateTo element on background diagram tab not activating the document. refs #372 Modified Paths: -------------- trunk/ORMModel/Shell/ORMDocDataServices.cs Modified: trunk/ORMModel/Shell/ORMDocDataServices.cs =================================================================== --- trunk/ORMModel/Shell/ORMDocDataServices.cs 2008-09-04 16:27:55 UTC (rev 1324) +++ trunk/ORMModel/Shell/ORMDocDataServices.cs 2008-09-05 00:45:22 UTC (rev 1325) @@ -1501,6 +1501,7 @@ if (docView.SelectDiagram(diagram)) { selectOnView = docView.CurrentDesigner; + docView.Show(); } } else @@ -1631,8 +1632,6 @@ const int SelectShapesSize = 3; ShapeElement[] selectShapes = new ShapeElement[SelectShapesSize]; bool selectShapesInitialized = true; - // UNDONE: Move navigation code from here down into - // docdata and docview classes so we can use it elsewhere while (element != null) { ModelElement selectElement = element; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2008-08-15 15:07:42
|
Revision: 1321 http://orm.svn.sourceforge.net/orm/?rev=1321&view=rev Author: mcurland Date: 2008-08-15 15:07:50 +0000 (Fri, 15 Aug 2008) Log Message: ----------- Equality constraint double stating FactType in second sequence. Data entry fix from [1315]. refs #286 Modified Paths: -------------- trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2008-08-14 21:36:23 UTC (rev 1320) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2008-08-15 15:07:50 UTC (rev 1321) @@ -8079,7 +8079,7 @@ { sbTemp.Length = 0; } - for (int RoleIter2 = 0; RoleIter2 < columnArity; ++RoleIter2) + for (int RoleIter2 = 0; RoleIter2 < 1; ++RoleIter2) { RoleBase primaryRole = includedSequenceRoles[RoleIter2]; parentFact = primaryRole.FactType; Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml 2008-08-14 21:36:23 UTC (rev 1320) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml 2008-08-15 15:07:50 UTC (rev 1321) @@ -1112,7 +1112,7 @@ </IterateRoles> </IterateSequences> <IterateSequences listStyle="null" pass="notFirst"> - <IterateRoles match="constraintRoles" listStyle="null"> + <IterateRoles match="constraintRoles" listStyle="null" pass="first"> <Fact readingChoice="PreferPrimaryLeadReading"> <PredicateReplacement match="included"> <Snippet ref="DefiniteArticle"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2008-08-14 21:36:15
|
Revision: 1320 http://orm.svn.sourceforge.net/orm/?rev=1320&view=rev Author: mcurland Date: 2008-08-14 21:36:23 +0000 (Thu, 14 Aug 2008) Log Message: ----------- Fixed miscellaneous usability and display issues: * Track before/after roles in adjusting ReadingOrder collections when new roles are inserted. fixes #226 * Added 'forError' parameter to IProxyDisplayProvider.ElementDisplayedAs to selectively activate shapes depending on the error. Do not activate entity shapes for duplicate name errors on collapsed value types. #153 * Allow dragging with ModelNoteConnector action to make behavior consistent with SubtypeConnectorAction. #359 * Internal constraint boxes and vertical role boxes were reporting incorrect bounds to accessibility readers. refs #185 Also: * Added support for most FactType commands to a ReadingShape selection, including activating the ReadingEditor window. Alignment and layout commits intentionally omitted. * ReadingShape was not updating display RolePlayer names when the role player was changed or the name modified * ValueTypes acting as reference mode values could not be added to a diagram, even if the corresponding entity has no shape. Modified Paths: -------------- trunk/ORMModel/ObjectModel/FactType.cs trunk/ORMModel/ObjectModel/ModelError.cs trunk/ORMModel/ObjectModel/ReadingOrder.cs trunk/ORMModel/ShapeModel/FactTypeShape.cs trunk/ORMModel/ShapeModel/ModelNoteConnectAction.cs trunk/ORMModel/ShapeModel/ORMDiagram.cs trunk/ORMModel/ShapeModel/ORMShape.AttachRules.cs trunk/ORMModel/ShapeModel/ORMShape.AttachRules.xml trunk/ORMModel/ShapeModel/ReadingShape.cs trunk/ORMModel/ShapeModel/ViewFixupRules.cs trunk/ORMModel/Shell/FactEditor/FactEditorSaver.cs trunk/ORMModel/Shell/ORMDocDataServices.cs trunk/ORMModel/Shell/ORMDocView.cs Modified: trunk/ORMModel/ObjectModel/FactType.cs =================================================================== --- trunk/ORMModel/ObjectModel/FactType.cs 2008-08-13 00:58:40 UTC (rev 1319) +++ trunk/ORMModel/ObjectModel/FactType.cs 2008-08-14 21:36:23 UTC (rev 1320) @@ -61,6 +61,18 @@ #endregion // IFactConstraint interface public partial class FactType : INamedElementDictionaryChild, INamedElementDictionaryRemoteParent, IModelErrorOwner, IVerbalizeCustomChildren, IHierarchyContextEnabled { + #region Public token values + /// <summary> + /// A key to set in the top-level transaction context to indicate the role that + /// a newly added role should be added after. + /// </summary> + public static readonly object InsertAfterRoleKey = new object(); + /// <summary> + /// A key to set in the top-level transaction context to indicate the role that + /// a newly added role should be added before. + /// </summary> + public static readonly object InsertBeforeRoleKey = new object(); + #endregion // Public token values #region ReadingOrder acquisition /// <summary> /// Gets a reading order, first by trying to find it, if one doesn't exist Modified: trunk/ORMModel/ObjectModel/ModelError.cs =================================================================== --- trunk/ORMModel/ObjectModel/ModelError.cs 2008-08-13 00:58:40 UTC (rev 1319) +++ trunk/ORMModel/ObjectModel/ModelError.cs 2008-08-14 21:36:23 UTC (rev 1320) @@ -300,9 +300,12 @@ /// passed in element. /// </summary> /// <param name="element">The element to find a proxy for</param> + /// <param name="forError">The <see cref="ModelError"/> that is being displayed. + /// If the displayed as element does not display this error, then it should not + /// be identified as a proxy display.</param> /// <returns>The proxy display element. Return the element itself or null /// if there is no proxy.</returns> - ModelElement ElementDisplayedAs(ModelElement element); + ModelElement ElementDisplayedAs(ModelElement element, ModelError forError); } #endregion // IProxyDisplayProvider #region AssociatedErrorElementCallback delegate Modified: trunk/ORMModel/ObjectModel/ReadingOrder.cs =================================================================== --- trunk/ORMModel/ObjectModel/ReadingOrder.cs 2008-08-13 00:58:40 UTC (rev 1319) +++ trunk/ORMModel/ObjectModel/ReadingOrder.cs 2008-08-14 21:36:23 UTC (rev 1320) @@ -272,32 +272,92 @@ /// This allows it to be used by both the rule and to be called /// during post load model fixup. /// </summary> - private static void ValidateReadingOrdersRoleCollection(FactType theFact, RoleBase addedRole) + private static void ValidateReadingOrdersRoleCollection(FactType factType, RoleBase addedRole) { - Debug.Assert(theFact.Store.TransactionManager.InTransaction); + Debug.Assert(factType.Store.TransactionManager.InTransaction); - LinkedElementCollection<ReadingOrder> readingOrders = theFact.ReadingOrderCollection; - int orderCount = readingOrders.Count; - if (orderCount != 0) + LinkedElementCollection<ReadingOrder> readingOrders; + int orderCount; + if (null == factType.UnaryRole && + 0 != (orderCount = (readingOrders = factType.ReadingOrderCollection).Count)) { - bool isUnaryFactType = theFact.UnaryRole != null; + bool checkedContext = false; + bool insertAfter = false; + RoleBase insertBeside = null; + IFormatProvider formatProvider = CultureInfo.InvariantCulture; for (int i = 0; i < orderCount; ++i) { ReadingOrder ord = readingOrders[i]; LinkedElementCollection<RoleBase> roles = ord.RoleCollection; - if (!roles.Contains(addedRole) && !isUnaryFactType) + if (!roles.Contains(addedRole)) { - ord.RoleCollection.Add(addedRole); + if (!checkedContext) + { + checkedContext = true; + Dictionary<object, object> contextInfo = factType.Store.TransactionManager.CurrentTransaction.TopLevelTransaction.Context.ContextInfo; + object contextRole; + if (contextInfo.TryGetValue(FactType.InsertAfterRoleKey, out contextRole)) + { + insertBeside = contextRole as RoleBase; + insertAfter = true; + } + else if (contextInfo.TryGetValue(FactType.InsertBeforeRoleKey, out contextRole)) + { + insertBeside = contextRole as RoleBase; + } + } + int insertIndex = -1; + if (insertBeside != null) + { + insertIndex = roles.IndexOf(insertBeside); + } + + if (insertIndex != -1) + { + roles.Insert(insertIndex + (insertAfter ? 1 : 0), addedRole); + } + else + { + roles.Add(addedRole); + } LinkedElementCollection<Reading> readings = ord.ReadingCollection; int readingCount = readings.Count; if (readingCount != 0) { - string appendText = String.Concat(" {", (roles.Count - 1).ToString(CultureInfo.InvariantCulture), "}"); - for (int j = 0; j < readingCount; ++j) + if (insertIndex == -1) { - Reading reading = readings[j]; - reading.SetAutoText(reading.Text + appendText); + string appendText = string.Concat(" {", (roles.Count - 1).ToString(CultureInfo.InvariantCulture), "}"); + for (int j = 0; j < readingCount; ++j) + { + Reading reading = readings[j]; + reading.SetAutoText(reading.Text + appendText); + } } + else + { + for (int j = 0; j < readingCount; ++j) + { + Reading reading = readings[j]; + reading.SetAutoText(Reading.ReplaceFields( + reading.Text, + delegate(int replaceIndex) + { + // UNDONE: Respect leading/trailing hyphen binding and keep them associated + // with the corresponding role. Will require work well beyond the scope of this + // routine. + if (replaceIndex == insertIndex) + { + return string.Concat("{", insertIndex.ToString(formatProvider), "} {", (insertIndex + 1).ToString(formatProvider), "}"); + } + else if (replaceIndex > insertIndex) + { + return string.Concat("{", (replaceIndex + 1).ToString(formatProvider), "}"); + } + return null; // Leave as is + } + )); + } + } } } } Modified: trunk/ORMModel/ShapeModel/FactTypeShape.cs =================================================================== --- trunk/ORMModel/ShapeModel/FactTypeShape.cs 2008-08-13 00:58:40 UTC (rev 1319) +++ trunk/ORMModel/ShapeModel/FactTypeShape.cs 2008-08-14 21:36:23 UTC (rev 1320) @@ -43,18 +43,6 @@ #region FactTypeShape class public partial class FactTypeShape : ICustomShapeFolding, IModelErrorActivation, IProvideConnectorShape { - #region Public token values - /// <summary> - /// A key to set in the top-level transaction context to indicate the role that - /// a newly added role should be added after. - /// </summary> - public static readonly object InsertAfterRoleKey = new object(); - /// <summary> - /// A key to set in the top-level transaction context to indicate the role that - /// a newly added role should be added before. - /// </summary> - public static readonly object InsertBeforeRoleKey = new object(); - #endregion // Public token values #region ConstraintBoxRoleActivity enum /// <summary> /// The activity of a role in a ConstraintBox @@ -2198,7 +2186,28 @@ /// <returns>The vertical slice for this role</returns> public sealed override RectangleD GetBounds(ShapeElement parentShape, ShapeField parentField) { - return parentField.GetBounds(parentShape); + RectangleD retVal = RectangleD.Empty; + IConstraint testConstraint = myAssociatedConstraint; + if (testConstraint != null) + { + ((FactTypeShape)parentShape).WalkConstraintBoxes( + parentField, + ((ConstraintShapeField)parentField).AttachPosition, + delegate(ref ConstraintBox constraintBox) + { + if (constraintBox.FactConstraint.Constraint == testConstraint) + { + retVal = constraintBox.Bounds; + return false; // Don't continue, we got our item + } + return true; + }); + } + if (retVal.IsEmpty) + { + retVal = parentField.GetBounds(parentShape); + } + return retVal; } #endregion // Required ShapeSubField #region Accessor functions @@ -2747,11 +2756,30 @@ RectangleD retVal = parentField.GetBounds(parentShape); FactTypeShape parentFactShape = parentShape as FactTypeShape; LinkedElementCollection<RoleBase> roles = parentFactShape.DisplayedRoleOrder; - retVal.Width /= roles.Count; + int roleCount = roles.Count; int roleIndex = roles.IndexOf(myAssociatedRole); - if (roleIndex > 0) + DisplayOrientation orientation = parentFactShape.DisplayOrientation; + switch (orientation) { - retVal.Offset(roleIndex * retVal.Width, 0); + case DisplayOrientation.Horizontal: + retVal.Width /= roleCount; + if (roleIndex > 0) + { + retVal.Offset(roleIndex * retVal.Width, 0); + } + break; + case DisplayOrientation.VerticalRotatedLeft: + case DisplayOrientation.VerticalRotatedRight: + retVal.Height /= roleCount; + if (orientation == DisplayOrientation.VerticalRotatedLeft) + { + roleIndex = roleCount - roleIndex - 1; + } + if (roleIndex > 0) + { + retVal.Offset(0, roleIndex * retVal.Height); + } + break; } return retVal; } Modified: trunk/ORMModel/ShapeModel/ModelNoteConnectAction.cs =================================================================== --- trunk/ORMModel/ShapeModel/ModelNoteConnectAction.cs 2008-08-13 00:58:40 UTC (rev 1319) +++ trunk/ORMModel/ShapeModel/ModelNoteConnectAction.cs 2008-08-14 21:36:23 UTC (rev 1320) @@ -250,6 +250,16 @@ } } /// <summary> + /// Allow dragging the source element onto the target + /// </summary> + protected override void OnDraggingBegun(MouseActionEventArgs e) + { + if (mySourceElement == null) + { + mySourceElement = ElementFromShape<ORMModelElement>(MouseDownHitShape); + } + base.OnDraggingBegun(e); + } /// <summary> /// If we're emulating a drag (occurs when we're chained from RoleDragPendingAction), /// then complete the action on mouse up /// </summary> Modified: trunk/ORMModel/ShapeModel/ORMDiagram.cs =================================================================== --- trunk/ORMModel/ShapeModel/ORMDiagram.cs 2008-08-13 00:58:40 UTC (rev 1319) +++ trunk/ORMModel/ShapeModel/ORMDiagram.cs 2008-08-14 21:36:23 UTC (rev 1320) @@ -930,7 +930,7 @@ return !objectifiedShape.ExpandRefMode; } } - return objectType.HasReferenceMode; + return false; // If a shape can't be found, then do not collapse, regardless of objectType.HasReferenceMode } #if SHOW_FACTSHAPE_FOR_SUBTYPE /// <summary>See <see cref="ORMDiagramBase.CreateChildShape"/>.</summary> @@ -1698,14 +1698,15 @@ /// <summary> /// Implements IProxyDisplayProvider.ElementDisplayedAs /// </summary> - protected ModelElement ElementDisplayedAs(ModelElement element) + protected ModelElement ElementDisplayedAs(ModelElement element, ModelError forError) { ObjectType objectElement; ExclusionConstraint exclusionConstraint; SetConstraint setConstraint; if (null != (objectElement = element as ObjectType)) { - if (!ShouldDisplayObjectType(objectElement)) + if (!ShouldDisplayObjectType(objectElement) && + !(forError is ObjectTypeDuplicateNameError)) { FactType nestedFact = objectElement.NestedFactType; if (nestedFact != null) @@ -1749,9 +1750,9 @@ } return null; } - ModelElement IProxyDisplayProvider.ElementDisplayedAs(ModelElement element) + ModelElement IProxyDisplayProvider.ElementDisplayedAs(ModelElement element, ModelError forError) { - return ElementDisplayedAs(element); + return ElementDisplayedAs(element, forError); } #endregion // IProxyDisplayProvider Implementation #region IMergeElements implementation Modified: trunk/ORMModel/ShapeModel/ORMShape.AttachRules.cs =================================================================== --- trunk/ORMModel/ShapeModel/ORMShape.AttachRules.cs 2008-08-13 00:58:40 UTC (rev 1319) +++ trunk/ORMModel/ShapeModel/ORMShape.AttachRules.cs 2008-08-14 21:36:23 UTC (rev 1320) @@ -105,6 +105,10 @@ typeof(ReadingShape).GetNestedType("ReadingTextChangedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), typeof(ReadingShape).GetNestedType("RoleDisplayOrderAddedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), typeof(ReadingShape).GetNestedType("RoleDisplayOrderPositionChangedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), + typeof(ReadingShape).GetNestedType("RolePlayerAddedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), + typeof(ReadingShape).GetNestedType("RolePlayerChangedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), + typeof(ReadingShape).GetNestedType("RolePlayerDeletedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), + typeof(ReadingShape).GetNestedType("RolePlayerRolePlayerChangedRuleClass", BindingFlags.Public | BindingFlags.NonPublic), typeof(RingConstraintShape).GetNestedType("RingConstraintPropertyChangeRuleClass", BindingFlags.Public | BindingFlags.NonPublic), typeof(ValueConstraintShape).GetNestedType("ValueConstraintTextChangedRuleClass", BindingFlags.Public | BindingFlags.NonPublic)}; ORMShapeDomainModel.myCustomDomainModelTypes = retVal; @@ -140,7 +144,7 @@ { Microsoft.VisualStudio.Modeling.RuleManager ruleManager = store.RuleManager; Type[] disabledRuleTypes = ORMShapeDomainModel.CustomDomainModelTypes; - for (int i = 0; i < 73; ++i) + for (int i = 0; i < 77; ++i) { ruleManager.EnableRule(disabledRuleTypes[i]); } @@ -2051,6 +2055,110 @@ Neumont.Tools.Modeling.Diagnostics.TraceUtility.TraceRuleEnd(e.SourceElement.Store, "Neumont.Tools.ORM.ShapeModel.ReadingShape.RoleDisplayOrderPositionChangedRule"); } } + [Microsoft.VisualStudio.Modeling.RuleOn(typeof(Neumont.Tools.ORM.ObjectModel.ObjectTypePlaysRole), FireTime=Microsoft.VisualStudio.Modeling.TimeToFire.TopLevelCommit, Priority=Microsoft.VisualStudio.Modeling.Diagrams.DiagramFixupConstants.ResizeParentRulePriority)] + private sealed class RolePlayerAddedRuleClass : Microsoft.VisualStudio.Modeling.AddRule + { + [System.Diagnostics.DebuggerStepThrough()] + public RolePlayerAddedRuleClass() + { + base.IsEnabled = false; + } + /// <summary> + /// Provide the following method in class: + /// Neumont.Tools.ORM.ShapeModel.ReadingShape + /// /// <summary> + /// /// AddRule: typeof(Neumont.Tools.ORM.ObjectModel.ObjectTypePlaysRole), FireTime=TopLevelCommit, Priority=DiagramFixupConstants.ResizeParentRulePriority; + /// /// </summary> + /// private static void RolePlayerAddedRule(ElementAddedEventArgs e) + /// { + /// } + /// </summary> + [System.Diagnostics.DebuggerStepThrough()] + public override void ElementAdded(Microsoft.VisualStudio.Modeling.ElementAddedEventArgs e) + { + Neumont.Tools.Modeling.Diagnostics.TraceUtility.TraceRuleStart(e.ModelElement.Store, "Neumont.Tools.ORM.ShapeModel.ReadingShape.RolePlayerAddedRule"); + ReadingShape.RolePlayerAddedRule(e); + Neumont.Tools.Modeling.Diagnostics.TraceUtility.TraceRuleEnd(e.ModelElement.Store, "Neumont.Tools.ORM.ShapeModel.ReadingShape.RolePlayerAddedRule"); + } + } + [Microsoft.VisualStudio.Modeling.RuleOn(typeof(Neumont.Tools.ORM.ObjectModel.ObjectType), FireTime=Microsoft.VisualStudio.Modeling.TimeToFire.TopLevelCommit, Priority=Microsoft.VisualStudio.Modeling.Diagrams.DiagramFixupConstants.ResizeParentRulePriority)] + private sealed class RolePlayerChangedRuleClass : Microsoft.VisualStudio.Modeling.ChangeRule + { + [System.Diagnostics.DebuggerStepThrough()] + public RolePlayerChangedRuleClass() + { + base.IsEnabled = false; + } + /// <summary> + /// Provide the following method in class: + /// Neumont.Tools.ORM.ShapeModel.ReadingShape + /// /// <summary> + /// /// ChangeRule: typeof(Neumont.Tools.ORM.ObjectModel.ObjectType), FireTime=TopLevelCommit, Priority=DiagramFixupConstants.ResizeParentRulePriority; + /// /// </summary> + /// private static void RolePlayerChangedRule(ElementPropertyChangedEventArgs e) + /// { + /// } + /// </summary> + [System.Diagnostics.DebuggerStepThrough()] + public override void ElementPropertyChanged(Microsoft.VisualStudio.Modeling.ElementPropertyChangedEventArgs e) + { + Neumont.Tools.Modeling.Diagnostics.TraceUtility.TraceRuleStart(e.ModelElement.Store, "Neumont.Tools.ORM.ShapeModel.ReadingShape.RolePlayerChangedRule"); + ReadingShape.RolePlayerChangedRule(e); + Neumont.Tools.Modeling.Diagnostics.TraceUtility.TraceRuleEnd(e.ModelElement.Store, "Neumont.Tools.ORM.ShapeModel.ReadingShape.RolePlayerChangedRule"); + } + } + [Microsoft.VisualStudio.Modeling.RuleOn(typeof(Neumont.Tools.ORM.ObjectModel.ObjectTypePlaysRole), FireTime=Microsoft.VisualStudio.Modeling.TimeToFire.TopLevelCommit, Priority=Microsoft.VisualStudio.Modeling.Diagrams.DiagramFixupConstants.ResizeParentRulePriority)] + private sealed class RolePlayerDeletedRuleClass : Microsoft.VisualStudio.Modeling.DeleteRule + { + [System.Diagnostics.DebuggerStepThrough()] + public RolePlayerDeletedRuleClass() + { + base.IsEnabled = false; + } + /// <summary> + /// Provide the following method in class: + /// Neumont.Tools.ORM.ShapeModel.ReadingShape + /// /// <summary> + /// /// DeleteRule: typeof(Neumont.Tools.ORM.ObjectModel.ObjectTypePlaysRole), FireTime=TopLevelCommit, Priority=DiagramFixupConstants.ResizeParentRulePriority; + /// /// </summary> + /// private static void RolePlayerDeletedRule(ElementDeletedEventArgs e) + /// { + /// } + /// </summary> + [System.Diagnostics.DebuggerStepThrough()] + public override void ElementDeleted(Microsoft.VisualStudio.Modeling.ElementDeletedEventArgs e) + { + Neumont.Tools.Modeling.Diagnostics.TraceUtility.TraceRuleStart(e.ModelElement.Store, "Neumont.Tools.ORM.ShapeModel.ReadingShape.RolePlayerDeletedRule"); + ReadingShape.RolePlayerDeletedRule(e); + Neumont.Tools.Modeling.Diagnostics.TraceUtility.TraceRuleEnd(e.ModelElement.Store, "Neumont.Tools.ORM.ShapeModel.ReadingShape.RolePlayerDeletedRule"); + } + } + [Microsoft.VisualStudio.Modeling.RuleOn(typeof(Neumont.Tools.ORM.ObjectModel.ObjectTypePlaysRole), FireTime=Microsoft.VisualStudio.Modeling.TimeToFire.TopLevelCommit, Priority=Microsoft.VisualStudio.Modeling.Diagrams.DiagramFixupConstants.ResizeParentRulePriority)] + private sealed class RolePlayerRolePlayerChangedRuleClass : Microsoft.VisualStudio.Modeling.RolePlayerChangeRule + { + [System.Diagnostics.DebuggerStepThrough()] + public RolePlayerRolePlayerChangedRuleClass() + { + base.IsEnabled = false; + } + /// <summary> + /// Provide the following method in class: + /// Neumont.Tools.ORM.ShapeModel.ReadingShape + /// /// <summary> + /// /// RolePlayerChangeRule: typeof(Neumont.Tools.ORM.ObjectModel.ObjectTypePlaysRole), FireTime=TopLevelCommit, Priority=DiagramFixupConstants.ResizeParentRulePriority; + /// /// </summary> + /// private static void RolePlayerRolePlayerChangedRule(RolePlayerChangedEventArgs e) + /// { + /// } + /// </summary> + [System.Diagnostics.DebuggerStepThrough()] + public override void RolePlayerChanged(Microsoft.VisualStudio.Modeling.RolePlayerChangedEventArgs e) + { + Neumont.Tools.Modeling.Diagnostics.TraceUtility.TraceRuleStart(e.ElementLink.Store, "Neumont.Tools.ORM.ShapeModel.ReadingShape.RolePlayerRolePlayerChangedRule"); + ReadingShape.RolePlayerRolePlayerChangedRule(e); + Neumont.Tools.Modeling.Diagnostics.TraceUtility.TraceRuleEnd(e.ElementLink.Store, "Neumont.Tools.ORM.ShapeModel.ReadingShape.RolePlayerRolePlayerChangedRule"); + } + } } #endregion // Rule classes for ReadingShape #region Rule classes for RingConstraintShape Modified: trunk/ORMModel/ShapeModel/ORMShape.AttachRules.xml =================================================================== --- trunk/ORMModel/ShapeModel/ORMShape.AttachRules.xml 2008-08-13 00:58:40 UTC (rev 1319) +++ trunk/ORMModel/ShapeModel/ORMShape.AttachRules.xml 2008-08-14 21:36:23 UTC (rev 1320) @@ -257,6 +257,18 @@ <arg:RolePlayerPositionChangeRule methodName="RoleDisplayOrderPositionChangedRule"> <arg:RuleOn targetType="FactTypeShapeHasRoleDisplayOrder" fireTime="TopLevelCommit" priority="DiagramFixupConstants.ResizeParentRulePriority"/> </arg:RolePlayerPositionChangeRule> + <arg:AddRule methodName="RolePlayerAddedRule"> + <arg:RuleOn targetType="ObjectTypePlaysRole" targetTypeQualifier="Neumont.Tools.ORM.ObjectModel" fireTime="TopLevelCommit" priority="DiagramFixupConstants.ResizeParentRulePriority"/> + </arg:AddRule> + <arg:ChangeRule methodName="RolePlayerChangedRule"> + <arg:RuleOn targetType="ObjectType" targetTypeQualifier="Neumont.Tools.ORM.ObjectModel" fireTime="TopLevelCommit" priority="DiagramFixupConstants.ResizeParentRulePriority"/> + </arg:ChangeRule> + <arg:DeleteRule methodName="RolePlayerDeletedRule"> + <arg:RuleOn targetType="ObjectTypePlaysRole" targetTypeQualifier="Neumont.Tools.ORM.ObjectModel" fireTime="TopLevelCommit" priority="DiagramFixupConstants.ResizeParentRulePriority"/> + </arg:DeleteRule> + <arg:RolePlayerChangeRule methodName="RolePlayerRolePlayerChangedRule"> + <arg:RuleOn targetType="ObjectTypePlaysRole" targetTypeQualifier="Neumont.Tools.ORM.ObjectModel" fireTime="TopLevelCommit" priority="DiagramFixupConstants.ResizeParentRulePriority"/> + </arg:RolePlayerChangeRule> </arg:RuleContainer> <arg:RuleContainer class="RingConstraintShape"> <arg:ChangeRule methodName="RingConstraintPropertyChangeRule"> Modified: trunk/ORMModel/ShapeModel/ReadingShape.cs =================================================================== --- trunk/ORMModel/ShapeModel/ReadingShape.cs 2008-08-13 00:58:40 UTC (rev 1319) +++ trunk/ORMModel/ShapeModel/ReadingShape.cs 2008-08-14 21:36:23 UTC (rev 1320) @@ -440,25 +440,37 @@ } return retVal; } - /// <summary> + /// Cause the reading shape for a role to invalidate + /// </summary> + private static void InvalidateReadingShape(Role role) + { + FactType factType; + if (null != role && + null != (factType = role.FactType)) + { + InvalidateReadingShape(factType); + } + } + /// <summary> /// Causes the ReadingShape on a FactTypeShape to invalidate /// </summary> public static void InvalidateReadingShape(FactType factType) { - foreach (ShapeElement se in PresentationViewsSubject.GetPresentation(factType)) + if (factType != null) { - FactTypeShape factShape = se as FactTypeShape; - if (factShape != null) + foreach (ShapeElement se in PresentationViewsSubject.GetPresentation(factType)) { - foreach (ShapeElement se2 in se.RelativeChildShapes) + FactTypeShape factShape = se as FactTypeShape; + if (factShape != null) { - ReadingShape readShape = se2 as ReadingShape; - if (readShape != null) + foreach (ShapeElement se2 in se.RelativeChildShapes) { - readShape.myDisplayText = null; - readShape.InvalidateRequired(true); - readShape.AutoResize(); + ReadingShape readShape = se2 as ReadingShape; + if (readShape != null) + { + readShape.InvalidateDisplayText(); + } } } } @@ -1009,6 +1021,69 @@ } } /// <summary> + /// AddRule: typeof(Neumont.Tools.ORM.ObjectModel.ObjectTypePlaysRole), FireTime=TopLevelCommit, Priority=DiagramFixupConstants.ResizeParentRulePriority; + /// Update readings when the set of role player names is modified + /// </summary> + private static void RolePlayerAddedRule(ElementAddedEventArgs e) + { + ObjectTypePlaysRole link = (ObjectTypePlaysRole)e.ModelElement; + if (!link.IsDeleted) + { + InvalidateReadingShape(link.PlayedRole); + } + } + /// <summary> + /// DeleteRule: typeof(Neumont.Tools.ORM.ObjectModel.ObjectTypePlaysRole), FireTime=TopLevelCommit, Priority=DiagramFixupConstants.ResizeParentRulePriority; + /// Update readings when the set of role player names is modified + /// </summary> + private static void RolePlayerDeletedRule(ElementDeletedEventArgs e) + { + ObjectTypePlaysRole link = (ObjectTypePlaysRole)e.ModelElement; + Role role = link.PlayedRole; + if (!role.IsDeleted) + { + InvalidateReadingShape(role); + } + } + /// <summary> + /// RolePlayerChangeRule: typeof(Neumont.Tools.ORM.ObjectModel.ObjectTypePlaysRole), FireTime=TopLevelCommit, Priority=DiagramFixupConstants.ResizeParentRulePriority; + /// Update readings when the set of role player names is modified + /// </summary> + private static void RolePlayerRolePlayerChangedRule(RolePlayerChangedEventArgs e) + { + ObjectTypePlaysRole link = (ObjectTypePlaysRole)e.ElementLink; + if (!link.IsDeleted) + { + if (e.DomainRole.Id == ObjectTypePlaysRole.RolePlayerDomainRoleId) + { + InvalidateReadingShape(link.PlayedRole); + } + else + { + InvalidateReadingShape((Role)e.OldRolePlayer); + InvalidateReadingShape((Role)e.NewRolePlayer); + } + } + } + /// <summary> + /// ChangeRule: typeof(Neumont.Tools.ORM.ObjectModel.ObjectType), FireTime=TopLevelCommit, Priority=DiagramFixupConstants.ResizeParentRulePriority; + /// Update readings when the set of role player names is modified + /// </summary> + private static void RolePlayerChangedRule(ElementPropertyChangedEventArgs e) + { + if (e.DomainProperty.Id == ObjectType.NameDomainPropertyId) + { + ObjectType objectType = (ObjectType)e.ModelElement; + if (!objectType.IsDeleted) + { + foreach (Role role in ObjectTypePlaysRole.GetPlayedRoleCollection(objectType)) + { + InvalidateReadingShape(role); + } + } + } + } + /// <summary> /// ChangeRule: typeof(Neumont.Tools.ORM.ObjectModel.Reading), FireTime=TopLevelCommit, Priority=DiagramFixupConstants.AddShapeRulePriority; /// Rule to notice changes to Reading.Text properties so that the /// reading shapes can have their display text invalidated. Modified: trunk/ORMModel/ShapeModel/ViewFixupRules.cs =================================================================== --- trunk/ORMModel/ShapeModel/ViewFixupRules.cs 2008-08-13 00:58:40 UTC (rev 1319) +++ trunk/ORMModel/ShapeModel/ViewFixupRules.cs 2008-08-14 21:36:23 UTC (rev 1320) @@ -452,20 +452,19 @@ { Store store = shape.Store; Dictionary<object, object> contextInfo = store.TransactionManager.CurrentTransaction.TopLevelTransaction.Context.ContextInfo; + object contextRole; int insertIndex = -1; - if (contextInfo.ContainsKey(FactTypeShape.InsertAfterRoleKey)) + if (contextInfo.TryGetValue(FactType.InsertAfterRoleKey, out contextRole)) { - RoleBase insertAfter = (RoleBase)contextInfo[FactTypeShape.InsertAfterRoleKey]; - insertIndex = roles.IndexOf(insertAfter); + insertIndex = roles.IndexOf(contextRole as RoleBase); if (insertIndex != -1) { ++insertIndex; } } - else if (contextInfo.ContainsKey(FactTypeShape.InsertBeforeRoleKey)) + else if (contextInfo.TryGetValue(FactType.InsertBeforeRoleKey, out contextRole)) { - RoleBase insertBefore = (RoleBase)contextInfo[FactTypeShape.InsertBeforeRoleKey]; - insertIndex = roles.IndexOf(insertBefore); + insertIndex = roles.IndexOf(contextRole as RoleBase); } if (insertIndex != -1) { Modified: trunk/ORMModel/Shell/FactEditor/FactEditorSaver.cs =================================================================== --- trunk/ORMModel/Shell/FactEditor/FactEditorSaver.cs 2008-08-13 00:58:40 UTC (rev 1319) +++ trunk/ORMModel/Shell/FactEditor/FactEditorSaver.cs 2008-08-14 21:36:23 UTC (rev 1320) @@ -440,8 +440,8 @@ { if (matchedRoles[i] == null) { - // UNDONE: Consider using the FactTypeShape.InsertAfterRoleKey - // and FactTypeShape.InsertBeforeRoleKey context information + // UNDONE: Consider using the FactType.InsertAfterRoleKey + // and FactType.InsertBeforeRoleKey context information // to modify display of inserted roles. // Use an existing role if we have it Modified: trunk/ORMModel/Shell/ORMDocDataServices.cs =================================================================== --- trunk/ORMModel/Shell/ORMDocDataServices.cs 2008-08-13 00:58:40 UTC (rev 1319) +++ trunk/ORMModel/Shell/ORMDocDataServices.cs 2008-08-14 21:36:23 UTC (rev 1320) @@ -1681,6 +1681,7 @@ } } ModelElement startElement = element; + ModelError modelError = locator as ModelError; IProxyDisplayProvider proxyProvider = null; bool useProxy = false; bool haveCurrentDesigner = false; @@ -1707,7 +1708,7 @@ if (useProxy) { // Second pass, we were unable to find a suitable shape for the first - selectElement = proxyProvider.ElementDisplayedAs(element); + selectElement = proxyProvider.ElementDisplayedAs(element, modelError); if (selectElement != null && selectElement == element) { selectElement = null; @@ -1791,12 +1792,11 @@ if (targetDocData.ActivateShapeHelper(shape, ref currentDocView, ref currentDesigner, ref haveCurrentDesigner)) { - ModelError error; IModelErrorActivation activator; - if (null != (error = locator as ModelError) & + if (null != modelError && null != (activator = shape as IModelErrorActivation)) { - activator.ActivateModelError(error); + activator.ActivateModelError(modelError); } return true; } Modified: trunk/ORMModel/Shell/ORMDocView.cs =================================================================== --- trunk/ORMModel/Shell/ORMDocView.cs 2008-08-13 00:58:40 UTC (rev 1319) +++ trunk/ORMModel/Shell/ORMDocView.cs 2008-08-14 21:36:23 UTC (rev 1320) @@ -854,13 +854,15 @@ checkedCommands = ORMDesignerCommands.None; toleratedCommands = ORMDesignerCommands.None; FactType factType; + ReadingOrder readingOrder = null; Role role; ObjectType objectType; NodeShape nodeShape; SetConstraint setConstraint; SetComparisonConstraint setComparisonConstraint = null; bool otherShape = false; - if (null != (factType = element as FactType)) + if (null != (factType = element as FactType) || + (null != (readingOrder = element as ReadingOrder) && null != (factType = readingOrder.FactType))) { visibleCommands = enabledCommands = ORMDesignerCommands.DeleteFactType | ORMDesignerCommands.DeleteAny | ORMDesignerCommands.DisplayReadingsWindow; Objectification objectification = factType.Objectification; @@ -874,11 +876,16 @@ visibleCommands |= ORMDesignerCommands.UnobjectifyFactType; enabledCommands |= ORMDesignerCommands.UnobjectifyFactType; } - FactTypeShape factShape; - if (null != (factShape = presentationElement as FactTypeShape)) + if (presentationElement is FactTypeShape || + (readingOrder != null && presentationElement is ReadingShape)) { - visibleCommands |= ORMDesignerCommands.DeleteFactShape | ORMDesignerCommands.DeleteAnyShape | ORMDesignerCommands.AutoLayout | ORMDesignerCommands.AlignShapes | ORMDesignerCommands.DisplayOrientation | ORMDesignerCommands.DisplayConstraintsPosition; - enabledCommands |= ORMDesignerCommands.DeleteFactShape | ORMDesignerCommands.DeleteAnyShape | ORMDesignerCommands.AutoLayout | ORMDesignerCommands.AlignShapes | ORMDesignerCommands.DisplayOrientation | ORMDesignerCommands.DisplayConstraintsPosition; + visibleCommands |= ORMDesignerCommands.DeleteFactShape | ORMDesignerCommands.DeleteAnyShape | ORMDesignerCommands.DisplayOrientation | ORMDesignerCommands.DisplayConstraintsPosition; + enabledCommands |= ORMDesignerCommands.DeleteFactShape | ORMDesignerCommands.DeleteAnyShape | ORMDesignerCommands.DisplayOrientation | ORMDesignerCommands.DisplayConstraintsPosition; + if (readingOrder == null) + { + visibleCommands |= ORMDesignerCommands.AutoLayout | ORMDesignerCommands.AlignShapes; + enabledCommands |= ORMDesignerCommands.AutoLayout | ORMDesignerCommands.AlignShapes; + } // Don't flag the DisplayOrientation or DisplayConstraintsPosition commands as checkable, multiselect check state mismatches handled dynamically in OnStatusCommand if (factType.RoleCollection.Count > 1) { @@ -1287,11 +1294,14 @@ bool isChecked = true; foreach (ModelElement mel in docView.SelectedElements) { - FactTypeShape shape = mel as FactTypeShape; - if (shape != null) + FactTypeShape factTypeShape; + ReadingShape readingShape; + if (null != (factTypeShape = mel as FactTypeShape) || + (null != (readingShape = mel as ReadingShape) && + null != (factTypeShape = readingShape.ParentShape as FactTypeShape))) { // The command is checked when all selected values match the expected orientation - if (shape.DisplayOrientation != expectedOrientation) + if (factTypeShape.DisplayOrientation != expectedOrientation) { isChecked = false; break; @@ -1316,11 +1326,14 @@ bool isChecked = true; foreach (ModelElement mel in docView.SelectedElements) { - FactTypeShape shape = mel as FactTypeShape; - if (shape != null) + FactTypeShape factTypeShape; + ReadingShape readingShape; + if (null != (factTypeShape = mel as FactTypeShape) || + (null != (readingShape = mel as ReadingShape) && + null != (factTypeShape = readingShape.ParentShape as FactTypeShape))) { // The command is checked when all selected values match the expected orientation - if (shape.ConstraintDisplayPosition != expectedPosition) + if (factTypeShape.ConstraintDisplayPosition != expectedPosition) { isChecked = false; break; @@ -1796,19 +1809,20 @@ mel = pel.ModelElement; // Remove the actual object in the model - if (mel != null && !mel.IsDeleted && !(mel is ReadingOrder)) + if (mel != null && !mel.IsDeleted) { Role role; if (null != (role = mel as Role) && pel is RoleNameShape) { role.Name = ""; } - else if (mel is ReadingOrder) - { - // Reading orders tolerate the delete command, but are not deleted directly - } else { + ReadingOrder readingOrder = mel as ReadingOrder; + if (readingOrder != null) + { + mel = readingOrder.FactType; + } // Check if the object shape was in expanded mode bool testRefModeCollapse = complexSelection || 0 != (enabledCommands & ORMDesignerCommands.DeleteObjectType); ObjectTypeShape objectShape; @@ -1890,15 +1904,24 @@ ModelElement mel = selectedElements[i] as ModelElement; PresentationElement pel = mel as ShapeElement; ObjectType backingObjectifiedType = null; - // ReadingShape and ValueConstraintShape tolerate deletion, but the - // shapes cannot be deleted individually if (pel != null && !pel.IsDeleted) { ObjectifiedFactTypeNameShape objectifiedObjectShape; - if (pel is ReadingShape || pel is ValueConstraintShape) + ReadingShape readingShape; + if (pel is ValueConstraintShape) { + // ValueConstraintShape tolerates deletion, but the + // shapes cannot be deleted individually continue; } + else if (null != (readingShape = pel as ReadingShape)) + { + pel = readingShape.ParentShape; + if (pel == null) + { + continue; + } + } else if (null != (objectifiedObjectShape = pel as ObjectifiedFactTypeNameShape)) { // The two parts of an objectification should always appear together, @@ -2279,11 +2302,11 @@ if (insertAfter) { ++insertIndex; - contextInfo[FactTypeShape.InsertAfterRoleKey] = role; + contextInfo[FactType.InsertAfterRoleKey] = role; } else { - contextInfo[FactTypeShape.InsertBeforeRoleKey] = role; + contextInfo[FactType.InsertBeforeRoleKey] = role; } //bool aggressivelyKillValueType = store.TransactionManager.CurrentTransaction.TopLevelTransaction.Context.ContextInfo.ContainsKey(DeleteReferenceModeValueType); @@ -3254,8 +3277,12 @@ IList selectedElements = SelectedElements; for (int i = selectedElements.Count - 1; i >= 0; i--) { - FactTypeShape factTypeShape = selectedElements[i] as FactTypeShape; - if (factTypeShape != null) + ModelElement element = selectedElements[i] as ModelElement; + FactTypeShape factTypeShape; + ReadingShape readingShape; + if (null != (factTypeShape = element as FactTypeShape) || + (null != (readingShape = element as ReadingShape) && + null != (factTypeShape = readingShape.ParentShape as FactTypeShape))) { factTypeShape.DisplayOrientation = orientation; } @@ -3287,8 +3314,12 @@ IList selectedElements = SelectedElements; for (int i = selectedElements.Count - 1; i >= 0; i--) { - FactTypeShape factTypeShape = selectedElements[i] as FactTypeShape; - if (factTypeShape != null) + ModelElement element = selectedElements[i] as ModelElement; + FactTypeShape factTypeShape; + ReadingShape readingShape; + if (null != (factTypeShape = element as FactTypeShape) || + (null != (readingShape = element as ReadingShape) && + null != (factTypeShape = readingShape.ParentShape as FactTypeShape))) { factTypeShape.ConstraintDisplayPosition = position; } @@ -3307,8 +3338,12 @@ IList selectedElements = SelectedElements; for (int i = selectedElements.Count - 1; i >= 0; i--) { - FactTypeShape factTypeShape = selectedElements[i] as FactTypeShape; - if (factTypeShape != null) + ModelElement element = selectedElements[i] as ModelElement; + FactTypeShape factTypeShape; + ReadingShape readingShape; + if (null != (factTypeShape = element as FactTypeShape) || + (null != (readingShape = element as ReadingShape) && + null != (factTypeShape = readingShape.ParentShape as FactTypeShape))) { factTypeShape.ReverseDisplayedRoleOrder(); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2008-08-13 00:58:30
|
Revision: 1319 http://orm.svn.sourceforge.net/orm/?rev=1319&view=rev Author: mcurland Date: 2008-08-13 00:58:40 +0000 (Wed, 13 Aug 2008) Log Message: ----------- Automatically add additional project references for LinqToSql service layer generation. refs #364 Modified Paths: -------------- trunk/XML/DCILtoLINQ/DCILtoLinqAttributeMapping.xslt Modified: trunk/XML/DCILtoLINQ/DCILtoLinqAttributeMapping.xslt =================================================================== --- trunk/XML/DCILtoLINQ/DCILtoLinqAttributeMapping.xslt 2008-08-13 00:57:10 UTC (rev 1318) +++ trunk/XML/DCILtoLINQ/DCILtoLinqAttributeMapping.xslt 2008-08-13 00:58:40 UTC (rev 1319) @@ -289,7 +289,9 @@ </xsl:if> <plx:namespaceImport name="System.Diagnostics.CodeAnalysis"/> <plx:namespaceImport name="System.Linq"/> - <plx:namespaceImport name="System.Runtime.Serialization"/> + <xsl:if test="$GenerateServiceLayer"> + <plx:namespaceImport name="System.Runtime.Serialization"/> + </xsl:if> <plx:namespaceImport name="System.Security.Permissions"/> <xsl:if test="$GenerateServiceLayer"> <plx:namespaceImport name="System.ServiceModel"/> @@ -299,7 +301,10 @@ <xsl:apply-templates select="dcl:schema" mode="GenerateNamespace"/> </plx:root> <xsl:if test="function-available('oct:EnsureProjectReference')"> - <xsl:variable name="addedProjectReference" select="oct:EnsureProjectReference('System.Data.Linq','System.Data.Linq') and oct:EnsureProjectReference('System.Data','System.Data')"/> + <xsl:variable name="addedProjectReferenceLinq" select="oct:EnsureProjectReference('System.Data.Linq','System.Data.Linq') and oct:EnsureProjectReference('System.Data','System.Data')"/> + <xsl:if test="$GenerateServiceLayer"> + <xsl:variable name="addedProjectReferenceServiceLayer" select="oct:EnsureProjectReference('System.Runtime.Serialization','System.Runtime.Serialization') and oct:EnsureProjectReference('System.ServiceModel','System.ServiceModel')"/> + </xsl:if> </xsl:if> </xsl:template> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2008-08-13 00:57:01
|
Revision: 1318 http://orm.svn.sourceforge.net/orm/?rev=1318&view=rev Author: mcurland Date: 2008-08-13 00:57:10 +0000 (Wed, 13 Aug 2008) Log Message: ----------- Fixed a couple of exclusion constraint verbalization data errors from [1315]. refs #286 Modified Paths: -------------- trunk/ORMModel/ObjectModel/VerbalizationCoreSnippetsDocumentation.html trunk/ORMModel/ObjectModel/VerbalizationDocumentation.xml trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml Modified: trunk/ORMModel/ObjectModel/VerbalizationCoreSnippetsDocumentation.html =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationCoreSnippetsDocumentation.html 2008-08-13 00:55:19 UTC (rev 1317) +++ trunk/ORMModel/ObjectModel/VerbalizationCoreSnippetsDocumentation.html 2008-08-13 00:57:10 UTC (rev 1318) @@ -2814,12 +2814,6 @@ <strong>Not Available</strong> </div> </div> - <div class="snippetUsedBy"> - <p>The <strong>IndentedLogicalAndListClose</strong> snippet is used by the following Constraints: <ul class="usedBy"> - <li>ExclusionConstraint</li> - </ul> - </p> - </div> </div> <div id="IndentedLogicalAndListFinalSeparator" class="snippet"> <span class="snippetHeader"> @@ -2837,12 +2831,6 @@ <pre class="unformattedSnippetDecorator">and that </pre> </div> </div> - <div class="snippetUsedBy"> - <p>The <strong>IndentedLogicalAndListFinalSeparator</strong> snippet is used by the following Constraints: <ul class="usedBy"> - <li>ExclusionConstraint</li> - </ul> - </p> - </div> </div> <div id="IndentedLogicalAndListOpen" class="snippet"> <span class="snippetHeader"> @@ -2860,12 +2848,6 @@ <strong>Not Available</strong> </div> </div> - <div class="snippetUsedBy"> - <p>The <strong>IndentedLogicalAndListOpen</strong> snippet is used by the following Constraints: <ul class="usedBy"> - <li>ExclusionConstraint</li> - </ul> - </p> - </div> </div> <div id="IndentedLogicalAndListPairSeparator" class="snippet"> <span class="snippetHeader"> @@ -2883,12 +2865,6 @@ <pre class="unformattedSnippetDecorator">and that </pre> </div> </div> - <div class="snippetUsedBy"> - <p>The <strong>IndentedLogicalAndListPairSeparator</strong> snippet is used by the following Constraints: <ul class="usedBy"> - <li>ExclusionConstraint</li> - </ul> - </p> - </div> </div> <div id="IndentedLogicalAndListSeparator" class="snippet"> <span class="snippetHeader"> @@ -2906,12 +2882,6 @@ <pre class="unformattedSnippetDecorator">and that </pre> </div> </div> - <div class="snippetUsedBy"> - <p>The <strong>IndentedLogicalAndListSeparator</strong> snippet is used by the following Constraints: <ul class="usedBy"> - <li>ExclusionConstraint</li> - </ul> - </p> - </div> </div> <div id="IndentedLogicalOrListClose" class="snippet"> <span class="snippetHeader"> Modified: trunk/ORMModel/ObjectModel/VerbalizationDocumentation.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationDocumentation.xml 2008-08-13 00:55:19 UTC (rev 1317) +++ trunk/ORMModel/ObjectModel/VerbalizationDocumentation.xml 2008-08-13 00:57:10 UTC (rev 1318) @@ -941,9 +941,7 @@ <unformattedSnippet></unformattedSnippet> <contains /> <containedIn /> - <usedBy> - <constraint name="ExclusionConstraint" /> - </usedBy> + <usedBy /> </snippet> <snippet name="IndentedLogicalAndListFinalSeparator" replacementCount="0"> <statement> @@ -952,9 +950,7 @@ <unformattedSnippet>and that </unformattedSnippet> <contains /> <containedIn /> - <usedBy> - <constraint name="ExclusionConstraint" /> - </usedBy> + <usedBy /> </snippet> <snippet name="IndentedLogicalAndListOpen" replacementCount="0"> <statement> @@ -963,9 +959,7 @@ <unformattedSnippet></unformattedSnippet> <contains /> <containedIn /> - <usedBy> - <constraint name="ExclusionConstraint" /> - </usedBy> + <usedBy /> </snippet> <snippet name="IndentedLogicalAndListPairSeparator" replacementCount="0"> <statement> @@ -974,9 +968,7 @@ <unformattedSnippet>and that </unformattedSnippet> <contains /> <containedIn /> - <usedBy> - <constraint name="ExclusionConstraint" /> - </usedBy> + <usedBy /> </snippet> <snippet name="IndentedLogicalAndListSeparator" replacementCount="0"> <statement> @@ -985,9 +977,7 @@ <unformattedSnippet>and that </unformattedSnippet> <contains /> <containedIn /> - <usedBy> - <constraint name="ExclusionConstraint" /> - </usedBy> + <usedBy /> </snippet> <snippet name="IndentedLogicalOrListClose" replacementCount="0"> <statement> Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2008-08-13 00:55:19 UTC (rev 1317) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.cs 2008-08-13 00:57:10 UTC (rev 1318) @@ -8529,28 +8529,28 @@ CoreVerbalizationSnippetType listSnippet; if (RoleIter1 == 0) { - listSnippet = CoreVerbalizationSnippetType.IndentedLogicalAndListOpen; + listSnippet = CoreVerbalizationSnippetType.SimpleLogicalAndListOpen; } else if (RoleIter1 == columnArity - 1) { if (RoleIter1 == 1) { - listSnippet = CoreVerbalizationSnippetType.IndentedLogicalAndListPairSeparator; + listSnippet = CoreVerbalizationSnippetType.SimpleLogicalAndListPairSeparator; } else { - listSnippet = CoreVerbalizationSnippetType.IndentedLogicalAndListFinalSeparator; + listSnippet = CoreVerbalizationSnippetType.SimpleLogicalAndListFinalSeparator; } } else { - listSnippet = CoreVerbalizationSnippetType.IndentedLogicalAndListSeparator; + listSnippet = CoreVerbalizationSnippetType.SimpleLogicalAndListSeparator; } sbTemp.Append(snippets.GetSnippet(listSnippet, isDeontic, isNegative)); sbTemp.Append(basicRoleReplacements[unaryReplacements[contextBasicReplacementIndex] ? 0 : FactType.IndexOfRole(factRoles, primaryRole)]); if (RoleIter1 == columnArity - 1) { - sbTemp.Append(snippets.GetSnippet(CoreVerbalizationSnippetType.IndentedLogicalAndListClose, isDeontic, isNegative)); + sbTemp.Append(snippets.GetSnippet(CoreVerbalizationSnippetType.SimpleLogicalAndListClose, isDeontic, isNegative)); } } snippet1Replace1Replace1 = sbTemp.ToString(); @@ -9153,30 +9153,29 @@ } snippet1Replace1Replace1 = sbTemp.ToString(); } - snippet1Replace1 = string.Format(writer.FormatProvider, snippet1ReplaceFormat1, snippet1Replace1Replace1); - string snippet1Replace2 = null; - string snippet1ReplaceFormat2 = snippets.GetSnippet(CoreVerbalizationSnippetType.GroupExclusion, isDeontic, isNegative); - string snippet1Replace2Replace1 = null; - int snippet1Replace2ReplaceSequenceIter1; - int snippet1Replace2ReplaceCompositeCount1 = 0; - int snippet1Replace2ReplaceCompositeIterator1; - FactType[] snippet1Replace2Replace1ItemUniqueFactTypes1 = new FactType[columnArity]; - FactType snippet1Replace2Replace1ItemTestUniqueFactType1; - for (snippet1Replace2ReplaceSequenceIter1 = 0; snippet1Replace2ReplaceSequenceIter1 < constraintRoleArity; ++snippet1Replace2ReplaceSequenceIter1) + string snippet1Replace1Replace2 = null; + string snippet1Replace1ReplaceFormat2 = snippets.GetSnippet(CoreVerbalizationSnippetType.GroupExclusion, isDeontic, isNegative); + string snippet1Replace1Replace2Replace1 = null; + int snippet1Replace1Replace2ReplaceSequenceIter1; + int snippet1Replace1Replace2ReplaceCompositeCount1 = 0; + int snippet1Replace1Replace2ReplaceCompositeIterator1; + FactType[] snippet1Replace1Replace2Replace1ItemUniqueFactTypes1 = new FactType[columnArity]; + FactType snippet1Replace1Replace2Replace1ItemTestUniqueFactType1; + for (snippet1Replace1Replace2ReplaceSequenceIter1 = 0; snippet1Replace1Replace2ReplaceSequenceIter1 < constraintRoleArity; ++snippet1Replace1Replace2ReplaceSequenceIter1) { - IList<Role> includedSequenceRoles = allConstraintSequences[snippet1Replace2ReplaceSequenceIter1]; - for (snippet1Replace2ReplaceCompositeIterator1 = 0; snippet1Replace2ReplaceCompositeIterator1 < columnArity; ++snippet1Replace2ReplaceCompositeIterator1) + IList<Role> includedSequenceRoles = allConstraintSequences[snippet1Replace1Replace2ReplaceSequenceIter1]; + for (snippet1Replace1Replace2ReplaceCompositeIterator1 = 0; snippet1Replace1Replace2ReplaceCompositeIterator1 < columnArity; ++snippet1Replace1Replace2ReplaceCompositeIterator1) { - RoleBase primaryRole = includedSequenceRoles[snippet1Replace2ReplaceCompositeIterator1]; - if (Array.IndexOf(snippet1Replace2Replace1ItemUniqueFactTypes1, snippet1Replace2Replace1ItemTestUniqueFactType1 = primaryRole.FactType) == -1) + RoleBase primaryRole = includedSequenceRoles[snippet1Replace1Replace2ReplaceCompositeIterator1]; + if (Array.IndexOf(snippet1Replace1Replace2Replace1ItemUniqueFactTypes1, snippet1Replace1Replace2Replace1ItemTestUniqueFactType1 = primaryRole.FactType) == -1) { - snippet1Replace2Replace1ItemUniqueFactTypes1[snippet1Replace2ReplaceCompositeIterator1] = snippet1Replace2Replace1ItemTestUniqueFactType1; - ++snippet1Replace2ReplaceCompositeCount1; + snippet1Replace1Replace2Replace1ItemUniqueFactTypes1[snippet1Replace1Replace2ReplaceCompositeIterator1] = snippet1Replace1Replace2Replace1ItemTestUniqueFactType1; + ++snippet1Replace1Replace2ReplaceCompositeCount1; } } - Array.Clear(snippet1Replace2Replace1ItemUniqueFactTypes1, 0, snippet1Replace2Replace1ItemUniqueFactTypes1.Length); + Array.Clear(snippet1Replace1Replace2Replace1ItemUniqueFactTypes1, 0, snippet1Replace1Replace2Replace1ItemUniqueFactTypes1.Length); } - snippet1Replace2ReplaceCompositeIterator1 = 0; + snippet1Replace1Replace2ReplaceCompositeIterator1 = 0; if (sbTemp == null) { sbTemp = new StringBuilder(); @@ -9185,10 +9184,10 @@ { sbTemp.Length = 0; } - for (snippet1Replace2ReplaceSequenceIter1 = 0; snippet1Replace2ReplaceSequenceIter1 < constraintRoleArity; ++snippet1Replace2ReplaceSequenceIter1) + for (snippet1Replace1Replace2ReplaceSequenceIter1 = 0; snippet1Replace1Replace2ReplaceSequenceIter1 < constraintRoleArity; ++snippet1Replace1Replace2ReplaceSequenceIter1) { - IList<Role> includedSequenceRoles = allConstraintSequences[snippet1Replace2ReplaceSequenceIter1]; - string snippet1Replace2Replace1Item1; + IList<Role> includedSequenceRoles = allConstraintSequences[snippet1Replace1Replace2ReplaceSequenceIter1]; + string snippet1Replace1Replace2Replace1Item1; for (int RoleIter1 = 0; RoleIter1 < columnArity; ++RoleIter1) { RoleBase primaryRole = includedSequenceRoles[RoleIter1]; @@ -9196,17 +9195,17 @@ allReadingOrders = parentFact.ReadingOrderCollection; factRoles = allReadingOrders.Count != 0 ? allReadingOrders[0].RoleCollection : parentFact.RoleCollection; factArity = factRoles.Count; - if (Array.IndexOf(snippet1Replace2Replace1ItemUniqueFactTypes1, snippet1Replace2Replace1ItemTestUniqueFactType1 = primaryRole.FactType) == -1) + if (Array.IndexOf(snippet1Replace1Replace2Replace1ItemUniqueFactTypes1, snippet1Replace1Replace2Replace1ItemTestUniqueFactType1 = primaryRole.FactType) == -1) { - snippet1Replace2Replace1ItemUniqueFactTypes1[RoleIter1] = snippet1Replace2Replace1ItemTestUniqueFactType1; + snippet1Replace1Replace2Replace1ItemUniqueFactTypes1[RoleIter1] = snippet1Replace1Replace2Replace1ItemTestUniqueFactType1; CoreVerbalizationSnippetType listSnippet; - if (snippet1Replace2ReplaceCompositeIterator1 == 0) + if (snippet1Replace1Replace2ReplaceCompositeIterator1 == 0) { listSnippet = CoreVerbalizationSnippetType.MultilineIndentedCompoundListOpen; } - else if (snippet1Replace2ReplaceCompositeIterator1 == snippet1Replace2ReplaceCompositeCount1 - 1) + else if (snippet1Replace1Replace2ReplaceCompositeIterator1 == snippet1Replace1Replace2ReplaceCompositeCount1 - 1) { - if (snippet1Replace2ReplaceCompositeIterator1 == 1) + if (snippet1Replace1Replace2ReplaceCompositeIterator1 == 1) { listSnippet = CoreVerbalizationSnippetType.MultilineIndentedCompoundListPairSeparator; } @@ -9222,11 +9221,11 @@ sbTemp.Append(snippets.GetSnippet(listSnippet, isDeontic, isNegative)); reading = parentFact.GetMatchingReading(allReadingOrders, null, primaryRole, null, false, false, false, factRoles, true); hyphenBinder = new VerbalizationHyphenBinder(reading, factRoles, unaryRoleIndex, snippets.GetSnippet(CoreVerbalizationSnippetType.HyphenBoundPredicatePart, isDeontic, isNegative)); - for (int snippet1Replace2Replace1ItemFactRoleIter1 = 0; snippet1Replace2Replace1ItemFactRoleIter1 < factArity; ++snippet1Replace2Replace1ItemFactRoleIter1) + for (int snippet1Replace1Replace2Replace1ItemFactRoleIter1 = 0; snippet1Replace1Replace2Replace1ItemFactRoleIter1 < factArity; ++snippet1Replace1Replace2Replace1ItemFactRoleIter1) { - RoleBase currentRole = factRoles[snippet1Replace2Replace1ItemFactRoleIter1]; + RoleBase currentRole = factRoles[snippet1Replace1Replace2Replace1ItemFactRoleIter1]; string roleReplacement = null; - string basicReplacement = hyphenBinder.HyphenBindRoleReplacement(allBasicRoleReplacements[allFacts.IndexOf(includedSequenceRoles[RoleIter1].FactType)][snippet1Replace2Replace1ItemFactRoleIter1], snippet1Replace2Replace1ItemFactRoleIter1); + string basicReplacement = hyphenBinder.HyphenBindRoleReplacement(allBasicRoleReplacements[allFacts.IndexOf(includedSequenceRoles[RoleIter1].FactType)][snippet1Replace1Replace2Replace1ItemFactRoleIter1], snippet1Replace1Replace2Replace1ItemFactRoleIter1); if (includedSequenceRoles.Contains(currentRole.Role)) { roleReplacement = string.Format(writer.FormatProvider, snippets.GetSnippet(CoreVerbalizationSnippetType.DefiniteArticle, isDeontic, isNegative), basicReplacement); @@ -9239,21 +9238,22 @@ { roleReplacement = basicReplacement; } - roleReplacements[snippet1Replace2Replace1ItemFactRoleIter1] = roleReplacement; + roleReplacements[snippet1Replace1Replace2Replace1ItemFactRoleIter1] = roleReplacement; } - snippet1Replace2Replace1Item1 = hyphenBinder.PopulatePredicateText(reading, factRoles, roleReplacements, false); - sbTemp.Append(snippet1Replace2Replace1Item1); - if (snippet1Replace2ReplaceCompositeIterator1 == snippet1Replace2ReplaceCompositeCount1 - 1) + snippet1Replace1Replace2Replace1Item1 = hyphenBinder.PopulatePredicateText(reading, factRoles, roleReplacements, false); + sbTemp.Append(snippet1Replace1Replace2Replace1Item1); + if (snippet1Replace1Replace2ReplaceCompositeIterator1 == snippet1Replace1Replace2ReplaceCompositeCount1 - 1) { sbTemp.Append(snippets.GetSnippet(CoreVerbalizationSnippetType.MultilineIndentedCompoundListClose, isDeontic, isNegative)); } - ++snippet1Replace2ReplaceCompositeIterator1; + ++snippet1Replace1Replace2ReplaceCompositeIterator1; } } } - snippet1Replace2Replace1 = sbTemp.ToString(); - snippet1Replace2 = string.Format(writer.FormatProvider, snippet1ReplaceFormat2, snippet1Replace2Replace1); - FactType.WriteVerbalizerSentence(writer, string.Format(writer.FormatProvider, snippetFormat1, snippet1Replace1, snippet1Replace2), snippets.GetSnippet(CoreVerbalizationSnippetType.CloseVerbalizationSentence, isDeontic, isNegative)); + snippet1Replace1Replace2Replace1 = sbTemp.ToString(); + snippet1Replace1Replace2 = string.Format(writer.FormatProvider, snippet1Replace1ReplaceFormat2, snippet1Replace1Replace2Replace1); + snippet1Replace1 = string.Format(writer.FormatProvider, snippet1ReplaceFormat1, snippet1Replace1Replace1, snippet1Replace1Replace2); + FactType.WriteVerbalizerSentence(writer, string.Format(writer.FormatProvider, snippetFormat1, snippet1Replace1), snippets.GetSnippet(CoreVerbalizationSnippetType.CloseVerbalizationSentence, isDeontic, isNegative)); } #endregion // Pattern Matches #region Error report Modified: trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml 2008-08-13 00:55:19 UTC (rev 1317) +++ trunk/ORMModel/ObjectModel/VerbalizationGenerator.xml 2008-08-13 00:57:10 UTC (rev 1318) @@ -1160,7 +1160,7 @@ <Snippet ref="ImpliedModalNecessityOperator"> <Snippet ref="ForEachCompactQuantifier"> <IterateSequences listStyle="null" pass="first"> - <IterateRoles match="constraintRoles" listStyle="IndentedLogicalAndList"/> + <IterateRoles match="constraintRoles" listStyle="SimpleLogicalAndList"/> </IterateSequences> <ConditionalSnippet> <Snippet ref="GroupExclusiveOr" conditionalMatch="ExclusionIsExclusiveOrConstraint"/> @@ -1255,21 +1255,21 @@ <IterateSequences listStyle="null" pass="first"> <IterateRoles match="constraintRoles" listStyle="SimpleLogicalAndList"/> </IterateSequences> + <Snippet ref="GroupExclusion"> + <IterateSequences listStyle="MultilineIndentedCompoundList" compositeList="true"> + <IterateRoles match="constraintRoles" listStyle="null" uniqueFactType="true"> + <Fact readingChoice="PreferPrimaryLeadReading"> + <PredicateReplacement match="included"> + <Snippet ref="DefiniteArticle"/> + </PredicateReplacement> + <PredicateReplacement> + <Snippet ref="ExistentialQuantifier"/> + </PredicateReplacement> + </Fact> + </IterateRoles> + </IterateSequences> + </Snippet> </Snippet> - <Snippet ref="GroupExclusion"> - <IterateSequences listStyle="MultilineIndentedCompoundList" compositeList="true"> - <IterateRoles match="constraintRoles" listStyle="null" uniqueFactType="true"> - <Fact readingChoice="PreferPrimaryLeadReading"> - <PredicateReplacement match="included"> - <Snippet ref="DefiniteArticle"/> - </PredicateReplacement> - <PredicateReplacement> - <Snippet ref="ExistentialQuantifier"/> - </PredicateReplacement> - </Fact> - </IterateRoles> - </IterateSequences> - </Snippet> </Snippet> </ConstrainedRoles> </Constraint> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2008-08-13 00:55:10
|
Revision: 1317 http://orm.svn.sourceforge.net/orm/?rev=1317&view=rev Author: mcurland Date: 2008-08-13 00:55:19 +0000 (Wed, 13 Aug 2008) Log Message: ----------- Allow multiple Snippets elements per Language element in verbalization customization files, automatically add base identifier options for explicitly targeted snippets (fixes assert in available snippets picker), and add a file watcher to reload modified snippets on next verbalization request. refs #315 Modified Paths: -------------- trunk/ORMModel/ObjectModel/Design/Editors/AvailableVerbalizationSnippetsPicker.cs trunk/ORMModel/ObjectModel/VerbalizationSnippetSetsManager.cs trunk/ORMModel/ObjectModel/VerbalizationUntypedSnippets.xsd trunk/ORMModel/Shell/ORMDocDataServices.cs Modified: trunk/ORMModel/ObjectModel/Design/Editors/AvailableVerbalizationSnippetsPicker.cs =================================================================== --- trunk/ORMModel/ObjectModel/Design/Editors/AvailableVerbalizationSnippetsPicker.cs 2008-08-13 00:47:52 UTC (rev 1316) +++ trunk/ORMModel/ObjectModel/Design/Editors/AvailableVerbalizationSnippetsPicker.cs 2008-08-13 00:55:19 UTC (rev 1317) @@ -513,7 +513,7 @@ TargetedTypeData[] typeData = new TargetedTypeData[targetedTypesCount]; for (int i = 0; i < targetedTypesCount; ++i) { - typeData[i] = new TargetedTypeData(GetVerbalizationTargetDisplayName(myTargetedTypes[firstTargetedType + 1].Target), firstTargetedType + i + 1); + typeData[i] = new TargetedTypeData(GetVerbalizationTargetDisplayName(myTargetedTypes[firstTargetedType + i + 1].Target), firstTargetedType + i + 1); } return new TypeBranchWithExplicitTargets(this, firstTargetedType, typeData); } Modified: trunk/ORMModel/ObjectModel/VerbalizationSnippetSetsManager.cs =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationSnippetSetsManager.cs 2008-08-13 00:47:52 UTC (rev 1316) +++ trunk/ORMModel/ObjectModel/VerbalizationSnippetSetsManager.cs 2008-08-13 00:55:19 UTC (rev 1317) @@ -664,7 +664,7 @@ myEnumTypeName = enumTypeName; myLangId = languageId; myId = id; - myDescription = null; + myDescription = description; myTarget = target ?? DefaultTarget; } #endregion // Constructors @@ -1533,6 +1533,15 @@ { // Fallback case, base is not defined baseSnippets = (IVerbalizationSets<TEnum>)processedSets[defaultSnippetsIdentifier]; + if (currentBaseId.Target != VerbalizationSnippetsIdentifier.DefaultTarget && + currentBaseId.IsTargetedDefaultIdentifier(currentBaseId.Target)) + { + if (string.IsNullOrEmpty(currentBaseId.Description)) + { + currentBaseId = new VerbalizationSnippetsIdentifier(currentBaseId.EnumTypeName, currentBaseId.Target, currentBaseId.LanguageId, currentBaseId.Id, defaultSnippetsIdentifier.Description); + } + processedSets.Add(currentBaseId, baseSnippets); + } } } Debug.Assert(baseSnippets != null); // Should always have some base at this point Modified: trunk/ORMModel/ObjectModel/VerbalizationUntypedSnippets.xsd =================================================================== --- trunk/ORMModel/ObjectModel/VerbalizationUntypedSnippets.xsd 2008-08-13 00:47:52 UTC (rev 1316) +++ trunk/ORMModel/ObjectModel/VerbalizationUntypedSnippets.xsd 2008-08-13 00:55:19 UTC (rev 1317) @@ -39,7 +39,7 @@ </xs:simpleType> <xs:complexType name="LanguageType"> <xs:sequence> - <xs:element name="Snippets" minOccurs="1" maxOccurs="1"> + <xs:element name="Snippets" minOccurs="1" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="Snippet" minOccurs="0" maxOccurs="unbounded"> @@ -105,7 +105,13 @@ <xs:element name="Languages"> <xs:complexType> <xs:sequence> - <xs:element name="Language" type="LanguageType" minOccurs="1" maxOccurs="unbounded"/> + <xs:element name="Language" type="LanguageType" minOccurs="1" maxOccurs="unbounded"> + <xs:unique name="SnippetsNameAndTargetUnique"> + <xs:selector xpath="ve:Snippets"/> + <xs:field xpath="@name"/> + <xs:field xpath="@target"/> + </xs:unique> + </xs:element> </xs:sequence> </xs:complexType> <xs:key name="LanguageCodeKey"> Modified: trunk/ORMModel/Shell/ORMDocDataServices.cs =================================================================== --- trunk/ORMModel/Shell/ORMDocDataServices.cs 2008-08-13 00:47:52 UTC (rev 1316) +++ trunk/ORMModel/Shell/ORMDocDataServices.cs 2008-08-13 00:55:19 UTC (rev 1317) @@ -39,6 +39,7 @@ using Neumont.Tools.ORM.ObjectModel; using Neumont.Tools.ORM.ShapeModel; using MSOLE = Microsoft.VisualStudio.OLE.Interop; +using System.IO; namespace Neumont.Tools.ORM.Shell { @@ -1122,6 +1123,9 @@ private IORMToolTaskProvider myTaskProvider; private string myLastVerbalizationSnippetsOptions; private IDictionary<string, IDictionary<Type, IVerbalizationSets>> myTargetedVerbalizationSnippets; + private uint myInstanceVerbalizationChangeCookie; + private static FileSystemWatcher myVerbalizationChangeWatcher; + private static uint myVerbalizationChangeCookie; private IDictionary<string, VerbalizationTargetData> myVerbalizationTargets; private IDictionary<Type, LayoutEngineData> myLayoutEngines; private int myCustomBlockCanAddTransactionCount; @@ -1230,7 +1234,7 @@ verbalizationOptions = ""; } bool loadTarget = false; - if (targetedSnippets == null || (currentSnippetsOptions == null || currentSnippetsOptions != verbalizationOptions)) + if (targetedSnippets == null || myInstanceVerbalizationChangeCookie != myVerbalizationChangeCookie || (currentSnippetsOptions == null || currentSnippetsOptions != verbalizationOptions)) { // UNDONE: See comments in LoadSnippetsDictionary about loading // a dictionary with all type/target combinations then wrapping it @@ -1242,6 +1246,7 @@ { targetedSnippets.Clear(); } + myInstanceVerbalizationChangeCookie = myVerbalizationChangeCookie; } else if (targetedSnippets != null) { @@ -1257,11 +1262,50 @@ if (targetedSnippets == null) { myTargetedVerbalizationSnippets = targetedSnippets = new Dictionary<string, IDictionary<Type, IVerbalizationSets>>(); + if (myVerbalizationChangeWatcher == null) + { + FileSystemWatcher changeWatcher = new FileSystemWatcher(ORMDesignerPackage.VerbalizationDirectory, "*.xml"); + changeWatcher.IncludeSubdirectories = true; + changeWatcher.NotifyFilter = NotifyFilters.DirectoryName | NotifyFilters.FileName | NotifyFilters.LastWrite | NotifyFilters.CreationTime; + FileSystemEventHandler handler = new FileSystemEventHandler(VerbalizationCustomizationsChanged); + changeWatcher.Created += handler; + changeWatcher.Changed += handler; + changeWatcher.Deleted += handler; + changeWatcher.Renamed += new RenamedEventHandler(VerbalizationCustomizationsRenamed); + changeWatcher.EnableRaisingEvents = true; + FileSystemWatcher useWatcher = System.Threading.Interlocked.CompareExchange<FileSystemWatcher>(ref myVerbalizationChangeWatcher, changeWatcher, null); + if (useWatcher != null) + { + changeWatcher.Dispose(); + } + } } targetedSnippets[target] = retVal; } return retVal; } + /// <summary> + /// Track changes to the verbalization dictionary so that we can + /// reload snippets files as they change. + /// </summary> + private static void VerbalizationCustomizationsChanged(object sender, FileSystemEventArgs e) + { + unchecked + { + ++myVerbalizationChangeCookie; + }; + } + /// <summary> + /// Track changes to the verbalization dictionary so that we can + /// reload snippets files as they change. + /// </summary> + private static void VerbalizationCustomizationsRenamed(object sender, RenamedEventArgs e) + { + unchecked + { + ++myVerbalizationChangeCookie; + }; + } IDictionary<Type, IVerbalizationSets> IORMToolServices.GetVerbalizationSnippetsDictionary(string target) { return GetVerbalizationSnippetsDictionary(target); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2008-08-13 00:32:31
|
Revision: 1314 http://orm.svn.sourceforge.net/orm/?rev=1314&view=rev Author: mcurland Date: 2008-08-13 00:32:41 +0000 (Wed, 13 Aug 2008) Log Message: ----------- Display and respect role order for internal uniqueness constraint editing. fixes #369 Modified Paths: -------------- trunk/ORMModel/ShapeModel/FactTypeShape.cs trunk/ORMModel/ShapeModel/InternalConstraintConnectAction.cs trunk/ORMModel/Shell/ORMDocView.cs Modified: trunk/ORMModel/ShapeModel/FactTypeShape.cs =================================================================== --- trunk/ORMModel/ShapeModel/FactTypeShape.cs 2008-06-10 01:17:49 UTC (rev 1313) +++ trunk/ORMModel/ShapeModel/FactTypeShape.cs 2008-08-13 00:32:41 UTC (rev 1314) @@ -2385,7 +2385,20 @@ Pen pen = styleSet.GetPen(FactTypeShape.RoleBoxResource); int activeRoleIndex; ExternalConstraintConnectAction activeExternalAction = ActiveExternalConstraintConnectAction; + UniquenessConstraint activeInternalUniqueness = null; + LinkedElementCollection<Role> activeInternalUniquenessRoles = null; InternalUniquenessConstraintConnectAction activeInternalAction = ActiveInternalUniquenessConstraintConnectAction; + if (activeInternalAction != null) + { + if (activeInternalAction.SourceShape != parentFactShape) + { + activeInternalAction = null; + } + else + { + activeInternalUniqueness = activeInternalAction.ActiveConstraint; + } + } ORMDiagram currentDiagram = parentFactShape.Diagram as ORMDiagram; StringFormat stringFormat = null; Font connectActionFont = null; @@ -2419,8 +2432,10 @@ g.FillRectangle(roleCenterBrush, roleBounds.Left, roleBounds.Top, roleBounds.Width, roleBounds.Height); // There is an active ExternalConstraintConnectAction, and this role is currently in the action's role set. - if (activeExternalAction != null && - -1 != (activeRoleIndex = activeExternalAction.GetActiveRoleIndex(currentRole))) + if ((activeExternalAction != null && + -1 != (activeRoleIndex = activeExternalAction.GetActiveRoleIndex(currentRole))) || + (activeInternalAction != null && + -1 != (activeRoleIndex = activeInternalAction.GetActiveRoleIndex(currentRole)))) { // There is an active ExternalConstraintConnectAction, and this role is currently in the action's role set. DrawHighlight(g, styleSet, roleBounds, highlightThisRole); @@ -2459,11 +2474,11 @@ g.Restore(state); } } - // There is an active InternalUniquenessConstraintConnectAction, and this role is currently in the action's role set. - else if (activeInternalAction != null && -1 != (activeRoleIndex = activeInternalAction.GetActiveRoleIndex(currentRole))) + // There is an active InternalUniquenessConstraintConnectAction, and this role is removed from an existing constraint. + else if (activeInternalUniqueness != null && + (activeInternalUniquenessRoles ?? (activeInternalUniquenessRoles = activeInternalUniqueness.RoleCollection)).Contains(currentRole)) { - // There is an active InternalUniquenessConstraintConnectAction, and this role is currently in the action's role set. - DrawHighlight(g, styleSet, roleBounds, highlightThisRole); + parentFactShape.DrawHighlight(g, roleBounds, true, highlightThisRole); } else if (null != currentDiagram) { @@ -2487,22 +2502,10 @@ parentFactShape.DrawHighlight(g, roleBounds, true, highlightThisRole); SetComparisonConstraint mcec; SetConstraint scec; - bool drawIndexNumbers = false; string indexString = null; - if (activeExternalAction == null) + if (activeExternalAction == null || !activeExternalAction.InitialRoles.Contains(currentRole)) { - drawIndexNumbers = true; - } - else - { - if (activeExternalAction.InitialRoles.IndexOf(currentRole) < 0) - { - drawIndexNumbers = true; - } - } - if (drawIndexNumbers) - { if (null != (mcec = stickyConstraint as SetComparisonConstraint)) { LinkedElementCollection<SetComparisonConstraintRoleSequence> sequenceCollection = mcec.RoleSequenceCollection; Modified: trunk/ORMModel/ShapeModel/InternalConstraintConnectAction.cs =================================================================== --- trunk/ORMModel/ShapeModel/InternalConstraintConnectAction.cs 2008-06-10 01:17:49 UTC (rev 1313) +++ trunk/ORMModel/ShapeModel/InternalConstraintConnectAction.cs 2008-08-13 00:32:41 UTC (rev 1314) @@ -122,34 +122,38 @@ if (null != (iuConstraint = constraint as UniquenessConstraint) && iuConstraint.IsInternal) { - // The single-column constraint is its own role set, just add the roles + // Keep the collection ordered, this ends up as constraint order on objectified FactTypes LinkedElementCollection<Role> roles = iuConstraint.RoleCollection; - int currentCount = roles.Count; - int removedCount = 0; - for (int i = currentCount - 1; i >= 0; --i) + int existingRolesCount = roles.Count; + for (int i = existingRolesCount - 1; i >= 0; --i) { - Role currentRole = roles[i]; - int index = selectedRoles.IndexOf(currentRole); - if (index == -1) + Role testRole = roles[i]; + if (!selectedRoles.Contains(testRole)) { - roles.Remove(currentRole); + roles.Remove(testRole); + --existingRolesCount; } - else - { - selectedRoles[index] = null; - ++removedCount; - } } - if (removedCount < rolesCount) + for (int i = 0; i < rolesCount; ++i) { - for (int i = 0; i < rolesCount; ++i) + Role selectedRole = selectedRoles[i]; + int existingIndex = roles.IndexOf(selectedRole); + if (existingIndex == -1) { - Role r = selectedRoles[i]; - if (r != null) + if (i < existingRolesCount) { - roles.Add(r); + roles.Insert(i, selectedRole); } + else if (!roles.Contains(selectedRole)) + { + roles.Add(selectedRole); + } + ++existingRolesCount; } + else if (existingIndex != i) + { + roles.Move(existingIndex, i); + } } } } Modified: trunk/ORMModel/Shell/ORMDocView.cs =================================================================== --- trunk/ORMModel/Shell/ORMDocView.cs 2008-06-10 01:17:49 UTC (rev 1313) +++ trunk/ORMModel/Shell/ORMDocView.cs 2008-08-13 00:32:41 UTC (rev 1314) @@ -2351,7 +2351,8 @@ LinkedElementCollection<Role> constraintRoles = null; bool abort = false; IList selectedElements = SelectedElements; - for (int i = selectedElements.Count - 1; i >= 0; i--) + int selectedElementCount = selectedElements.Count; + for (int i = 0; i < selectedElementCount; ++i) { Role role = selectedElements[i] as Role; if (role != null) @@ -2362,13 +2363,14 @@ parentFact = testFact; UniquenessConstraint iuc = UniquenessConstraint.CreateInternalUniquenessConstraint(parentFact); constraintRoles = iuc.RoleCollection; + constraintRoles.Add(role); } else if (testFact != parentFact) { abort = true; // Transaction will rollback when it disposes if we don't commit break; } - if (!constraintRoles.Contains(role)) + else if (!constraintRoles.Contains(role)) { constraintRoles.Add(role); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-10-23 18:12:19
|
Revision: 1166 http://orm.svn.sourceforge.net/orm/?rev=1166&view=rev Author: mcurland Date: 2007-10-23 11:12:22 -0700 (Tue, 23 Oct 2007) Log Message: ----------- Fixed modality issues with Entity Relationship Learning Mode display. refs #344 Modified Paths: -------------- trunk/ORMModel/ShapeModel/RolePlayerLink.cs Modified: trunk/ORMModel/ShapeModel/RolePlayerLink.cs =================================================================== --- trunk/ORMModel/ShapeModel/RolePlayerLink.cs 2007-10-23 18:11:14 UTC (rev 1165) +++ trunk/ORMModel/ShapeModel/RolePlayerLink.cs 2007-10-23 18:12:22 UTC (rev 1166) @@ -721,7 +721,8 @@ { if (displaySetting == EntityRelationshipBinaryMultiplicityDisplay.Barker) { - bool mandatory = role.IsMandatory; + MandatoryConstraint constraint = role.SimpleMandatoryConstraint; + bool mandatory = constraint != null && constraint.Modality == ConstraintModality.Alethic; switch (multiplicity) { case RoleMultiplicity.ZeroToMany: @@ -848,6 +849,22 @@ /// </summary> private static void UpdateDotDisplayOnMandatoryConstraintChange(Role role) { + InvalidateRolePlayerLinks(role); + if (OptionsPage.CurrentEntityRelationshipBinaryMultiplicityDisplay == EntityRelationshipBinaryMultiplicityDisplay.InformationEngineering) + { + // The opposite links also need updating + RoleBase oppositeRole = role.OppositeRole; + if (oppositeRole != null) + { + InvalidateRolePlayerLinks(oppositeRole.Role); + } + } + } + /// <summary> + /// Helper function to invalidate roles + /// </summary> + private static void InvalidateRolePlayerLinks(Role role) + { foreach (ObjectTypePlaysRole objectTypePlaysRole in DomainRoleInfo.GetElementLinks<ObjectTypePlaysRole>(role, ObjectTypePlaysRole.PlayedRoleDomainRoleId)) { foreach (PresentationElement pel in PresentationViewsSubject.GetPresentation(objectTypePlaysRole)) @@ -870,22 +887,43 @@ { DomainDataDirectory dataDirectory = store.DomainDataDirectory; - eventManager.AddOrRemoveHandler(dataDirectory.FindDomainProperty(MandatoryConstraint.ModalityDomainPropertyId), new EventHandler<ElementPropertyChangedEventArgs>(InternalConstraintChangedEvent), action); + eventManager.AddOrRemoveHandler(dataDirectory.FindDomainProperty(MandatoryConstraint.ModalityDomainPropertyId), new EventHandler<ElementPropertyChangedEventArgs>(InternalConstraintModalityChangedEvent), action); eventManager.AddOrRemoveHandler(dataDirectory.FindDomainRelationship(FactSetConstraint.DomainClassId), new EventHandler<ElementAddedEventArgs>(InternalConstraintRoleSequenceAddedEvent), action); eventManager.AddOrRemoveHandler(dataDirectory.FindDomainRelationship(ConstraintRoleSequenceHasRole.DomainClassId), new EventHandler<ElementDeletedEventArgs>(InternalConstraintRoleSequenceRoleRemovedEvent), action); } /// <summary> /// Update the link displays when the modality of a simple mandatory constraint changes /// </summary> - private static void InternalConstraintChangedEvent(object sender, ElementPropertyChangedEventArgs e) + private static void InternalConstraintModalityChangedEvent(object sender, ElementPropertyChangedEventArgs e) { - MandatoryConstraint smc = e.ModelElement as MandatoryConstraint; - if (smc != null && !smc.IsDeleted && smc.IsSimple) + ModelElement mel = e.ModelElement; + if (!mel.IsDeleted) { - LinkedElementCollection<Role> roles = smc.RoleCollection; - if (roles.Count != 0) + switch (((IConstraint)mel).ConstraintType) { - UpdateDotDisplayOnMandatoryConstraintChange(roles[0]); + case ConstraintType.SimpleMandatory: + LinkedElementCollection<Role> roles = ((SetConstraint)mel).RoleCollection; + if (roles.Count != 0) + { + UpdateDotDisplayOnMandatoryConstraintChange(roles[0]); + } + break; + case ConstraintType.InternalUniqueness: + if (OptionsPage.CurrentEntityRelationshipBinaryMultiplicityDisplay != EntityRelationshipBinaryMultiplicityDisplay.Off) + { + foreach (FactType factType in ((SetConstraint)mel).FactTypeCollection) + { + LinkedElementCollection<RoleBase> roleBases = factType.RoleCollection; + if (roleBases.Count == 2) + { + foreach (RoleBase roleBase in roleBases) + { + InvalidateRolePlayerLinks(roleBase.Role); + } + } + } + } + break; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-10-23 18:06:41
|
Revision: 1164 http://orm.svn.sourceforge.net/orm/?rev=1164&view=rev Author: mcurland Date: 2007-10-23 11:06:43 -0700 (Tue, 23 Oct 2007) Log Message: ----------- Implemented GetBy methods refs #343 Modified Paths: -------------- trunk/CodeSmith/NetTiersPort/EntityProvider.xslt Modified: trunk/CodeSmith/NetTiersPort/EntityProvider.xslt =================================================================== --- trunk/CodeSmith/NetTiersPort/EntityProvider.xslt 2007-10-23 18:05:37 UTC (rev 1163) +++ trunk/CodeSmith/NetTiersPort/EntityProvider.xslt 2007-10-23 18:06:43 UTC (rev 1164) @@ -7,7 +7,7 @@ xmlns:exsl="http://exslt.org/common" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:csc="urn:nettiers:CommonSqlCode" - xmlns:tmp="urn:temporary" + xmlns:tmp="urn:temporary" extension-element-prefixes="exsl msxsl csc" exclude-result-prefixes="se xsl tmp"> <!-- DEBUG: indent="yes" is for debugging only, has sideeffects on docComment output. --> @@ -821,7 +821,7 @@ </xsl:for-each> <plx:pragma type="closeRegion" data="Get By Foreign Key Functions"/> </xsl:if> - + <!-- Start Mike/Tommy code --> <xsl:if test="$settings['IncludeGetListByIX']"> <plx:pragma type="region" data="Get By Index Functions"/> @@ -906,6 +906,8 @@ </plx:function> </xsl:if> <xsl:variable name="FullReturnType" select="concat($BLLNamespace,'.',$entityClassName)"/> + + <!-- Method starting on line 16 --> <plx:function name="GetBy{$keysName}" visibility="public"> <plx:leadingInfo> <plx:docComment> @@ -941,11 +943,196 @@ </plx:callThis> </plx:return> </plx:function> + + <!-- Method Starting on Line 28 --> + <plx:function name="GetBy{$keysName}" visibility="public"> + <plx:leadingInfo> + <plx:docComment> + <summary> +Gets rows from the datasource based on the primary key <xsl:value-of select="@name" /> index. +</summary> + <xsl:copy-of select="$docCommentColumnParamsFragment"/> + <param name="start">Row number at which to start reading, the first row is 0.</param> + <param name="pageLength">Number of rows to return.</param> + <returns>Returns an instance of the <see cref="<xsl:value-of select="$FullReturnType"/>"/> class.</returns> + </plx:docComment> + </plx:leadingInfo> + <xsl:copy-of select="$columnParamsFragment"/> + <plx:param name="start" dataTypeName=".i4"/> + <plx:param name="pageLength" dataTypeName=".i4"/> + <plx:returns dataTypeName="{$entityClassName}" dataTypeQualifier="{$BLLNamespace}" /> + <plx:local name="count" dataTypeName=".i4"> + <plx:initialize> + <plx:value data="-1" type="i4" /> + </plx:initialize> + </plx:local> + <plx:return> + <plx:callThis name="GetBy{$keysName}"> + <plx:passParam> + <plx:nullKeyword /> + </plx:passParam> + <xsl:copy-of select="$forwardColumnParamsFragment"/> + <plx:passParam> + <plx:nameRef name="start" type="parameter"/> + </plx:passParam> + <plx:passParam> + <plx:nameRef name="pageLength" type="parameter"/> + </plx:passParam> + <plx:passParam type="out"> + <plx:nameRef name="count"/> + </plx:passParam> + </plx:callThis> + </plx:return> + </plx:function> + + <!-- Method Starting on Line 43 --> + <plx:function name="GetBy{$keysName}" visibility="public"> + <plx:leadingInfo> + <plx:docComment> + <summary> +Gets rows from the datasource based on the primary key <xsl:value-of select="@name" /> index. +</summary> + <param name="transactionManager">A <see cref="TransactionManager"/> object.</param> + <xsl:copy-of select="$docCommentColumnParamsFragment"/> + <returns>Returns an instance of the <see cref="<xsl:value-of select="$FullReturnType"/>"/> class.</returns> + </plx:docComment> + </plx:leadingInfo> + <plx:param name="transactionManager" dataTypeName="TransactionManager"/> + <xsl:copy-of select="$columnParamsFragment"/> + <plx:returns dataTypeName="{$entityClassName}" dataTypeQualifier="{$BLLNamespace}" /> + <plx:local name="count" dataTypeName=".i4"> + <plx:initialize> + <plx:value data="-1" type="i4" /> + </plx:initialize> + </plx:local> + <plx:return> + <plx:callThis name="GetBy{$keysName}"> + <plx:passParam> + <plx:nameRef name="transactionManager" type="parameter"/> + </plx:passParam> + <xsl:copy-of select="$forwardColumnParamsFragment"/> + <plx:passParam> + <plx:value data="0" type="i4" /> + </plx:passParam> + <plx:passParam> + <plx:callStatic name="MaxValue" dataTypeName=".i4"/> + </plx:passParam> + <plx:passParam type="out"> + <plx:nameRef name="count"/> + </plx:passParam> + </plx:callThis> + </plx:return> + </plx:function> + + <!-- Method starting on line 57 --> + <plx:function name="GetBy{$keysName}" visibility="public"> + <plx:leadingInfo> + <plx:docComment> + <summary> +Gets a row from the DataSource based on its primary key. +</summary> + <param name="transactionManager">A <see cref="TransactionManager"/> object.</param> + <xsl:copy-of select="$docCommentColumnParamsFragment"/> + <param name="start">Row number at which to start reading, the first row is 0.</param> + <param name="pageLength">Number of rows to return.</param> + <returns>Returns an instance of the <see cref="<xsl:value-of select="$FullReturnType"/>"/> class.</returns> + </plx:docComment> + </plx:leadingInfo> + <plx:param name="transactionManager" dataTypeName="TransactionManager"/> + <xsl:copy-of select="$columnParamsFragment"/> + <plx:param name="start" dataTypeName=".i4"/> + <plx:param name="pageLength" dataTypeName=".i4"/> + <plx:returns dataTypeName="{$entityClassName}" dataTypeQualifier="{$BLLNamespace}" /> + <plx:local name="count" dataTypeName=".i4"> + <plx:initialize> + <plx:value data="-1" type="i4" /> + </plx:initialize> + </plx:local> + <plx:return> + <plx:callThis name="GetBy{$keysName}"> + <plx:passParam> + <plx:nameRef name="transactionManager" type="parameter"/> + </plx:passParam> + <xsl:copy-of select="$forwardColumnParamsFragment"/> + <plx:passParam> + <plx:nameRef name="start" type="parameter"/> + </plx:passParam> + <plx:passParam> + <plx:nameRef name="pageLength" type="parameter"/> + </plx:passParam> + <plx:passParam type="out"> + <plx:nameRef name="count"/> + </plx:passParam> + </plx:callThis> + </plx:return> + </plx:function> + + <!-- Method starting on line 74 --> + <plx:function name="GetBy{$keysName}" visibility="public"> + <plx:leadingInfo> + <plx:docComment> + <summary> +Gets a row from the DataSource based on its primary key. +</summary> + <xsl:copy-of select="$docCommentColumnParamsFragment"/> + <param name="start">Row number at which to start reading, the first row is 0.</param> + <param name="pageLength">Number of rows to return.</param> + <param name="count">out parameter to get total records for query.</param> + <returns>Returns an instance of the <see cref="<xsl:value-of select="$FullReturnType"/>"/> class.</returns> + </plx:docComment> + </plx:leadingInfo> + <xsl:copy-of select="$columnParamsFragment"/> + <plx:param name="start" dataTypeName=".i4"/> + <plx:param name="pageLength" dataTypeName=".i4"/> + <plx:param name="count" dataTypeName=".i4" type="out" /> + <plx:returns dataTypeName="{$entityClassName}" dataTypeQualifier="{$BLLNamespace}" /> + <plx:return> + <plx:callThis name="GetBy{$keysName}"> + <plx:passParam> + <plx:nullKeyword/> + </plx:passParam> + <xsl:copy-of select="$forwardColumnParamsFragment"/> + <plx:passParam> + <plx:nameRef name="start" type="parameter"/> + </plx:passParam> + <plx:passParam> + <plx:nameRef name="pageLength" type="parameter"/> + </plx:passParam> + <plx:passParam type="out"> + <plx:nameRef name="count"/> + </plx:passParam> + </plx:callThis> + </plx:return> + </plx:function> + + <!-- Method starting on line 89 --> + <plx:function name="GetBy{$keysName}" visibility="public" modifier="abstract"> + <plx:leadingInfo> + <plx:docComment> + <summary> +Gets a row from the DataSource based on its primary key. +</summary> + <param name="transactionManager">A <see cref="TransactionManager"/> object.</param> + <xsl:copy-of select="$docCommentColumnParamsFragment"/> + <param name="start">Row number at which to start reading, the first row is 0.</param> + <param name="pageLength">Number of rows to return.</param> + <param name="count">The total number of records.</param> + <returns>Returns an instance of the <see cref="<xsl:value-of select="$FullReturnType"/>"/> class.</returns> + </plx:docComment> + </plx:leadingInfo> + <plx:param name="transactionManager" dataTypeName="TransactionManager"/> + <xsl:copy-of select="$columnParamsFragment"/> + <plx:param name="start" dataTypeName=".i4"/> + <plx:param name="pageLength" dataTypeName=".i4"/> + <plx:param name="count" dataTypeName=".i4" type="out" /> + <plx:returns dataTypeName="{$entityClassName}" dataTypeQualifier="{$BLLNamespace}" /> + </plx:function> + </xsl:for-each> <plx:pragma type="closeRegion" data="Get By Index Functions"/> </xsl:if> <!-- End Mike/Tommy code --> - + </plx:class> <plx:pragma type="closeRegion" data="Classes for {@name}"/> </xsl:template> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-10-23 18:05:33
|
Revision: 1163 http://orm.svn.sourceforge.net/orm/?rev=1163&view=rev Author: mcurland Date: 2007-10-23 11:05:37 -0700 (Tue, 23 Oct 2007) Log Message: ----------- Adding the missing csproj file to the project. refs #343 Added Paths: ----------- trunk/CodeSmith/NetTiersPort/NetTiersPort.csproj Added: trunk/CodeSmith/NetTiersPort/NetTiersPort.csproj =================================================================== --- trunk/CodeSmith/NetTiersPort/NetTiersPort.csproj (rev 0) +++ trunk/CodeSmith/NetTiersPort/NetTiersPort.csproj 2007-10-23 18:05:37 UTC (rev 1163) @@ -0,0 +1,66 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{E919DE5D-5EFD-47C6-B93A-00BCB440F132}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>NetTiersPort</RootNamespace> + <AssemblyName>NetTiersPort</AssemblyName> + <StartupObject>NetTiersPort.Program</StartupObject> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <None Include="SchemaExplorer.xsd"> + <SubType>Designer</SubType> + </None> + <Compile Include="SampleDatabaseSchema.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>SampleDatabaseSchema.xml</DependentUpon> + </Compile> + </ItemGroup> + <ItemGroup> + <Content Include="EntityProvider.xslt" /> + <Content Include="PLiX.xml" /> + <Content Include="SampleDatabaseSchema.xml"> + <Generator>NUPlixLoader</Generator> + <LastGenOutput>SampleDatabaseSchema.cs</LastGenOutput> + </Content> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-10-23 17:56:42
|
Revision: 1160 http://orm.svn.sourceforge.net/orm/?rev=1160&view=rev Author: mcurland Date: 2007-10-23 10:54:38 -0700 (Tue, 23 Oct 2007) Log Message: ----------- Reverted inadvertent changes from [1159]. refs #96 Modified Paths: -------------- trunk/XML/OIAL/OIAL.csproj trunk/XML/OIAL/OIAL.xsd Modified: trunk/XML/OIAL/OIAL.csproj =================================================================== --- trunk/XML/OIAL/OIAL.csproj 2007-10-23 17:52:49 UTC (rev 1159) +++ trunk/XML/OIAL/OIAL.csproj 2007-10-23 17:54:38 UTC (rev 1160) @@ -11,9 +11,6 @@ <ItemGroup> </ItemGroup> <ItemGroup> - <None Include="KnowledgeLanguage.xsd"> - <SubType>Designer</SubType> - </None> <None Include="ORMDataTypes-Temporal.xsd"> <SubType>Designer</SubType> </None> Modified: trunk/XML/OIAL/OIAL.xsd =================================================================== --- trunk/XML/OIAL/OIAL.xsd 2007-10-23 17:52:49 UTC (rev 1159) +++ trunk/XML/OIAL/OIAL.xsd 2007-10-23 17:54:38 UTC (rev 1160) @@ -3,7 +3,6 @@ targetNamespace="http://schemas.orm.net/OIAL" xmlns:oil="http://schemas.orm.net/OIAL" xmlns:odt="http://schemas.orm.net/ORMDataTypes" - xmlns:kl="http://schemas.orm.net/ORM/KnowledgeLanguage" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" @@ -18,11 +17,10 @@ 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. </xs:appinfo> - <xs:appinfo source="Contributors">Kevin M. Owen, Corey Kaylor, Korvyn Dornseif, Jaron Briggs, Terry Halpin</xs:appinfo> + <xs:appinfo source="Contributors">Kevin M. Owen, Corey Kaylor, Korvyn Dornseif</xs:appinfo> </xs:annotation> <xs:import namespace="http://schemas.orm.net/ORMDataTypes"/> - <xs:import namespace="http://schemas.orm.net/ORM/KnowledgeLanguage"/> <xs:simpleType name="sourceRef"> <xs:restriction base="xs:string"/> @@ -145,7 +143,7 @@ <xs:attribute name="sourceRoleRef" use="optional" type="oil:sourceRef"> <xs:annotation> <xs:documentation>@sourceRoleRef is the @id of the role that led to the creation of this oil:informationType.</xs:documentation> - <xs:documentation>It will always be present, except for a single oil:informationType inside each oil:conceptType created for an orm:ValueType.</xs:documentation> + <xs:documentation>It will always be present, except for a single oil:informationType inside each conceptType created for an orm:ValueType.</xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-10-15 06:51:18
|
Revision: 1158 http://orm.svn.sourceforge.net/orm/?rev=1158&view=rev Author: mcurland Date: 2007-10-14 23:51:21 -0700 (Sun, 14 Oct 2007) Log Message: ----------- Always display the generated FactType name for an objectified fact type in the "Fact Types" branch of ORM Model Browser instead of the associated ObjectType name. Requested by Terry. refs #268 Modified Paths: -------------- trunk/ORMModel/ObjectModel/SurveyImplementations/FactTypeAnswers.cs Modified: trunk/ORMModel/ObjectModel/SurveyImplementations/FactTypeAnswers.cs =================================================================== --- trunk/ORMModel/ObjectModel/SurveyImplementations/FactTypeAnswers.cs 2007-10-15 06:49:40 UTC (rev 1157) +++ trunk/ORMModel/ObjectModel/SurveyImplementations/FactTypeAnswers.cs 2007-10-15 06:51:21 UTC (rev 1158) @@ -91,16 +91,24 @@ { get { - string retVal = this.Name; - if (string.IsNullOrEmpty(retVal)) + string retVal; + if (Objectification != null) { - // UNDONE: MattCurland: We're getting this during redo scenarios on objectified facts. - // This is a bug in the Name propery implementation, which should handle - // this transparently. The sequencing here is very tricky because it involves - // synchronizing the FactType and ObjectType namds. I don't want to destabilize - // that scenario for this case, so I'm just regenerating the name. - retVal = GenerateName(); + retVal = this.GenerateName(); } + else + { + retVal = this.Name; + if (string.IsNullOrEmpty(retVal)) + { + // UNDONE: MattCurland: We're getting this during redo scenarios on objectified facts. + // This is a bug in the Name propery implementation, which should handle + // this transparently. The sequencing here is very tricky because it involves + // synchronizing the FactType and ObjectType namds. I don't want to destabilize + // that scenario for this case, so I'm just regenerating the name. + retVal = GenerateName(); + } + } return retVal; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-10-15 06:49:36
|
Revision: 1157 http://orm.svn.sourceforge.net/orm/?rev=1157&view=rev Author: mcurland Date: 2007-10-14 23:49:40 -0700 (Sun, 14 Oct 2007) Log Message: ----------- Pull hyphens from collapsed predicate text and added notes on better future name generation implementations. refs #338 Updated version to 2007-10 CTP. refs #193 Modified Paths: -------------- trunk/RelationalModel/OialDcilBridge/NameGeneration.cs trunk/VersionGenerator.exe.config Modified: trunk/RelationalModel/OialDcilBridge/NameGeneration.cs =================================================================== --- trunk/RelationalModel/OialDcilBridge/NameGeneration.cs 2007-10-15 06:48:28 UTC (rev 1156) +++ trunk/RelationalModel/OialDcilBridge/NameGeneration.cs 2007-10-15 06:49:40 UTC (rev 1157) @@ -55,13 +55,22 @@ private static class NameGeneration { #region GenerateAllNames method - private static IDatabaseNameGenerator nameGenerator; - public static void GenerateAllNames(Schema schema) + private static IDatabaseNameGenerator myNameGenerator; + private static IDatabaseNameGenerator NameGenerator { - if (null == nameGenerator) + get { - nameGenerator = new DefaultDatabaseNameGenerator(); + IDatabaseNameGenerator retVal = myNameGenerator; + if (null == retVal) + { + myNameGenerator = retVal = new DefaultDatabaseNameGenerator(); + } + return retVal; } + } + public static void GenerateAllNames(Schema schema) + { + IDatabaseNameGenerator nameGenerator = NameGenerator; UniqueNameGenerator uniqueChecker = new UniqueNameGenerator(); LinkedElementCollection<Table> tables = schema.TableCollection; @@ -571,6 +580,22 @@ if (createRoleName && !createRoleNameSecond) { //generate a role name from the predicate text and prepend it + + // UNDONE: Matt Curland (Oct 13, 2007) + // The predicate text can be used to generate a much better name + // than just prepending it. There are several things to consider here. + // This is not a spec, just things we should look at. + // 1) If we do generate a role name that ends up being unique, then there + // really is no reason to use the role player name at all if we use a reading + // that ends with the opposite role. + // 2) The generated text here should use the opposite role as a predicate + // replacement if it starts the format string and the near role ends the format + // string. In other words, we prefer to find a reading that is the forward reading + // for the near role, but we need to respect the order if we don't find it. + // 3) The 'longerThan' approach may be too simplistic. We may look at other ways + // to track 'refinement level' that allows us to know what we have tried already + // and to jump immediately to other alternatives. Refinements are not necessary longer. + AddToNameCollection(ref singleName, ref nameCollection, GetRoleNameFromPredicateText(mainFactType, towardsRole, oppositeRole, isUnary, columnSpace), 0); @@ -939,8 +964,8 @@ //get rid of string replace fields string text = myReplaceFieldsPattern.Replace(reading.Text, " "); text = " " + CultureInfo.CurrentCulture.TextInfo.ToLower(text) + " "; - //remove articles - text = text.Replace(" a ", " ").Replace(" an ", " ").Replace(" the ", " "); + //remove articles and hyphens + text = text.Replace(" a ", " ").Replace(" an ", " ").Replace(" the ", " ").Replace("- ", " ").Replace(" -", " "); if (!isUnary && text.Trim() != "has") { text = text.Replace(" has ", " "); Modified: trunk/VersionGenerator.exe.config =================================================================== --- trunk/VersionGenerator.exe.config 2007-10-15 06:48:28 UTC (rev 1156) +++ trunk/VersionGenerator.exe.config 2007-10-15 06:49:40 UTC (rev 1157) @@ -2,7 +2,7 @@ <configuration> <appSettings> <add key="RevisionStartYearMonth" value="2006-01"/> - <add key="ReleaseYearMonth" value="2007-09"/> + <add key="ReleaseYearMonth" value="2007-10"/> <!-- ReleaseType: "CTP" or "RTM" --> <add key="ReleaseType" value="CTP"/> <!-- Changes to the major and/or minor version numbers have extreme effects across every part of the product. --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-10-15 06:36:27
|
Revision: 1155 http://orm.svn.sourceforge.net/orm/?rev=1155&view=rev Author: mcurland Date: 2007-10-14 23:36:31 -0700 (Sun, 14 Oct 2007) Log Message: ----------- Added DatabaseImport files to setup. refs #305 Modified Paths: -------------- trunk/Setup/ComponentGroups.wxs trunk/Setup/Components.wxs trunk/Setup/Features.wxs trunk/Setup/Strings.wxl Modified: trunk/Setup/ComponentGroups.wxs =================================================================== --- trunk/Setup/ComponentGroups.wxs 2007-10-15 06:35:07 UTC (rev 1154) +++ trunk/Setup/ComponentGroups.wxs 2007-10-15 06:36:31 UTC (rev 1155) @@ -58,6 +58,18 @@ <ComponentRef Id="ORMSchemasLocalCatalogComponent"/> <ComponentRef Id="ORMTransformsComponent"/> </ComponentGroup> + <ComponentGroup Id="DatabaseImportFeatureComponents"> + <ComponentRef Id="NORMADBImportComponent"/> + <ComponentRef Id="NORMADBImportGACComponent"/> + <ComponentRef Id="NORMADBImportProjectItemsGeneralComponent"/> + <ComponentRef Id="NORMADBImportProjectItemsVBasicComponent"/> + <ComponentRef Id="NORMADBImportProjectItemsVCSharpComponent"/> + <ComponentRef Id="NORMADBImportProjectItemsVJSharpComponent"/> + <ComponentRef Id="NORMADBImportProjectItemsVCPlusPlusComponent"/> + <ComponentRef Id="NORMADBImportProjectItemsVWebDevVBasicComponent"/> + <ComponentRef Id="NORMADBImportProjectItemsVWebDevCSharpComponent"/> + <ComponentRef Id="NORMADBImportProjectItemsVWebDevJSharpComponent"/> + </ComponentGroup> <ComponentGroup Id="HelpFeatureComponents"> <ComponentRef Id="NORMAVSHelpComponent"/> </ComponentGroup> Modified: trunk/Setup/Components.wxs =================================================================== --- trunk/Setup/Components.wxs 2007-10-15 06:35:07 UTC (rev 1154) +++ trunk/Setup/Components.wxs 2007-10-15 06:36:31 UTC (rev 1155) @@ -43,6 +43,10 @@ <File Id="Neumont.Tools.ORMAbstractionToConceptualDatabaseBridge.dll_GAC" ShortName="CDBBr.dll" Name="Neumont.Tools.ORMAbstractionToConceptualDatabaseBridge.dll" Source="..\RelationalModel\OialDcilBridge\bin\$(var.BuildConfiguration)\Neumont.Tools.ORMAbstractionToConceptualDatabaseBridge.dll" DefaultVersion="$(var.ProductVersion)" DefaultLanguage="0" KeyPath="yes" Assembly=".net" AssemblyManifest="Neumont.Tools.ORMAbstractionToConceptualDatabaseBridge.dll_GAC" ProcessorArchitecture="msil"/> </Component> + <Component Id="NORMADBImportGACComponent" Guid="029817D9-6779-4801-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)"> + <File Id="Neumont.Tools.ORM.DatabaseImport.dll_GAC" ShortName="DBImport.dll" Name="Neumont.Tools.ORM.DatabaseImport.dll" Source="..\Tools\DatabaseImport\bin\$(var.BuildConfiguration)\Neumont.Tools.ORM.DatabaseImport.dll" + DefaultVersion="$(var.ProductVersion)" DefaultLanguage="0" KeyPath="yes" Assembly=".net" AssemblyManifest="Neumont.Tools.ORM.DatabaseImport.dll_GAC" ProcessorArchitecture="msil"/> + </Component> </Directory> <Directory Id="$(var.ProgramFilesFolder)"> @@ -126,6 +130,10 @@ </RegistryKey> </RegistryKey> </Component> + <Component Id="NORMADBImportComponent" Guid="0B49C0D1-EB3A-4E6E-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)"> + <File Id="Neumont.Tools.ORM.DatabaseImport.dll" ShortName="DBImport.dll" Name="Neumont.Tools.ORM.DatabaseImport.dll" Source="..\Tools\DatabaseImport\bin\$(var.BuildConfiguration)\Neumont.Tools.ORM.DatabaseImport.dll" + DefaultVersion="$(var.ProductVersion)" DefaultLanguage="0" KeyPath="yes" Assembly=".net" AssemblyManifest="Neumont.Tools.ORM.DatabaseImport.dll" ProcessorArchitecture="msil" AssemblyApplication="Neumont.Tools.ORM.DatabaseImport.dll"/> + </Component> <Component Id="ORMCustomToolVBasicComponent" Guid="0B8DF8D8-7418-47F3-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)"> <CreateFolder/> <Condition>VBASICPACKAGEGUID OR Installed</Condition> @@ -930,6 +938,10 @@ <File Id="General.zip" Name="ORMModel.zip" Source="..\ORMModel\Shell\ProjectItems\General.zip" DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.dll"/> </Component> + <Component Id="NORMADBImportProjectItemsGeneralComponent" Guid="1890A3E6-8C17-478C-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)" KeyPath="yes"> + <File Id="DBImportGeneral.zip" Name="ORMModelFromDatabase.zip" ShortName="DBImpGen.zip" Source="..\Tools\DatabaseImport\ProjectItems\General.zip" + DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.DatabaseImport.dll"/> + </Component> </Directory> <Directory Id="VisualBasic" ShortName="VBasic" Name="VisualBasic"> <Component Id="NORMAVSProjectItemsVBasicComponent" Guid="5D140A94-9C4A-4B60-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)" KeyPath="yes"> @@ -937,6 +949,11 @@ <File Id="VisualBasic.zip" Name="ORMModel.zip" Source="..\ORMModel\Shell\ProjectItems\VisualBasic.zip" DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.dll"/> </Component> + <Component Id="NORMADBImportProjectItemsVBasicComponent" Guid="8C45B394-60D1-433C-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)" KeyPath="yes"> + <Condition>VBASICPACKAGEGUID OR Installed</Condition> + <File Id="DBImportVisualBasic.zip" Name="ORMModelFromDatabase.zip" ShortName="DBImpVB.zip" Source="..\Tools\DatabaseImport\ProjectItems\VisualBasic.zip" + DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.DatabaseImport.dll"/> + </Component> </Directory> <Directory Id="CSharp" Name="CSharp"> <Component Id="NORMAVSProjectItemsVCSharpComponent" Guid="C1AAAF79-FA94-45C0-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)" KeyPath="yes"> @@ -944,6 +961,11 @@ <File Id="CSharp.zip" Name="ORMModel.zip" Source="..\ORMModel\Shell\ProjectItems\CSharp.zip" DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.dll"/> </Component> + <Component Id="NORMADBImportProjectItemsVCSharpComponent" Guid="08F0D621-59B8-46D1-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)" KeyPath="yes"> + <Condition>VCSHARPPACKAGEGUID OR Installed</Condition> + <File Id="DBImportCSharp.zip" Name="ORMModelFromDatabase.zip" ShortName="DBImpCS.zip" Source="..\Tools\DatabaseImport\ProjectItems\CSharp.zip" + DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.DatabaseImport.dll"/> + </Component> </Directory> <Directory Id="JSharp" Name="JSharp"> <Component Id="NORMAVSProjectItemsVJSharpComponent" Guid="B6ACBD38-3FAD-4C24-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)" KeyPath="yes"> @@ -951,6 +973,11 @@ <File Id="JSharp.zip" Name="ORMModel.zip" Source="..\ORMModel\Shell\ProjectItems\JSharp.zip" DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.dll"/> </Component> + <Component Id="NORMADBImportProjectItemsVJSharpComponent" Guid="B6711598-65C5-4E23-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)" KeyPath="yes"> + <Condition>VJSHARPPACKAGEGUID OR Installed</Condition> + <File Id="DBImportJSharp.zip" Name="ORMModelFromDatabase.zip" ShortName="DBImpJS.zip" Source="..\Tools\DatabaseImport\ProjectItems\JSharp.zip" + DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.DatabaseImport.dll"/> + </Component> </Directory> <Directory Id="VisualC" Name="VisualC"> <Component Id="NORMAVSProjectItemsVCPlusPlusComponent" Guid="16B28893-FE72-4BBF-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)" KeyPath="yes"> @@ -958,6 +985,11 @@ <File Id="VisualC.zip" Name="ORMModel.zip" Source="..\ORMModel\Shell\ProjectItems\VisualC.zip" DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.dll"/> </Component> + <Component Id="NORMADBImportProjectItemsVCPlusPlusComponent" Guid="5BC18298-68CE-46F2-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)" KeyPath="yes"> + <Condition>VCPLUSPLUSPACKAGEGUID OR Installed</Condition> + <File Id="DBImportVisualC.zip" Name="ORMModelFromDatabase.zip" ShortName="DBImpVC.zip" Source="..\Tools\DatabaseImport\ProjectItems\VisualC.zip" + DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.DatabaseImport.dll"/> + </Component> </Directory> <Directory Id="Web" Name="Web"> <Directory Id="WebVisualBasic" ShortName="VBasic" Name="VisualBasic"> @@ -966,6 +998,11 @@ <File Id="WebVisualBasic.zip" Name="ORMModel.zip" Source="..\ORMModel\Shell\ProjectItems\Web\VisualBasic.zip" DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.dll"/> </Component> + <Component Id="NORMADBImportProjectItemsVWebDevVBasicComponent" Guid="34C69005-11CA-4F9E-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)" KeyPath="yes"> + <Condition>VWEBDEVPACKAGEGUID OR Installed</Condition> + <File Id="DBImportWebVisualBasic.zip" Name="ORMModelFromDatabase.zip" ShortName="DBImpWVB.zip" Source="..\Tools\DatabaseImport\ProjectItems\Web\VisualBasic.zip" + DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.DatabaseImport.dll"/> + </Component> </Directory> <Directory Id="WebCSharp" Name="CSharp"> <Component Id="NORMAVSProjectItemsVWebDevCSharpComponent" Guid="7E4BA3AB-3831-4520-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)" KeyPath="yes"> @@ -973,6 +1010,11 @@ <File Id="WebCSharp.zip" Name="ORMModel.zip" Source="..\ORMModel\Shell\ProjectItems\Web\CSharp.zip" DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.dll"/> </Component> + <Component Id="NORMADBImportProjectItemsVWebDevCSharpComponent" Guid="46832808-DF7F-43B1-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)" KeyPath="yes"> + <Condition>VWEBDEVPACKAGEGUID OR Installed</Condition> + <File Id="DBImportWebCSharp.zip" Name="ORMModelFromDatabase.zip" ShortName="DBImpWCS.zip" Source="..\Tools\DatabaseImport\ProjectItems\Web\CSharp.zip" + DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.DatabaseImport.dll"/> + </Component> </Directory> <Directory Id="WebJSharp" Name="JSharp"> <Component Id="NORMAVSProjectItemsVWebDevJSharpComponent" Guid="E68504E4-D956-4A87-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)" KeyPath="yes"> @@ -980,6 +1022,11 @@ <File Id="WebJSharp.zip" Name="ORMModel.zip" Source="..\ORMModel\Shell\ProjectItems\Web\JSharp.zip" DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.dll"/> </Component> + <Component Id="NORMADBImportProjectItemsVWebDevJSharpComponent" Guid="4AC8EFAD-DCE3-4509-$(var.VersionGuidSuffix)" DiskId="1" Win64="$(var.Win64)" KeyPath="yes"> + <Condition>VWEBDEVPACKAGEGUID OR Installed</Condition> + <File Id="DBImportWebJSharp.zip" Name="ORMModelFromDatabase.zip" ShortName="DBImpWJS.zip" Source="..\Tools\DatabaseImport\ProjectItems\Web\JSharp.zip" + DefaultLanguage="0" CompanionFile="Neumont.Tools.ORM.DatabaseImport.dll"/> + </Component> </Directory> </Directory> </Directory> Modified: trunk/Setup/Features.wxs =================================================================== --- trunk/Setup/Features.wxs 2007-10-15 06:35:07 UTC (rev 1154) +++ trunk/Setup/Features.wxs 2007-10-15 06:36:31 UTC (rev 1155) @@ -25,6 +25,11 @@ <ComponentGroupRef Id="HelpFeatureComponents"/> </Feature> + <Feature Id="DatabaseImportFeature" Title="!(loc.DatabaseImportFeatureTitle)" Description="!(loc.DatabaseImportFeatureDescription)" + Level="1" TypicalDefault="install" InstallDefault="followParent" AllowAdvertise="no"> + <ComponentGroupRef Id="DatabaseImportFeatureComponents"/> + </Feature> + <Feature Id="GenerationFeature" Title="!(loc.GenerationFeatureTitle)" Description="!(loc.GenerationFeatureDescription)" Level="1" TypicalDefault="install" InstallDefault="followParent" AllowAdvertise="no"> <ComponentGroupRef Id="GenerationFeatureComponents"/> Modified: trunk/Setup/Strings.wxl =================================================================== --- trunk/Setup/Strings.wxl 2007-10-15 06:35:07 UTC (rev 1154) +++ trunk/Setup/Strings.wxl 2007-10-15 06:36:31 UTC (rev 1155) @@ -21,6 +21,8 @@ <String Id="MainFeatureDescription">Neumont ORM Architect for Visual Studio. Includes the Visual Studio Package.</String> <String Id="HelpFeatureTitle">Help</String> <String Id="HelpFeatureDescription">Help</String> + <String Id="DatabaseImportFeatureTitle">DatabaseImport</String> + <String Id="DatabaseImportFeatureDescription">DatabaseImport</String> <String Id="GenerationFeatureTitle">Generation</String> <String Id="GenerationFeatureDescription">Generation</String> <String Id="ClassModelGenerationFeatureTitle">ClassGeneration</String> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-10-15 06:35:04
|
Revision: 1154 http://orm.svn.sourceforge.net/orm/?rev=1154&view=rev Author: mcurland Date: 2007-10-14 23:35:07 -0700 (Sun, 14 Oct 2007) Log Message: ----------- Switch xsl:variable to xsl:param in OIALtoORM.xslt. Fixes error from [1152]. refs #305 Modified Paths: -------------- trunk/BuildReadme.txt trunk/ORMModel/Shell/Converters/OIALtoORM.xslt trunk/README.txt Modified: trunk/BuildReadme.txt =================================================================== --- trunk/BuildReadme.txt 2007-10-15 06:33:06 UTC (rev 1153) +++ trunk/BuildReadme.txt 2007-10-15 06:35:07 UTC (rev 1154) @@ -3,13 +3,13 @@ The batch files perform as follows: 1) Build.bat builds all of the NORMA tools and extension projects. The test build helper, libary, and setup pieces are not built. -2) BuildDevTools.bat builds the (relatively static) NUBuild MSBuild extensions and DSLTools directive processors. CalFled by FirstTimeBuild.bat +2) BuildDevTools.bat builds the (relatively static) NUBuild MSBuild extensions and DSLTools directive processors. Called by FirstTimeBuild.bat 3) FirstTimeBuild.bat should be run the first time the tool is used in a development environment. Does not do test or setup. 4) BuildTests.bat builds testing tools and samples. Requires XML Diff Patch and nunit2.2.9 installation as discussed in README.txt in this directory. -5) BuildSetup.bat builds everything included in setup. Requires install of WIX 3.0 as discussed in the README.txt file. +5) BuildSetup.bat builds everything included in setup. Requires install of WIX 3 as discussed in the README.txt file. 6) BuildAll.bat builds everything except the development tools Modified: trunk/ORMModel/Shell/Converters/OIALtoORM.xslt =================================================================== --- trunk/ORMModel/Shell/Converters/OIALtoORM.xslt 2007-10-15 06:33:06 UTC (rev 1153) +++ trunk/ORMModel/Shell/Converters/OIALtoORM.xslt 2007-10-15 06:35:07 UTC (rev 1154) @@ -19,7 +19,7 @@ xmlns:oil="http://schemas.orm.net/OIAL" extension-element-prefixes="exsl" exclude-result-prefixes="odt oil"> - <xsl:variable name="RequireReadingModification" select="false()"/> + <xsl:param name="RequireReadingModification" select="false()"/> <xsl:output method="xml" encoding="utf-8" media-type="text/xml" indent="no"/> <xsl:template match="oil:model"> <xsl:variable name="dirtyOrmIdsFragment"> Modified: trunk/README.txt =================================================================== --- trunk/README.txt 2007-10-15 06:33:06 UTC (rev 1153) +++ trunk/README.txt 2007-10-15 06:35:07 UTC (rev 1154) @@ -19,7 +19,7 @@ Additional components used by other portions of this software include: Windows Installer XML (WiX) toolset - Homepage: http://wix.sourceforge.net + Homepage: http://wix.sourceforge.net (use version 3) Microsoft XML Diff and Patch 1.0 Homepage: http://apps.gotdotnet.com/xmltools/xmldiff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-10-15 06:33:07
|
Revision: 1153 http://orm.svn.sourceforge.net/orm/?rev=1153&view=rev Author: mcurland Date: 2007-10-14 23:33:06 -0700 (Sun, 14 Oct 2007) Log Message: ----------- Added DatabaseImport to build batch files. refs #305 Added additional build options. refs #337 Modified Paths: -------------- trunk/Main.proj trunk/TestSuites/TestSample/TestSample.csproj trunk/Tools/DatabaseImport/DatabaseImport.csproj Added Paths: ----------- trunk/BuildAll.bat trunk/BuildReadme.txt trunk/FirstTimeBuildAll.bat trunk/Setup/ReadMe.txt Added: trunk/BuildAll.bat =================================================================== --- trunk/BuildAll.bat (rev 0) +++ trunk/BuildAll.bat 2007-10-15 06:33:06 UTC (rev 1153) @@ -0,0 +1,9 @@ +@ECHO OFF +SETLOCAL +SET RootDir=%~dp0. +CALL "%RootDir%\SetupEnvironment.bat" %* + +MSBuild.exe /nologo "%RootDir%\Setup.proj" %* +MSBuild.exe /nologo "%RootDir%\Tests.proj" %* + +GOTO:EOF Added: trunk/BuildReadme.txt =================================================================== --- trunk/BuildReadme.txt (rev 0) +++ trunk/BuildReadme.txt 2007-10-15 06:33:06 UTC (rev 1153) @@ -0,0 +1,20 @@ +The build is broken into several pieces to support multiple Visual Studio targeted versions and parts of the project. + +The batch files perform as follows: +1) Build.bat builds all of the NORMA tools and extension projects. The test build helper, libary, and setup pieces are not built. + +2) BuildDevTools.bat builds the (relatively static) NUBuild MSBuild extensions and DSLTools directive processors. CalFled by FirstTimeBuild.bat + +3) FirstTimeBuild.bat should be run the first time the tool is used in a development environment. Does not do test or setup. + +4) BuildTests.bat builds testing tools and samples. Requires XML Diff Patch and nunit2.2.9 installation as discussed in README.txt in this directory. + +5) BuildSetup.bat builds everything included in setup. Requires install of WIX 3.0 as discussed in the README.txt file. + +6) BuildAll.bat builds everything except the development tools + +7) FirstTimeBuildAll.bat builds everything including the development tools + +To build for an Visual Studio 2008 (Orcas) version: +Before running, set the following environment variable: +set TargetVisualStudioVersion=v9.0 Added: trunk/FirstTimeBuildAll.bat =================================================================== --- trunk/FirstTimeBuildAll.bat (rev 0) +++ trunk/FirstTimeBuildAll.bat 2007-10-15 06:33:06 UTC (rev 1153) @@ -0,0 +1,14 @@ +@ECHO OFF +SETLOCAL +SET RootDir=%~dp0. +CALL "%RootDir%\SetupEnvironment.bat" %* + +CALL "%RootDir%\BuildDevTools.bat" %* +CALL "%RootDir%\BuildSetup.bat" %* +CALL "%RootDir%\BuildTests.bat" %* + +ECHO. +ECHO Running 'devenv.exe /RootSuffix "%VSRegistryRootSuffix%" /Setup'... This may take a few minutes... +"%VSEnvironmentPath%" /RootSuffix "%VSRegistryRootSuffix%" /Setup + +GOTO:EOF Modified: trunk/Main.proj =================================================================== --- trunk/Main.proj 2007-10-15 06:29:06 UTC (rev 1152) +++ trunk/Main.proj 2007-10-15 06:33:06 UTC (rev 1153) @@ -9,6 +9,7 @@ <ProjectReference Include="RelationalModel\Dil.sln"/> <ProjectReference Include="CustomProperties\CustomProperties.sln"/> <ProjectReference Include="Tools\ORMCustomTool\ORMCustomTool.sln"/> + <ProjectReference Include="Tools\DatabaseImport\DatabaseImport.sln"/> </ItemGroup> <Import Project="Default.targets"/> </Project> \ No newline at end of file Added: trunk/Setup/ReadMe.txt =================================================================== --- trunk/Setup/ReadMe.txt (rev 0) +++ trunk/Setup/ReadMe.txt 2007-10-15 06:33:06 UTC (rev 1153) @@ -0,0 +1 @@ +See ..\README.txt for information on the WIX version required to build this project. \ No newline at end of file Modified: trunk/TestSuites/TestSample/TestSample.csproj =================================================================== --- trunk/TestSuites/TestSample/TestSample.csproj 2007-10-15 06:29:06 UTC (rev 1152) +++ trunk/TestSuites/TestSample/TestSample.csproj 2007-10-15 06:33:06 UTC (rev 1153) @@ -11,6 +11,7 @@ <AssemblyName>TestSample</AssemblyName> <SignAssembly>true</SignAssembly> <AssemblyOriginatorKeyFile>..\..\ORMPackage.snk</AssemblyOriginatorKeyFile> + <DisableAllPreprocessing>true</DisableAllPreprocessing> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> Modified: trunk/Tools/DatabaseImport/DatabaseImport.csproj =================================================================== --- trunk/Tools/DatabaseImport/DatabaseImport.csproj 2007-10-15 06:29:06 UTC (rev 1152) +++ trunk/Tools/DatabaseImport/DatabaseImport.csproj 2007-10-15 06:33:06 UTC (rev 1153) @@ -14,6 +14,7 @@ <AssemblyOriginatorKeyFile>..\..\ORMPackage.snk</AssemblyOriginatorKeyFile> <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent> <InstallInGac>true</InstallInGac> + <TrunkDir Condition=" '$(TrunkDir)' == '' ">$(MSBuildProjectDirectory)\..\..</TrunkDir> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -36,18 +37,19 @@ <NoWarn>1607</NoWarn> <UseVSHostingProcess>false</UseVSHostingProcess> </PropertyGroup> + <Import Project="$(MSBuildExtensionsPath)\Neumont\VisualStudio\Neumont.Build.VisualStudio.Multitargeting.targets" /> <ItemGroup> <Reference Include="EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <SpecificVersion>False</SpecificVersion> </Reference> - <Reference Include="Microsoft.VisualStudio.Data, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> + <Reference Include="Microsoft.VisualStudio.Data, Version=$(TargetVisualStudioAssemblyVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Private>False</Private> </Reference> <Reference Include="Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <SpecificVersion>False</SpecificVersion> </Reference> - <Reference Include="Microsoft.VisualStudio.Shell, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <!-- As of Visual Studio 2008 Beta 2, Microsoft.VisualStudio.Shell.9.0 is still versioned as 2.0.0.0. --> + <Reference Include="Microsoft.VisualStudio.Shell$(TargetVisualStudioFrameworkAssemblySuffix), Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> @@ -97,7 +99,7 @@ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Neumont\Neumont.Build.targets" /> <PropertyGroup> - <PostBuildEvent>"$(SolutionDir)Install.bat" "$(OutputPath)"</PostBuildEvent> - <PreBuildEvent>"$(SolutionDir)..\..\VersionGenerator.exe"</PreBuildEvent> + <PreBuildEvent>"$(TrunkDir)\VersionGenerator.exe"</PreBuildEvent> + <PostBuildEvent>"$(MSBuildProjectDirectory)\Install.bat" "$(OutputPath)"</PostBuildEvent> </PropertyGroup> </Project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-10-15 06:14:56
|
Revision: 1150 http://orm.svn.sourceforge.net/orm/?rev=1150&view=rev Author: mcurland Date: 2007-10-14 23:15:00 -0700 (Sun, 14 Oct 2007) Log Message: ----------- Duplicate name errors were not clearing from the model browser. Based all duplicate name error associations on ElementAssociatedWithModelError. Addition to [1037] refs #268 Modified Paths: -------------- trunk/ORMModel/ObjectModel/GeneratedCode/DomainRelationships.cs trunk/ORMModel/ObjectModel/ORMCore.dsl Modified: trunk/ORMModel/ObjectModel/GeneratedCode/DomainRelationships.cs =================================================================== --- trunk/ORMModel/ObjectModel/GeneratedCode/DomainRelationships.cs 2007-10-15 06:13:14 UTC (rev 1149) +++ trunk/ORMModel/ObjectModel/GeneratedCode/DomainRelationships.cs 2007-10-15 06:15:00 UTC (rev 1150) @@ -6026,7 +6026,7 @@ [global::System.CLSCompliant(true)] [DslModeling::DomainRelationship()] [DslModeling::DomainObjectId("bc1031eb-8590-4a14-abbd-f12a18622855")] - public partial class ObjectTypeHasDuplicateNameError : DslModeling::ElementLink + public partial class ObjectTypeHasDuplicateNameError : ElementAssociatedWithModelError { #region Constructors, domain class Id @@ -6131,6 +6131,28 @@ return new DslModeling::LinkedElementCollection<ObjectType>(element, DuplicateNameErrorDomainRoleId); } #endregion + #region AssociatedElement domain role override + + /// <summary> + /// Gets the element playing ObjectType domain role. + /// Description for + /// Neumont.Tools.ORM.ObjectModel.ElementAssociatedWithModelError.AssociatedElement + /// </summary> + public override global::Microsoft.VisualStudio.Modeling.ModelElement AssociatedElement + { + [global::System.Diagnostics.DebuggerStepThrough] + get + { + return this.ObjectType; + } + [global::System.Diagnostics.DebuggerStepThrough] + set + { + this.ObjectType = (ObjectType)value; + } + } + + #endregion #region DuplicateNameError domain role code /// <summary> @@ -6183,6 +6205,28 @@ DslModeling::DomainRoleInfo.SetLinkedElement(element, ObjectTypeDomainRoleId, newDuplicateNameError); } #endregion + #region ModelError domain role override + + /// <summary> + /// Gets the element playing DuplicateNameError domain role. + /// Description for + /// Neumont.Tools.ORM.ObjectModel.ElementAssociatedWithModelError.ModelError + /// </summary> + public override ModelError ModelError + { + [global::System.Diagnostics.DebuggerStepThrough] + get + { + return this.DuplicateNameError; + } + [global::System.Diagnostics.DebuggerStepThrough] + set + { + this.DuplicateNameError = (ObjectTypeDuplicateNameError)value; + } + } + + #endregion #region ObjectType link accessor /// <summary> /// Get the ObjectTypeHasDuplicateNameError link to a ObjectType. @@ -10173,7 +10217,7 @@ [global::System.CLSCompliant(true)] [DslModeling::DomainRelationship()] [DslModeling::DomainObjectId("cb5df90f-3917-4bd1-9807-a24f6d7c52f9")] - public partial class SetConstraintHasDuplicateNameError : DslModeling::ElementLink + public partial class SetConstraintHasDuplicateNameError : ElementAssociatedWithModelError { #region Constructors, domain class Id @@ -10278,6 +10322,28 @@ return new DslModeling::LinkedElementCollection<SetConstraint>(element, DuplicateNameErrorDomainRoleId); } #endregion + #region AssociatedElement domain role override + + /// <summary> + /// Gets the element playing SetConstraint domain role. + /// Description for + /// Neumont.Tools.ORM.ObjectModel.ElementAssociatedWithModelError.AssociatedElement + /// </summary> + public override global::Microsoft.VisualStudio.Modeling.ModelElement AssociatedElement + { + [global::System.Diagnostics.DebuggerStepThrough] + get + { + return this.SetConstraint; + } + [global::System.Diagnostics.DebuggerStepThrough] + set + { + this.SetConstraint = (SetConstraint)value; + } + } + + #endregion #region DuplicateNameError domain role code /// <summary> @@ -10330,6 +10396,28 @@ DslModeling::DomainRoleInfo.SetLinkedElement(element, SetConstraintDomainRoleId, newDuplicateNameError); } #endregion + #region ModelError domain role override + + /// <summary> + /// Gets the element playing DuplicateNameError domain role. + /// Description for + /// Neumont.Tools.ORM.ObjectModel.ElementAssociatedWithModelError.ModelError + /// </summary> + public override ModelError ModelError + { + [global::System.Diagnostics.DebuggerStepThrough] + get + { + return this.DuplicateNameError; + } + [global::System.Diagnostics.DebuggerStepThrough] + set + { + this.DuplicateNameError = (ConstraintDuplicateNameError)value; + } + } + + #endregion #region SetConstraint link accessor /// <summary> /// Get the SetConstraintHasDuplicateNameError link to a SetConstraint. @@ -10414,7 +10502,7 @@ [global::System.CLSCompliant(true)] [DslModeling::DomainRelationship()] [DslModeling::DomainObjectId("cf7af531-f3d3-42e4-a9f7-d44536da9e53")] - public partial class SetComparisonConstraintHasDuplicateNameError : DslModeling::ElementLink + public partial class SetComparisonConstraintHasDuplicateNameError : ElementAssociatedWithModelError { #region Constructors, domain class Id @@ -10519,6 +10607,28 @@ return new DslModeling::LinkedElementCollection<SetComparisonConstraint>(element, DuplicateNameErrorDomainRoleId); } #endregion + #region AssociatedElement domain role override + + /// <summary> + /// Gets the element playing SetComparisonConstraint domain role. + /// Description for + /// Neumont.Tools.ORM.ObjectModel.ElementAssociatedWithModelError.AssociatedElement + /// </summary> + public override global::Microsoft.VisualStudio.Modeling.ModelElement AssociatedElement + { + [global::System.Diagnostics.DebuggerStepThrough] + get + { + return this.SetComparisonConstraint; + } + [global::System.Diagnostics.DebuggerStepThrough] + set + { + this.SetComparisonConstraint = (SetComparisonConstraint)value; + } + } + + #endregion #region DuplicateNameError domain role code /// <summary> @@ -10571,6 +10681,28 @@ DslModeling::DomainRoleInfo.SetLinkedElement(element, SetComparisonConstraintDomainRoleId, newDuplicateNameError); } #endregion + #region ModelError domain role override + + /// <summary> + /// Gets the element playing DuplicateNameError domain role. + /// Description for + /// Neumont.Tools.ORM.ObjectModel.ElementAssociatedWithModelError.ModelError + /// </summary> + public override ModelError ModelError + { + [global::System.Diagnostics.DebuggerStepThrough] + get + { + return this.DuplicateNameError; + } + [global::System.Diagnostics.DebuggerStepThrough] + set + { + this.DuplicateNameError = (ConstraintDuplicateNameError)value; + } + } + + #endregion #region SetComparisonConstraint link accessor /// <summary> /// Get the SetComparisonConstraintHasDuplicateNameError link to a SetComparisonConstraint. Modified: trunk/ORMModel/ObjectModel/ORMCore.dsl =================================================================== --- trunk/ORMModel/ObjectModel/ORMCore.dsl 2007-10-15 06:13:14 UTC (rev 1149) +++ trunk/ORMModel/ObjectModel/ORMCore.dsl 2007-10-15 06:15:00 UTC (rev 1150) @@ -2018,9 +2018,9 @@ </DomainRelationship> <DomainRelationship Name="ObjectTypeHasDuplicateNameError" Namespace="Neumont.Tools.ORM.ObjectModel" Id="BC1031EB-8590-4A14-ABBD-F12A18622855"> - <!--<BaseRelationship> - <DomainRelationshipMoniker Name="ORMElementLink"/> - </BaseRelationship>--> + <BaseRelationship> + <DomainRelationshipMoniker Name="ElementAssociatedWithModelError"/> + </BaseRelationship> <Source> <DomainRole Name="ObjectType" PropertyName="DuplicateNameError" Multiplicity="ZeroOne" PropagatesDelete="false" IsPropertyGenerator="true" DisplayName="ObjectType" Id="A2252380-7CAC-4D36-8857-2426AE558C08"> <RolePlayer> @@ -2338,9 +2338,9 @@ </DomainRelationship> <DomainRelationship Name="SetConstraintHasDuplicateNameError" Namespace="Neumont.Tools.ORM.ObjectModel" Id="CB5DF90F-3917-4BD1-9807-A24F6D7C52F9"> - <!--<BaseRelationship> - <DomainRelationshipMoniker Name="ORMElementLink"/> - </BaseRelationship>--> + <BaseRelationship> + <DomainRelationshipMoniker Name="ElementAssociatedWithModelError"/> + </BaseRelationship> <Source> <DomainRole Name="SetConstraint" PropertyName="DuplicateNameError" Multiplicity="ZeroOne" PropagatesDelete="false" IsPropertyGenerator="true" DisplayName="SetConstraint" Id="B4623963-690D-4687-A95E-0FC998AA59EC"> <RolePlayer> @@ -2358,9 +2358,9 @@ </DomainRelationship> <DomainRelationship Name="SetComparisonConstraintHasDuplicateNameError" Namespace="Neumont.Tools.ORM.ObjectModel" Id="CF7AF531-F3D3-42E4-A9F7-D44536DA9E53"> - <!--<BaseRelationship> - <DomainRelationshipMoniker Name="ORMElementLink"/> - </BaseRelationship>--> + <BaseRelationship> + <DomainRelationshipMoniker Name="ElementAssociatedWithModelError"/> + </BaseRelationship> <Source> <DomainRole Name="SetComparisonConstraint" PropertyName="DuplicateNameError" Multiplicity="ZeroOne" PropagatesDelete="false" IsPropertyGenerator="true" DisplayName="SetComparisonConstraint" Id="86A9CB44-0050-4E7C-9DF5-692F980F96EC"> <RolePlayer> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-10-15 06:13:13
|
Revision: 1149 http://orm.svn.sourceforge.net/orm/?rev=1149&view=rev Author: mcurland Date: 2007-10-14 23:13:14 -0700 (Sun, 14 Oct 2007) Log Message: ----------- Missed change from [1148]. refs #278 refs #337 Modified Paths: -------------- trunk/FirstTimeBuild.bat Modified: trunk/FirstTimeBuild.bat =================================================================== --- trunk/FirstTimeBuild.bat 2007-10-15 06:11:12 UTC (rev 1148) +++ trunk/FirstTimeBuild.bat 2007-10-15 06:13:14 UTC (rev 1149) @@ -3,8 +3,8 @@ SET RootDir=%~dp0. CALL "%RootDir%\SetupEnvironment.bat" %* -MSBuild.exe /nologo "%RootDir%\DevTools.proj" %* -MSBuild.exe /nologo "%RootDir%\Main.proj" %* +CALL "%RootDir%\BuildDevTools.bat" %* +CALL "%RootDir%\Build.bat" %* ECHO. ECHO Running 'devenv.exe /RootSuffix "%VSRegistryRootSuffix%" /Setup'... This may take a few minutes... This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mcu...@us...> - 2007-10-15 05:29:37
|
Revision: 1146 http://orm.svn.sourceforge.net/orm/?rev=1146&view=rev Author: mcurland Date: 2007-10-14 22:29:28 -0700 (Sun, 14 Oct 2007) Log Message: ----------- Fixed null reference exception in NameGeneration.cs. refs #338 Modified Paths: -------------- trunk/RelationalModel/OialDcilBridge/NameGeneration.cs Modified: trunk/RelationalModel/OialDcilBridge/NameGeneration.cs =================================================================== --- trunk/RelationalModel/OialDcilBridge/NameGeneration.cs 2007-10-15 05:27:49 UTC (rev 1145) +++ trunk/RelationalModel/OialDcilBridge/NameGeneration.cs 2007-10-15 05:29:28 UTC (rev 1146) @@ -514,7 +514,7 @@ { //get the nested fact type and its towards role as they should provide more logical names mainFactType = objectification.NestedFactType; - oppositeRole = (towardsRole.OppositeRoleAlwaysResolveProxy as RoleProxy).TargetRole; + oppositeRole = towardsRole.OppositeRoleAlwaysResolveProxy.Role; towardsRole = oppositeRole.Role.OppositeRoleResolveProxy; //used for second-level name precision later on, if needed createRoleNameSecond = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |