jedidotnet-commits Mailing List for JEDI.NET (Page 10)
Status: Pre-Alpha
Brought to you by:
jedi_mbe
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(81) |
Jul
(7) |
Aug
(8) |
Sep
(2) |
Oct
|
Nov
(47) |
Dec
(30) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(32) |
Feb
|
Mar
(86) |
Apr
|
May
(1) |
Jun
(24) |
Jul
(4) |
Aug
(5) |
Sep
(4) |
Oct
|
Nov
|
Dec
(9) |
From: Marcel B. <jed...@us...> - 2004-11-26 10:04:24
|
Update of /cvsroot/jedidotnet/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7595/docs Added Files: Jedi.Class Reference.ndoc Log Message: NDOC project to build the class reference --- NEW FILE: Jedi.Class Reference.ndoc --- <project SchemaVersion="1.3"> <assemblies> <assembly location="..\main\bin\Jedi.Core.dll" documentation="..\main\bin\Jedi.Core.xml" /> <assembly location="..\main\bin\Jedi.Graphics.dll" documentation="..\main\bin\Jedi.Graphics.xml" /> <assembly location="..\main\bin\Jedi.Text.dll" documentation="..\main\bin\Jedi.Text.xml" /> </assemblies> <referencePaths> <referencePath path="..\main\bin\" /> <referencePath path="..\..\..\..\Program Files\Common Files\Borland Shared\BDS\Shared Assemblies\2.0\**" /> </referencePaths> <documenters> <documenter name="JavaDoc"> <property name="Title" value="NDoc" /> <property name="OutputDirectory" value=".\NDoc.Core\JavaDoc\" /> </documenter> <documenter name="LaTeX"> <property name="OutputDirectory" value=".\doc\" /> <property name="TextFileFullName" value="Documentation.tex" /> <property name="TexFileBaseName" value="Documentation" /> <property name="LatexCompiler" value="latex" /> <property name="TexFileFullPath" value=".\doc\Documentation.tex" /> </documenter> <documenter name="LinearHtml"> <property name="OutputDirectory" value=".\doc\" /> <property name="Title" value="An NDoc Documented Class Library" /> </documenter> <documenter name="MSDN"> <property name="OutputDirectory" value="F:\Programming\JEDI\JediDotNet\main\help\" /> <property name="HtmlHelpName" value="Jedi.Core" /> <property name="Title" value="JEDI.NET Core documentation" /> <property name="IncludeFavorites" value="True" /> <property name="RootPageContainsNamespaces" value="True" /> <property name="ShowMissingSummaries" value="True" /> <property name="ShowMissingRemarks" value="True" /> <property name="ShowMissingParams" value="True" /> <property name="ShowMissingReturns" value="True" /> <property name="ShowMissingValues" value="True" /> <property name="AssemblyVersionInfo" value="AssemblyVersion" /> <property name="UseNamespaceDocSummaries" value="True" /> <property name="AutoDocumentConstructors" value="False" /> <property name="Preliminary" value="True" /> <property name="DocumentAttributes" value="True" /> </documenter> <documenter name="VS.NET 2003"> <property name="OutputDirectory" value="F:\Programming\JEDI\JediDotNet\main\help\" /> <property name="HtmlHelpName" value="jdn" /> <property name="Title" value="JEDI.NET Documentation" /> <property name="RegisterTitleWithNamespace" value="True" /> <property name="CollectionNamespace" value="jdn" /> <property name="RegisterTitleAsCollection" value="True" /> <property name="ShowMissingSummaries" value="True" /> <property name="ShowMissingParams" value="True" /> <property name="ShowMissingReturns" value="True" /> <property name="ShowMissingValues" value="True" /> <property name="UseNamespaceDocSummaries" value="True" /> <property name="Preliminary" value="True" /> <property name="DocumentAttributes" value="True" /> </documenter> <documenter name="XML"> <property name="OutputFile" value=".\doc\doc.xml" /> </documenter> </documenters> </project> |
From: Marcel B. <jed...@us...> - 2004-11-26 10:02:34
|
Update of /cvsroot/jedidotnet/tools/docs/ndoc patch In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7169/ndoc patch Log Message: Directory /cvsroot/jedidotnet/tools/docs/ndoc patch added to the repository |
From: Marcel B. <jed...@us...> - 2004-11-26 10:00:12
|
Update of /cvsroot/jedidotnet/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6502/docs Modified Files: Jedi.Collections.xml Jedi.Drawing.xml Jedi.System.xml Added Files: Jedi.IO.xml Jedi.Strings.xml Log Message: * Regenerated skeletons * Updated documentation Index: Jedi.System.xml =================================================================== RCS file: /cvsroot/jedidotnet/docs/Jedi.System.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Jedi.System.xml 25 Jun 2004 13:11:32 -0000 1.4 --- Jedi.System.xml 26 Nov 2004 09:59:58 -0000 1.5 *************** *** 1,11 **** <?xml version="1.0" encoding="utf-8"?> <doc> ! <!--most recent auto update: 2004-06-25 13:01 UTC--> <assembly> <name>Jedi.Core</name> </assembly> <members> ! <member name="T:Jedi.System.NamespaceDoc"> ! <summary>The <b>Jedi.System</b> namespace provides common services used throughout the JEDI library.</summary> </member> <member name="T:Jedi.System.AttributeCombineOperation"> --- 1,11 ---- <?xml version="1.0" encoding="utf-8"?> <doc> ! <!--most recent auto update: 2004-11-25 21:14 UTC--> <assembly> <name>Jedi.Core</name> </assembly> <members> ! <member name="T:Jedi.System.NamespaceDoc"> ! <summary>The <b>Jedi.System</b> namespace provides common services used throughout the JEDI>NET library.</summary> </member> <member name="T:Jedi.System.AttributeCombineOperation"> *************** *** 38,41 **** --- 38,44 ---- <summary>Provides methods to work with or manipulate arrays or collections of attributes.</summary> </member> + <member name="M:Jedi.System.AttributeUtils.#ctor"> + <exclude /> + </member> <member name="M:Jedi.System.AttributeUtils.CombineAttributes(System.Attribute[],System.Attribute[])"> <overloads> *************** *** 187,190 **** --- 190,267 ---- </returns> </member> + <member name="M:Jedi.System.AttributeUtils.GetAttribute(System.Attribute[],System.Attribute)"> + <overloads> + Retrieves an attribute. + </overloads> + <summary> + Retrieves an attribute from the specified Attribute array that is equal to the specified attribute instance. + </summary> + <param name="attributes"> + The attribute array to search. + </param> + <param name="attr"> + An attribute instance to locate. + </param> + <returns> + <para> + An Attribute instance from the Attribute array that is equal to the instance in the <paramref name="attr" /> + parameter or <see langword="null" /> if such an attribute does not exist in the array. + </para> + </returns> + </member> + <member name="M:Jedi.System.AttributeUtils.GetAttribute(System.Attribute[],System.Type)"> + <summary> + Retrieves an attribute from the specified Attribute array that is of the specified attribute type. + </summary> + <param name="attributes"> + The attribute array to search. + </param> + <param name="attrType"> + An attribute type to locate. + </param> + <returns> + <para> + An Attribute instance from the Attribute array that is of the exact same type as the specified type in the + <paramref name="attrType" /> parameter or <see langword="null" /> if such an attribute does not exist in the + array. + </para> + </returns> + </member> + <member name="M:Jedi.System.AttributeUtils.GetAttribute(System.ComponentModel.AttributeCollection,System.Attribute)"> + <summary> + Retrieves an attribute from the specified AttributeCollection that is equal to the specified attribute instance. + </summary> + <param name="attributes"> + The attribute collection to search. + </param> + <param name="attr"> + An attribute instance to locate. + </param> + <returns> + <para> + An Attribute instance from the AttributeCollection that is equal to the instance in the + <paramref name="attr" /> parameter or <see langword="null" /> if such an attribute does not exist in the + collection. + </para> + </returns> + </member> + <member name="M:Jedi.System.AttributeUtils.GetAttribute(System.ComponentModel.AttributeCollection,System.Type)"> + <summary> + Retrieves an attribute from the specified AttributeCollection that is of the specified attribute type. + </summary> + <param name="attributes"> + The attribute collection to search. + </param> + <param name="attrType"> + An attribute type to locate. + </param> + <returns> + <para> + An Attribute instance from the AttributeCollection that is of the exact same type as the specified type in the + <paramref name="attrType" /> parameter or <see langword="null" /> if such an attribute does not exist in the + collection. + </para> + </returns> + </member> <member name="M:Jedi.System.AttributeUtils.IndexOf(System.Collections.ArrayList,System.Object)"> <summary>Locates an attribute by instance or by type.</summary> *************** *** 198,201 **** --- 275,304 ---- </returns> </member> + <member name="M:Jedi.System.AttributeUtils.ToArrayList(System.Attribute[])"> + <overloads> + Converts the specified Attribute array or AttributeCollection into an ArrayList. + </overloads> + <summary> + Converts the specified Attribute array into an ArrayList. + </summary> + <param name="attrs"> + Attribute array to convert into an ArrayList. + </param> + <returns> + An ArrayList containing the same elements as in the array specified by the <paramref name="attrs" /> parameter. + </returns> + </member> + <member name="M:Jedi.System.AttributeUtils.ToArrayList(System.ComponentModel.AttributeCollection)"> + <summary> + Converts the specified AttributeCollection into an ArrayList. + </summary> + <param name="attrs"> + AttributeCollection to convert into an ArrayList. + </param> + <returns> + An ArrayList containing the same elements as in the collection specified by the <paramref name="attrs" /> + parameter. + </returns> + </member> </members> </doc> \ No newline at end of file Index: Jedi.Drawing.xml =================================================================== RCS file: /cvsroot/jedidotnet/docs/Jedi.Drawing.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jedi.Drawing.xml 24 Jun 2004 17:18:16 -0000 1.2 --- Jedi.Drawing.xml 26 Nov 2004 09:59:58 -0000 1.3 *************** *** 1,54 **** <?xml version="1.0" encoding="utf-8"?> <doc> ! <!--most recent auto update: 2004-06-24 16:54 UTC--> <assembly> ! <name>Jedi.Drawing</name> </assembly> <members> <member name="T:Jedi.Drawing.NamespaceDoc"> <summary> ! </summary> ! <remarks> ! </remarks> </member> <member name="T:Jedi.Drawing.ColorUtils"> <summary> </summary> </member> <member name="M:Jedi.Drawing.ColorUtils.#ctor"> ! <summary> ! </summary> </member> <member name="M:Jedi.Drawing.ColorUtils.Blend(System.Drawing.Color,System.Drawing.Color,System.Int32)"> <summary> ! </summary> <param name="firstColor"> ! </param> <param name="secondColor"> ! </param> <param name="percentage"> ! </param> <returns> ! </returns> </member> <member name="M:Jedi.Drawing.ColorUtils.Brighten(System.Drawing.Color,System.Int32)"> <summary> ! </summary> <param name="baseColor"> ! </param> <param name="percentage"> ! </param> <returns> ! </returns> </member> <member name="M:Jedi.Drawing.ColorUtils.Darken(System.Drawing.Color,System.Int32)"> <summary> ! </summary> <param name="baseColor"> ! </param> <param name="percentage"> ! </param> <returns> ! </returns> </member> </members> --- 1,105 ---- <?xml version="1.0" encoding="utf-8"?> <doc> ! <!--most recent auto update: 2004-11-25 21:14 UTC--> <assembly> ! <name>Jedi.Graphics</name> </assembly> <members> <member name="T:Jedi.Drawing.NamespaceDoc"> <summary> ! The <b>Jedi.Drawing</b> namespace extends the System.Drawing namespace and provides various utility classes ! to perform specific tasks on System.Drawing classes. ! </summary> </member> <member name="T:Jedi.Drawing.ColorUtils"> <summary> + Provides additional processing related to the Color type. </summary> </member> <member name="M:Jedi.Drawing.ColorUtils.#ctor"> ! <exclude /> </member> <member name="M:Jedi.Drawing.ColorUtils.Blend(System.Drawing.Color,System.Drawing.Color,System.Int32)"> <summary> ! Blends two colors. ! </summary> <param name="firstColor"> ! First color to use in the blending process. ! </param> <param name="secondColor"> ! Second color to use in the blending process. ! </param> <param name="percentage"> ! The percentage of the color in the <paramref name="secondColor" /> parameter to mix in with the color in the ! <paramref name="firstColor" />. ! </param> <returns> ! A Color instance that is a mixture of the two specified colors. ! </returns> ! <remarks> ! <para> ! The method will use the difference between two colors, take the specified percentage of it and add it to the ! first color. This will be done for each of the <b>Red</b>, <b>Green</b> and <b>Blue</b> components separately. ! </para> ! </remarks> </member> <member name="M:Jedi.Drawing.ColorUtils.Brighten(System.Drawing.Color,System.Int32)"> <summary> ! Brightens a color. ! </summary> <param name="baseColor"> ! Color to brighten. ! </param> <param name="percentage"> ! Percentage to brighten the color with. ! </param> <returns> ! A Color instance that is a brighter version of the color specified by the <paramref name="baseColor" /> ! parameter. ! </returns> ! <remarks> ! <para> ! The brightening is accomplished by blending the color specified by the <paramref name="baseColor" /> ! parameter with Color.White, using the percentage specified by the <paramref name="percentage" /> parameter. ! </para> ! <para> ! The following code: ! <code> ! ColorUtils.Brighten(myColor, myPercentage) ! </code> ! can be rewritten as: ! <code> ! ColorUtils.Blend(myColor, Color.White, myPercentage) ! </code></para> ! </remarks> </member> <member name="M:Jedi.Drawing.ColorUtils.Darken(System.Drawing.Color,System.Int32)"> <summary> ! Darkens a color. ! </summary> <param name="baseColor"> ! Color to darken. ! </param> <param name="percentage"> ! Percentage to darken the color with. ! </param> <returns> ! A Color instance that is a darker version of the color specified by the <paramref name="baseColor" /> parameter. ! </returns> ! <remarks> ! <para> ! The darkening is accomplished by blending the color specified by the <paramref name="baseColor" /> ! parameter with Color.Black, using the percentage specified by the <paramref name="percentage" /> parameter. ! </para> ! <para> ! The following code: ! <code> ! ColorUtils.Darken(myColor, myPercentage) ! </code> ! can be rewritten as: ! <code> ! ColorUtils.Blend(Color.Black, myColor, myPercentage) ! </code></para> ! </remarks> </member> </members> Index: Jedi.Collections.xml =================================================================== RCS file: /cvsroot/jedidotnet/docs/Jedi.Collections.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Jedi.Collections.xml 25 Jun 2004 13:11:32 -0000 1.4 --- Jedi.Collections.xml 26 Nov 2004 09:59:58 -0000 1.5 *************** *** 1,5 **** <?xml version="1.0" encoding="utf-8"?> <doc> ! <!--most recent auto update: 2004-06-25 13:01 UTC--> <assembly> <name>Jedi.Core</name> --- 1,5 ---- <?xml version="1.0" encoding="utf-8"?> <doc> ! <!--most recent auto update: 2004-11-25 20:43 UTC--> <assembly> <name>Jedi.Core</name> *************** *** 334,338 **** </returns> </member> ! <member name="M:Jedi.Collections.InlineCollectionUtils.CreateItemProperty(System.Type,System.Attribute[],System.Object,System.String,System.String,System.Object,System.Object)"> <summary> </summary> --- 334,338 ---- </returns> </member> ! <member name="M:Jedi.Collections.InlineCollectionUtils.CreateItemProperty(System.Type,System.Attribute[],System.Object,System.String,System.String,System.Object,System.Object,System.Boolean)"> <summary> </summary> *************** *** 351,354 **** --- 351,356 ---- <param name="emptyValue"> </param> + <param name="ignoreDefaultProperty"> + </param> <returns> </returns> *************** *** 476,479 **** --- 478,571 ---- </returns> </member> + <member name="T:Jedi.Collections.ItemPropertyDescriptor.@MetaItemPropertyDescriptor"> + <summary> + </summary> + </member> + <member name="M:Jedi.Collections.ItemPropertyDescriptor+@MetaItemPropertyDescriptor.#ctor"> + <summary> + </summary> + </member> + <member name="M:Jedi.Collections.ItemPropertyDescriptor+@MetaItemPropertyDescriptor.@Create(System.Type,System.String,System.Type,System.Attribute[],System.Object,System.Object)"> + <summary> + </summary> + <param name="MetaItemPropertyDescriptor.@Create(System.Type,System.String,System.Type,System.Attribute[],System.Object,System.Object)@00componentType"> + </param> + <param name="MetaItemPropertyDescriptor.@Create(System.Type,System.String,System.Type,System.Attribute[],System.Object,System.Object)@01name"> + </param> + <param name="MetaItemPropertyDescriptor.@Create(System.Type,System.String,System.Type,System.Attribute[],System.Object,System.Object)@02propertyType"> + </param> + <param name="MetaItemPropertyDescriptor.@Create(System.Type,System.String,System.Type,System.Attribute[],System.Object,System.Object)@03attributes"> + </param> + <param name="MetaItemPropertyDescriptor.@Create(System.Type,System.String,System.Type,System.Attribute[],System.Object,System.Object)@04emptyValue"> + </param> + <param name="MetaItemPropertyDescriptor.@Create(System.Type,System.String,System.Type,System.Attribute[],System.Object,System.Object)@05index"> + </param> + <returns> + </returns> + </member> + <member name="F:Jedi.Collections.ItemPropertyDescriptor+@MetaItemPropertyDescriptor.@Instance"> + <summary> + </summary> + </member> + <member name="T:Jedi.Collections.ItemSubPropertyDescriptor.@MetaItemSubPropertyDescriptor"> + <summary> + </summary> + </member> + <member name="M:Jedi.Collections.ItemSubPropertyDescriptor+@MetaItemSubPropertyDescriptor.#ctor"> + <summary> + </summary> + </member> + <member name="M:Jedi.Collections.ItemSubPropertyDescriptor+@MetaItemSubPropertyDescriptor.@Create(System.Type,System.String,System.String,System.ComponentModel.PropertyDescriptor,System.Type,System.Object,System.Object)"> + <summary> + </summary> + <param name="MetaItemSubPropertyDescriptor.@Create(System.Type,System.String,System.String,System.ComponentModel.PropertyDescriptor,System.Type,System.Object,System.Object)@00componentType"> + </param> + <param name="MetaItemSubPropertyDescriptor.@Create(System.Type,System.String,System.String,System.ComponentModel.PropertyDescriptor,System.Type,System.Object,System.Object)@01name"> + </param> + <param name="MetaItemSubPropertyDescriptor.@Create(System.Type,System.String,System.String,System.ComponentModel.PropertyDescriptor,System.Type,System.Object,System.Object)@02description"> + </param> + <param name="MetaItemSubPropertyDescriptor.@Create(System.Type,System.String,System.String,System.ComponentModel.PropertyDescriptor,System.Type,System.Object,System.Object)@03property"> + </param> + <param name="MetaItemSubPropertyDescriptor.@Create(System.Type,System.String,System.String,System.ComponentModel.PropertyDescriptor,System.Type,System.Object,System.Object)@04itemType"> + </param> + <param name="MetaItemSubPropertyDescriptor.@Create(System.Type,System.String,System.String,System.ComponentModel.PropertyDescriptor,System.Type,System.Object,System.Object)@05emptyValue"> + </param> + <param name="MetaItemSubPropertyDescriptor.@Create(System.Type,System.String,System.String,System.ComponentModel.PropertyDescriptor,System.Type,System.Object,System.Object)@06index"> + </param> + <returns> + </returns> + </member> + <member name="F:Jedi.Collections.ItemSubPropertyDescriptor+@MetaItemSubPropertyDescriptor.@Instance"> + <summary> + </summary> + </member> + <member name="T:Jedi.Collections.NewItemPropertyDescriptor.@MetaNewItemPropertyDescriptor"> + <summary> + </summary> + </member> + <member name="M:Jedi.Collections.NewItemPropertyDescriptor+@MetaNewItemPropertyDescriptor.#ctor"> + <summary> + </summary> + </member> + <member name="M:Jedi.Collections.NewItemPropertyDescriptor+@MetaNewItemPropertyDescriptor.@Create(System.Type,System.String,System.Type,System.Attribute[],System.Object)"> + <summary> + </summary> + <param name="MetaNewItemPropertyDescriptor.@Create(System.Type,System.String,System.Type,System.Attribute[],System.Object)@0componentType"> + </param> + <param name="MetaNewItemPropertyDescriptor.@Create(System.Type,System.String,System.Type,System.Attribute[],System.Object)@1name"> + </param> + <param name="MetaNewItemPropertyDescriptor.@Create(System.Type,System.String,System.Type,System.Attribute[],System.Object)@2propertyType"> + </param> + <param name="MetaNewItemPropertyDescriptor.@Create(System.Type,System.String,System.Type,System.Attribute[],System.Object)@3attributes"> + </param> + <param name="MetaNewItemPropertyDescriptor.@Create(System.Type,System.String,System.Type,System.Attribute[],System.Object)@4propertyId"> + </param> + <returns> + </returns> + </member> + <member name="F:Jedi.Collections.NewItemPropertyDescriptor+@MetaNewItemPropertyDescriptor.@Instance"> + <summary> + </summary> + </member> </members> </doc> \ No newline at end of file --- NEW FILE: Jedi.IO.xml --- <?xml version="1.0" encoding="utf-8"?> <doc> <!--most recent auto update: 2004-11-25 20:27 UTC--> <assembly> <name>Jedi.Persistence</name> </assembly> <members> <member name="T:Jedi.IO.NamespaceDoc"> <summary> </summary> <remarks> </remarks> </member> <member name="T:Jedi.IO.Path"> <summary> </summary> </member> <member name="M:Jedi.IO.Path.#ctor"> <summary> </summary> </member> <member name="M:Jedi.IO.Path.Combine(System.String,System.String)"> <summary> </summary> <param name="path1"> </param> <param name="path2"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.Combine(System.String,System.String,Jedi.IO.Path+PathConfig)"> <summary> </summary> <param name="path1"> </param> <param name="path2"> </param> <param name="config"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.Combine(System.String[])"> <summary> </summary> <param name="paths"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.Combine(System.String[],Jedi.IO.Path+PathConfig)"> <summary> </summary> <param name="paths"> </param> <param name="config"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.EnsureEndingDirectorySeparator(System.String)"> <summary> </summary> <param name="path"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.EnsureEndingDirectorySeparator(System.String,Jedi.IO.Path+PathConfig)"> <summary> </summary> <param name="path"> </param> <param name="config"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.IsPathRooted(System.String)"> <summary> </summary> <param name="path"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.IsPathRooted(System.String,Jedi.IO.Path+PathConfig)"> <summary> </summary> <param name="path"> </param> <param name="config"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.IsValid(System.String)"> <summary> </summary> <param name="path"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.IsValid(System.String,Jedi.IO.Path+PathConfig)"> <summary> </summary> <param name="path"> </param> <param name="config"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.IsValid(System.String,System.Boolean)"> <summary> </summary> <param name="path"> </param> <param name="allowWildcards"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.IsValid(System.String,System.Boolean,Jedi.IO.Path+PathConfig)"> <summary> </summary> <param name="path"> </param> <param name="allowWildcards"> </param> <param name="config"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.IsVolumePath(System.String)"> <summary> </summary> <param name="path"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.IsVolumePath(System.String,Jedi.IO.Path+PathConfig)"> <summary> </summary> <param name="path"> </param> <param name="config"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.Normalize(System.String)"> <summary> </summary> <param name="path"> </param> <returns> </returns> </member> <member name="M:Jedi.IO.Path.Normalize(System.String,Jedi.IO.Path+PathConfig)"> <summary> </summary> <param name="path"> </param> <param name="config"> </param> <returns> </returns> </member> <member name="T:Jedi.IO.Path.PathConfig"> <summary> </summary> </member> <member name="F:Jedi.IO.Path.SysConfig"> <summary> </summary> </member> <member name="M:Jedi.IO.Path.SystemConfig"> <summary> </summary> <returns> </returns> </member> <member name="M:Jedi.IO.Path+PathConfig.#ctor"> <summary> </summary> </member> <member name="M:Jedi.IO.Path+PathConfig.#ctor(System.Char,System.Char,System.Char,System.Char[])"> <summary> </summary> <param name="directorySeparator"> </param> <param name="altDirectorySeparator"> </param> <param name="volumeSeparator"> </param> <param name="invalidPathChars"> </param> </member> <member name="M:Jedi.IO.Path+PathConfig.AltDirectorySeparator"> <summary> </summary> <returns> </returns> </member> <member name="M:Jedi.IO.Path+PathConfig.DirectorySeparator"> <summary> </summary> <returns> </returns> </member> <member name="M:Jedi.IO.Path+PathConfig.InvalidPathChars"> <summary> </summary> <returns> </returns> </member> <member name="M:Jedi.IO.Path+PathConfig.VolumeSeparator"> <summary> </summary> <returns> </returns> </member> <member name="T:Jedi.IO.PathException"> <summary> </summary> </member> <member name="M:Jedi.IO.PathException.#ctor"> <summary> </summary> </member> <member name="M:Jedi.IO.PathException.#ctor(System.String)"> <summary> </summary> <param name="message"> </param> </member> <member name="M:Jedi.IO.PathException.#ctor(System.String,System.Exception)"> <summary> </summary> <param name="message"> </param> <param name="innerException"> </param> </member> </members> </doc> --- NEW FILE: Jedi.Strings.xml --- <?xml version="1.0" encoding="utf-8"?> <doc> <!--most recent auto update: 2004-11-25 21:14 UTC--> <assembly> <name>Jedi.Text</name> </assembly> <members> <member name="T:Jedi.Strings.NamespaceDoc"> <summary> The <b>Jedi.Strings</b> namespace provides classes that perform tasks on strings. </summary> </member> <member name="T:Jedi.Strings.ExtractQuotedStringFlags"> <summary> Flags used in one of the ExtractQuotedString overloaded methods to specify the behavior. </summary> </member> <member name="F:Jedi.Strings.ExtractQuotedStringFlags.Default"> <summary> No exception will be thrown if the ending quote character is not specified, nor if there is additional text after the end quote. </summary> </member> <member name="F:Jedi.Strings.ExtractQuotedStringFlags.EndQuoteMandetory"> <summary> An exception will be thrown if the ending quote character is not specified. </summary> </member> <member name="F:Jedi.Strings.ExtractQuotedStringFlags.IgnoreGarbage"> <summary> An exception will be thrown if the there is additional text after the end quote. </summary> </member> <member name="T:Jedi.Strings.StringUtils"> <summary> Utility class containing <cref langword="static" /> methods that can perform manipulations on a string. </summary> </member> <member name="M:Jedi.Strings.StringUtils.#ctor"> <exclude /> </member> <member name="M:Jedi.Strings.StringUtils.After(System.String,System.Char)"> <summary> Returns the part of a string following a delimiter character. </summary> <param name="s"> Input string. </param> <param name="delimiter"> Character that acts as a delimiter. </param> <returns> <para> A <see cref="T:System.String" /> containing everything of the string in the <paramref name="s" /> parameter after the first occurance of the character specified in the <paramref name="delimiter" /> parameter. </para> <para> -or- </para> <para> An <see cref="M:System.String.Empty">Empty</see> string if that character was not found. </para> </returns> </member> <member name="M:Jedi.Strings.StringUtils.AfterAnyOf(System.String,System.Char[])"> <summary> Returns the part of a string following a delimiter character. </summary> <param name="s"> Input string. </param> <param name="delimiters"> Array of characters that act as delimiters. </param> <returns> <para> A <see cref="T:System.String" /> containing everything of the string in the <paramref name="s" /> parameter after the first occurance of any of the characters specified in the <paramref name="delimiters" /> parameter. </para> <para> -or- </para> <para> An <see cref="M:System.String.Empty">Empty</see> string if none of those character was found. </para> </returns> </member> <member name="M:Jedi.Strings.StringUtils.AfterLast(System.String,System.Char)"> <summary> Returns the part of a string following a delimiter character. </summary> <param name="s"> Input string. </param> <param name="delimiter"> Character that acts as a delimiter. </param> <returns> <para> A <see cref="T:System.String" /> containing everything of the string in the <paramref name="s" /> parameter after the last occurance of the character specified in the <paramref name="delimiter" /> parameter. </para> <para> -or- </para> <para> An <see cref="M:System.String.Empty">Empty</see> string if that character was not found. </para> </returns> </member> <member name="M:Jedi.Strings.StringUtils.AfterLastAnyOf(System.String,System.Char[])"> <summary> Returns the part of a string following a delimiter character. </summary> <param name="s"> Input string. </param> <param name="delimiters"> Array of characters that act as delimiters. </param> <returns> <para> A <see cref="T:System.String" /> containing everything of the string in the <paramref name="s" /> parameter after the last occurance of any of the characters specified in the <paramref name="delimiters" /> parameter. </para> <para> -or- </para> <para> An <see cref="M:System.String.Empty">Empty</see> string if none of those character was found. </para> </returns> </member> <member name="M:Jedi.Strings.StringUtils.Before(System.String,System.Char)"> <summary> Returns the part of a string preceeding a delimiter character. </summary> <param name="s"> Input string. </param> <param name="delimiter"> Character that acts as a delimiter. </param> <returns> <para> A <see cref="T:System.String" /> containing everything of the string in the <paramref name="s" /> parameter before the first occurance of the character specified in the <paramref name="delimiter" /> parameter. </para> <para> -or- </para> <para> A <see cref="T:System.String" /> equivalent to the one specified by the <paramref name="s" /> parameter if that character was not found. </para> </returns> </member> <member name="M:Jedi.Strings.StringUtils.BeforeAnyOf(System.String,System.Char[])"> <summary> Returns the part of a string preceeding a delimiter character. </summary> <param name="s"> Input string. </param> <param name="delimiters"> Array of characters that act as delimiters. </param> <returns> <para> A <see cref="T:System.String" /> containing everything of the string in the <paramref name="s" /> parameter before the first occurance of any of the characters specified in the <paramref name="delimiters" /> parameter. </para> <para> -or- </para> <para> A <see cref="T:System.String" /> equivalent to the one specified by the <paramref name="s" /> parameter if none of those characters was found. </para> </returns> </member> <member name="M:Jedi.Strings.StringUtils.BeforeLast(System.String,System.Char)"> <summary> Returns the part of a string preceeding a delimiter character. </summary> <param name="s"> Input string. </param> <param name="delimiter"> Character that acts as a delimiter. </param> <returns> <para> A <see cref="T:System.String" /> containing everything of the string in the <paramref name="s" /> parameter before the last occurance of the character specified in the <paramref name="delimiter" /> parameter. </para> <para> -or- </para> <para> A <see cref="T:System.String" /> equivalent to the one specified by the <paramref name="s" /> parameter if that character was not found. </para> </returns> </member> <member name="M:Jedi.Strings.StringUtils.BeforeLastAnyOf(System.String,System.Char[])"> <summary> Returns the part of a string preceeding a delimiter character. </summary> <param name="s"> Input string. </param> <param name="delimiters"> Array of characters that act as delimiters. </param> <returns> <para> A <see cref="T:System.String" /> containing everything of the string in the <paramref name="s" /> parameter before the last occurance of any of the characters specified in the <paramref name="delimiters" /> parameter. </para> <para> -or- </para> <para> A <see cref="T:System.String" /> equivalent to the one specified by the <paramref name="s" /> parameter if none of those characters was found. </para> </returns> </member> <member name="M:Jedi.Strings.StringUtils.ExpandTabs(System.String,Jedi.Strings.StringUtils.TabSet)"> <overloads> Expands the tab characters in a string into spaces. </overloads> <summary> Expands the tab characters in a string using a TabSet to specify the tabulation positions. </summary> <param name="s"> The string to expand the tabs in. </param> <param name="tabSet"> The TabSet specifying tabulation positions. </param> <returns> A <see cref="T:System.String" /> equivalent to the one specified by the <paramref name="s" /> parameter with all of the tab characters expanded into spaces following the settings of the <paramref name="tabSet" /> parameter. </returns> </member> <member name="M:Jedi.Strings.StringUtils.ExpandTabs(System.String,System.Int32[])"> <summary> Expands the tab characters in a string using the specified array of tabulation positions and a default tab width. </summary> <param name="s"> The string to expand the tabs in. </param> <param name="tabs"> Array containing tabulation positions. The array should not contain duplicate integers, but the order is not important. </param> <returns> A <see cref="T:System.String" /> equivalent to the one specified by the <paramref name="s" /> parameter with all of the tab characters expanded into spaces following the settings of the <paramref name="tabs" /> parameter. </returns> <remarks> <para> If the expansion process runs out of tabulation positions, new positions are calculated based on the difference between the last two positions. If only one position is given, that position is also used as the difference to use to the additional tabs. If no positions are specified (ie. an empty array is specified), the difference will be set to 2. </para> <para> This overloaded version will create a TabSet instance and use it to perform the expansion. A call to this overloaded version can therefore be rewritten as: <code lang="C#"> StringUtils.ExpandTabs(s, new StringUtils.TabSet(tabs)) </code> <code lang="Visual Basic,C++,JScript"> StringUtils.ExpandTabs(s, StringUtils.TabSet.Create(tabs)) </code> </para> </remarks> </member> <member name="M:Jedi.Strings.StringUtils.ExpandTabs(System.String,System.Int32[],System.Int32)"> <summary> Expands the tab characters in a string using the specified array of tabulation positions and a specified tab width. </summary> <param name="s"> The string to expand the tabs in. </param> <param name="tabs"> Array containing tabulation positions. The array should not contain duplicate integers, but the order is not important. </param> <param name="additionalTabsWidth"> The width to use for positions beyond the specified tab positions in the <paramref name="tabs" /> parameter. </param> <returns> A <see cref="T:System.String" /> equivalent to the one specified by the <paramref name="s" /> parameter with all of the tab characters expanded into spaces following the settings of the <paramref name="tabs" /> and <paramref name="additionalTabsWidth" /> parameters. </returns> </member> <member name="M:Jedi.Strings.StringUtils.ExtractQuotedString(System.String)"> <summary> </summary> <param name="s"> </param> <returns> </returns> </member> <member name="M:Jedi.Strings.StringUtils.ExtractQuotedString(System.String,Jedi.Strings.ExtractQuotedStringFlags)"> <summary> </summary> <param name="s"> </param> <param name="flags"> </param> <returns> </returns> </member> <member name="M:Jedi.Strings.StringUtils.ExtractQuotedString(System.String,System.Int32&)"> <summary> </summary> <param name="s"> </param> <param name="lastUsedChar"> </param> <returns> </returns> </member> <member name="M:Jedi.Strings.StringUtils.Left(System.String,System.Int32)"> <summary> </summary> <param name="s"> </param> <param name="length"> </param> <returns> </returns> </member> <member name="M:Jedi.Strings.StringUtils.Mid(System.String,System.Int32,System.Int32)"> <summary> </summary> <param name="s"> </param> <param name="from"> </param> <param name="to"> </param> <returns> </returns> </member> <member name="M:Jedi.Strings.StringUtils.QuoteString(System.String)"> <summary> </summary> <param name="s"> </param> <returns> </returns> </member> <member name="M:Jedi.Strings.StringUtils.QuoteString(System.String,System.Char)"> <summary> </summary> <param name="s"> </param> <param name="quoteChar"> </param> <returns> </returns> </member> <member name="M:Jedi.Strings.StringUtils.RemoveDuplicateChars(System.String,System.Char)"> <summary> </summary> <param name="s"> </param> <param name="char"> </param> <returns> </returns> </member> <member name="M:Jedi.Strings.StringUtils.RemoveDuplicateChars(System.String,System.Char[])"> <summary> </summary> <param name="s"> </param> <param name="chars"> </param> <returns> </returns> </member> <member name="M:Jedi.Strings.StringUtils.Repeat(System.String,System.Int32)"> <summary> </summary> <param name="s"> </param> <param name="count"> </param> <returns> </returns> </member> <member name="M:Jedi.Strings.StringUtils.Right(System.String,System.Int32)"> <summary> </summary> <param name="s"> </param> <param name="length"> </param> <returns> </returns> </member> <member name="T:Jedi.Strings.StringUtils.TabSet"> <summary> </summary> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.#ctor"> <summary> </summary> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.#ctor(System.Int32)"> <summary> </summary> <param name="defaultWidth"> </param> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.#ctor(System.Int32[])"> <summary> </summary> <param name="tabs"> </param> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.#ctor(System.Int32[],System.Int32)"> <summary> </summary> <param name="tabs"> </param> <param name="defaultWidth"> </param> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.Add(System.Int32)"> <summary> </summary> <param name="tabPosition"> </param> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.BeginUpdate"> <summary> </summary> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.Clear"> <summary> </summary> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.Clone"> <summary> </summary> <returns> </returns> </member> <member name="P:Jedi.Strings.StringUtils+TabSet.Count"> <summary> </summary> <value> </value> </member> <member name="P:Jedi.Strings.StringUtils+TabSet.DefaultWidth"> <summary> </summary> <value> </value> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.EndUpdate"> <summary> </summary> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.Equals(System.Object)"> <!-- this member is inherited and does not require documentation. <summary> </summary> <param name="obj"> </param> <returns> </returns>--> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.IsAutoWidth"> <summary> </summary> <returns> </returns> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.IsUpdating"> <summary> </summary> <returns> </returns> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.RealDefaultWidth"> <summary> </summary> <returns> </returns> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.RecalcDefaultWidth"> <summary> </summary> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.Remove(System.Int32,System.Boolean)"> <summary> </summary> <param name="tabPosition"> </param> <param name="includeFollowing"> </param> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.RemoveAt(System.Int32,System.Boolean)"> <summary> </summary> <param name="index"> </param> <param name="includeFollowing"> </param> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.TabFrom(System.Int32)"> <summary> </summary> <param name="pos"> </param> <returns> </returns> </member> <member name="P:Jedi.Strings.StringUtils+TabSet.Tabs(System.Int32)"> <summary> </summary> <param name="index"> </param> <value> </value> </member> <member name="M:Jedi.Strings.StringUtils+TabSet.ToString"> <!-- this member is inherited and does not require documentation. <summary> </summary> <returns> </returns>--> </member> </members> </doc> |
From: Marcel B. <jed...@us...> - 2004-11-26 09:58:11
|
Update of /cvsroot/jedidotnet/tools/docs/Generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6134/tools/docs/Generator Modified Files: MainForm.GeneratorForm.resources MainForm.pas MainForm.resx Log Message: * Fixed bug regarding Delphi internal classes of nested types * Allowed for the <exclude /> tag (would previously regenerate the skeleton because it was considered to be an empty member) * Possibly some other minor fixes Index: MainForm.GeneratorForm.resources =================================================================== RCS file: /cvsroot/jedidotnet/tools/docs/Generator/MainForm.GeneratorForm.resources,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsqVFPc8 and /tmp/cvsLxjqP8 differ Index: MainForm.resx =================================================================== RCS file: /cvsroot/jedidotnet/tools/docs/Generator/MainForm.resx,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MainForm.resx 25 Jun 2004 13:20:42 -0000 1.1 --- MainForm.resx 26 Nov 2004 09:57:55 -0000 1.2 *************** *** 135,139 **** </data> <data name="fbdDocFolder.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> ! <value>139, 17</value> </data> <data name="fbdDocFolder.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> --- 135,139 ---- </data> <data name="fbdDocFolder.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> ! <value>17, 17</value> </data> <data name="fbdDocFolder.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> *************** *** 141,145 **** </data> <data name="fbdAsmFolder.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> ! <value>17, 17</value> </data> <data name="fbdAsmFolder.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> --- 141,145 ---- </data> <data name="fbdAsmFolder.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> ! <value>136, 17</value> </data> <data name="fbdAsmFolder.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> *************** *** 158,167 **** <value>Private</value> </data> - <data name="btnGenerate.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> <data name="btnGenerate.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>False</value> </data> <data name="lblLog.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>False</value> --- 158,167 ---- <value>Private</value> </data> <data name="btnGenerate.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>False</value> </data> + <data name="btnGenerate.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>Private</value> + </data> <data name="lblLog.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>False</value> *************** *** 182,185 **** --- 182,191 ---- <value>Private</value> </data> + <data name="Button1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>False</value> + </data> + <data name="Button1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>Private</value> + </data> <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>False</value> Index: MainForm.pas =================================================================== RCS file: /cvsroot/jedidotnet/tools/docs/Generator/MainForm.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MainForm.pas 25 Jun 2004 13:20:42 -0000 1.1 --- MainForm.pas 26 Nov 2004 09:57:55 -0000 1.2 *************** *** 29,32 **** --- 29,33 ---- tbLog: System.Windows.Forms.TextBox; btnClear: System.Windows.Forms.Button; + Button1: System.Windows.Forms.Button; /// <summary> /// Required method for Designer support - do not modify *************** *** 42,45 **** --- 43,47 ---- procedure clbAssemblies_ItemCheck(sender: System.Object; e: System.Windows.Forms.ItemCheckEventArgs); procedure btnClear_Click(sender: System.Object; e: System.EventArgs); + procedure Button1_Click(sender: System.Object; e: System.EventArgs); {$ENDREGION} strict protected *************** *** 89,92 **** --- 91,95 ---- Self.tbLog := System.Windows.Forms.TextBox.Create; Self.btnClear := System.Windows.Forms.Button.Create; + Self.Button1 := System.Windows.Forms.Button.Create; Self.SuspendLayout; // *************** *** 221,238 **** Include(Self.btnClear.Click, Self.btnClear_Click); // // GeneratorForm // Self.AutoScaleBaseSize := System.Drawing.Size.Create(5, 13); Self.ClientSize := System.Drawing.Size.Create(497, 403); Self.Controls.Add(Self.btnClear); Self.Controls.Add(Self.tbLog); Self.Controls.Add(Self.lblLog); - Self.Controls.Add(Self.btnGenerate); Self.Controls.Add(Self.lblAssemblies); - Self.Controls.Add(Self.clbAssemblies); Self.Controls.Add(Self.tbDocPath); Self.Controls.Add(Self.lblDocPath); Self.Controls.Add(Self.tbAssembly); Self.Controls.Add(Self.lblAssembly); Self.Controls.Add(Self.btnBrowseDocPath); Self.Controls.Add(Self.btnBrowseAssembly); --- 224,250 ---- Include(Self.btnClear.Click, Self.btnClear_Click); // + // Button1 + // + Self.Button1.Location := System.Drawing.Point.Create(420, 115); + Self.Button1.Name := 'Button1'; + Self.Button1.TabIndex := 12; + Self.Button1.Text := 'Gen asm docs'; + Include(Self.Button1.Click, Self.Button1_Click); + // // GeneratorForm // Self.AutoScaleBaseSize := System.Drawing.Size.Create(5, 13); Self.ClientSize := System.Drawing.Size.Create(497, 403); + Self.Controls.Add(Self.Button1); Self.Controls.Add(Self.btnClear); Self.Controls.Add(Self.tbLog); Self.Controls.Add(Self.lblLog); Self.Controls.Add(Self.lblAssemblies); Self.Controls.Add(Self.tbDocPath); Self.Controls.Add(Self.lblDocPath); Self.Controls.Add(Self.tbAssembly); Self.Controls.Add(Self.lblAssembly); + Self.Controls.Add(Self.btnGenerate); + Self.Controls.Add(Self.clbAssemblies); Self.Controls.Add(Self.btnBrowseDocPath); Self.Controls.Add(Self.btnBrowseAssembly); *************** *** 270,273 **** --- 282,292 ---- end; + procedure GeneratorForm.Button1_Click(sender: System.Object; e: System.EventArgs); + begin + tbLog.Text := tbLog.Text + 'Generating assembly documentation files...' + Environment.NewLine; + OutputGenerator.GenerateAssemblyFiles; + tbLog.Text := tbLog.Text + 'Finished.' + Environment.NewLine; + end; + procedure GeneratorForm.btnClear_Click(sender: System.Object; e: System.EventArgs); begin |
From: Marcel B. <jed...@us...> - 2004-11-26 09:58:11
|
Update of /cvsroot/jedidotnet/tools/docs/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6134/tools/docs/common Modified Files: Jedi.Docs.System.pas Log Message: * Fixed bug regarding Delphi internal classes of nested types * Allowed for the <exclude /> tag (would previously regenerate the skeleton because it was considered to be an empty member) * Possibly some other minor fixes Index: Jedi.Docs.System.pas =================================================================== RCS file: /cvsroot/jedidotnet/tools/docs/common/Jedi.Docs.System.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jedi.Docs.System.pas 26 Jun 2004 10:22:44 -0000 1.2 --- Jedi.Docs.System.pas 26 Nov 2004 09:57:56 -0000 1.3 *************** *** 198,202 **** list := node.ChildNodes; index := list.Count - 1; ! while (index >= 0) and ((list[index].NodeType <> XmlNodeType.Element) or (list[Index].InnerXml = '')) do Dec(index); Result := index >= 0; --- 198,203 ---- list := node.ChildNodes; index := list.Count - 1; ! while (index >= 0) and ((list[index].NodeType <> XmlNodeType.Element) or ((list[Index].InnerXml = '') and ! (list[index].LocalName <> 'exclude'))) do Dec(index); Result := index >= 0; *************** *** 440,446 **** function AssemblyOverview.CanTypeBeDocumented(&type: System.Type): Boolean; begin Result := (&type.IsPublic or &type.IsNestedPublic or &type.IsNestedFamily or &type.IsNestedFamORAssem) and ! not &type.Name.StartsWith('@Meta') and (&type.Name <> 'Unit'); end; --- 441,450 ---- function AssemblyOverview.CanTypeBeDocumented(&type: System.Type): Boolean; + var + base: System.Type; begin + base := &type.BaseType; Result := (&type.IsPublic or &type.IsNestedPublic or &type.IsNestedFamily or &type.IsNestedFamORAssem) and ! (not Assigned(base) or (base.FullName <> 'Borland.Delphi.System.@TClass')) and (&type.Name <> 'Unit'); end; *************** *** 676,682 **** function AssemblyOverview.MustTypeBeDocumented(&type: System.Type): Boolean; begin ! Result := &type.IsPublic or &type.IsNestedPublic or (not &type.DeclaringType.IsSealed and ! (&type.IsNestedFamily or &type.IsNestedFamORAssem)); end; --- 680,690 ---- function AssemblyOverview.MustTypeBeDocumented(&type: System.Type): Boolean; + var + base: System.Type; begin ! base := &type.BaseType; ! Result := (not Assigned(base) or (&type.BaseType.FullName <> 'Borland.Delphi.System.@TClass')) and ( ! &type.IsPublic or &type.IsNestedPublic or (not &type.DeclaringType.IsSealed and ! (&type.IsNestedFamily or &type.IsNestedFamORAssem))); end; *************** *** 907,926 **** procedure OutputGenerator.UpdateMemberSkeleton(var index: Integer); begin ! UpdateElement('overloads', False); ! UpdateElement('summary', True); ! if (FMemberFlags and (MemberFlags.IsMethod or MemberFlags.IsProperty)) <> MemberFlags.None then ! UpdateParamsSkeleton(index); ! if (FMemberFlags and MemberFlags.IsFunction) = MemberFlags.IsFunction then ! UpdateElement('returns', True); ! if (FMemberFlags and MemberFlags.IsProperty) <> MemberFlags.None then ! UpdateElement('value', False); ! if (FMemberFlags and MemberFlags.IsNamespace) = MemberFlags.None then ! UpdateElement('remarks', False); ! WriteCommentEnd; // ensure all comments are closed end; --- 915,942 ---- procedure OutputGenerator.UpdateMemberSkeleton(var index: Integer); begin ! if FMemberNode.SelectSingleNode('exclude') <> nil then ! begin ! FXmlWriter.WriteStartElement('exclude'); ! FXmlWriter.WriteEndElement; ! end ! else ! begin ! UpdateElement('overloads', False); ! UpdateElement('summary', True); ! if (FMemberFlags and (MemberFlags.IsMethod or MemberFlags.IsProperty)) <> MemberFlags.None then ! UpdateParamsSkeleton(index); ! if (FMemberFlags and MemberFlags.IsFunction) = MemberFlags.IsFunction then ! UpdateElement('returns', True); ! if (FMemberFlags and MemberFlags.IsProperty) <> MemberFlags.None then ! UpdateElement('value', False); ! if (FMemberFlags and MemberFlags.IsNamespace) = MemberFlags.None then ! UpdateElement('remarks', False); ! WriteCommentEnd; // ensure all comments are closed ! end; end; |
From: Marcel B. <jed...@us...> - 2004-11-24 15:19:31
|
Update of /cvsroot/jedidotnet/main/Nunit/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3079/main/Nunit/source Added Files: NUnit.Jedi.System.pas Log Message: Added Jedi.Core unit test (Jedi.System namespace is currently the only one implemented) --- NEW FILE: NUnit.Jedi.System.pas --- unit NUnit.Jedi.System; interface uses System.ComponentModel, NUnit.Framework, Jedi.System; type [TestFixture] AttributeUtils = class strict protected List1: array of Attribute; List2: AttributeCollection; ListAfterAdd: array of Attribute; ListAfterAddAndReplace: array of Attribute; ListAfterDelete: array of Attribute; ListAfterReplace: array of Attribute; public [TestFixtureSetup] procedure TestSetup; [Test] procedure Combine_Add; [Test] procedure Combine_AddAndReplace; [Test] procedure Combine_Delete; [Test] procedure Combine_Replace; [Test] procedure RetrieveAttributeByType; [Test] procedure RetrieveAttributeByInstance; end; implementation {$REGION 'Test attributes'} type TestAttributeBase = class (Attribute) public constructor Create(value: &Object); public Value: &Object; end; TestAttribute1 = class (TestAttributeBase); TestAttribute2 = class (TestAttributeBase); TestAttribute3 = class (TestAttributeBase); TestAttribute4 = class (TestAttributeBase); TestAttribute5 = class (TestAttributeBase); TestAttribute6 = class (TestAttributeBase); TestAttribute7 = class (TestAttributeBase); TestAttribute8 = class (TestAttributeBase); TestAttribute9 = class (TestAttributeBase); TestAttribute11 = class (TestAttribute1); TestAttribute12 = class (TestAttribute1); TestAttribute111 = class (TestAttribute11); TestAttribute112 = class (TestAttribute11); TestAttribute121 = class (TestAttribute12); TestAttribute122 = class (TestAttribute12); TestAttribute21 = class (TestAttribute2); TestAttribute22 = class (TestAttribute2); TestAttribute211 = class (TestAttribute21); TestAttribute212 = class (TestAttribute21); TestAttribute221 = class (TestAttribute22); TestAttribute222 = class (TestAttribute22); {$REGION 'TestAttributeBase'} constructor TestAttributeBase.Create(value: &Object); begin inherited Create; Self.Value := value; end; {$ENDREGION} {$ENDREGION} {$REGION 'AttributeUtils'} procedure AttributeUtils.Combine_Add; var newList: array of Attribute; begin newList := Jedi.System.AttributeUtils.CombineAttributes(List1, List2, AttributeCombineOperation.Add); Assert.AreEqual(ListAfterAdd, newList); end; procedure AttributeUtils.Combine_AddAndReplace; var newList: array of Attribute; begin newList := Jedi.System.AttributeUtils.CombineAttributes(List1, List2, AttributeCombineOperation.AddAndReplace); Assert.AreEqual(ListAfterAddAndReplace, newList); end; procedure AttributeUtils.Combine_Delete; var newList: array of Attribute; begin newList := Jedi.System.AttributeUtils.CombineAttributes(List1, List2, AttributeCombineOperation.Delete); Assert.AreEqual(ListAfterDelete, newList); end; procedure AttributeUtils.Combine_Replace; var newList: array of Attribute; begin newList := Jedi.System.AttributeUtils.CombineAttributes(List1, List2, AttributeCombineOperation.Replace); Assert.AreEqual(ListAfterReplace, newList); end; procedure AttributeUtils.RetrieveAttributeByType; var attr: Attribute; begin attr := Jedi.System.AttributeUtils.GetAttribute(List1, TypeOf(TestAttribute1)); Assert.AreSame(List1[0], attr, 'List1[0]'); attr := Jedi.System.AttributeUtils.GetAttribute(List2, TypeOf(TestAttribute1)); Assert.AreSame(List2[0], attr, 'List2[0]'); end; procedure AttributeUtils.RetrieveAttributeByInstance; var attr: Attribute; begin attr := TestAttribute1.Create('Attribute 1, list 1.'); attr := Jedi.System.AttributeUtils.GetAttribute(List1, attr); Assert.AreSame(List1[0], attr, 'List1[0]'); attr := TestAttribute1.Create('Attribute 1, list 2.'); attr := Jedi.System.AttributeUtils.GetAttribute(List2, attr); Assert.AreSame(List2[0], attr, 'List2[0]'); attr := TestAttribute1.Create('Attribute x, list 1.'); attr := Jedi.System.AttributeUtils.GetAttribute(List1, attr); Assert.IsNull( attr, 'Found an attribute for TestAttribute1(''Attribute x, list1.'')'); attr := TestAttribute1.Create('Attribute x, list 2.'); attr := Jedi.System.AttributeUtils.GetAttribute(List2, attr); Assert.IsNull( attr, 'Found an attribute for TestAttribute1(''Attribute x, list2.'')'); end; procedure AttributeUtils.TestSetup; begin List1 := AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 1.'), TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.') ); List2 := AttributeCollection.Create(AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 2.'), TestAttribute11.Create('Attribute 2, list 2.'), TestAttribute2.Create('Attribute 3, list 2.'), TestAttribute6.Create('Attribute 4, list 2.'), TestAttribute7.Create('Attribute 5, list 2.') )); ListAfterAdd := AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 1.'), TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.'), TestAttribute11.Create('Attribute 2, list 2.'), TestAttribute2.Create('Attribute 3, list 2.'), TestAttribute6.Create('Attribute 4, list 2.'), TestAttribute7.Create('Attribute 5, list 2.') ); ListAfterAddAndReplace := AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 2.'), TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.'), TestAttribute11.Create('Attribute 2, list 2.'), TestAttribute2.Create('Attribute 3, list 2.'), TestAttribute6.Create('Attribute 4, list 2.'), TestAttribute7.Create('Attribute 5, list 2.') ); ListAfterDelete := AttributeArray.Create( TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.') ); ListAfterReplace := AttributeArray.Create( TestAttribute1.Create('Attribute 1, list 2.'), TestAttribute212.Create('Attribute 2, list 1.'), TestAttribute3.Create('Attribute 3, list 1.'), TestAttribute4.Create('Attribute 4, list 1.'), TestAttribute5.Create('Attribute 5, list 1.') ); end; {$ENDREGION} end. |
From: Marcel B. <jed...@us...> - 2004-11-24 15:19:23
|
Update of /cvsroot/jedidotnet/main/Nunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3079/main/Nunit Modified Files: Nunit.Jedi.Results.xml Nunit.Jedi.nunit Added Files: Nunit.Jedi.Core.bdsproj Nunit.Jedi.Core.dpk Log Message: Added Jedi.Core unit test (Jedi.System namespace is currently the only one implemented) --- NEW FILE: Nunit.Jedi.Core.dpk --- package Nunit.Jedi.Core; {$ALIGN 0} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$IMPLICITBUILD OFF} requires Borland.Delphi, nunit.framework, Jedi.Core; contains NUnit.Jedi.System in 'source\NUnit.Jedi.System.pas'; [assembly: AssemblyDescription('')] [assembly: AssemblyConfiguration('')] [assembly: AssemblyCompany('')] [assembly: AssemblyProduct('')] [assembly: AssemblyCopyright('')] [assembly: AssemblyTrademark('')] [assembly: AssemblyCulture('')] // The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. // You can set this in the IDE via the Project Options. // Manually setting the AssemblyTitle attribute below will override the IDE // setting. // [assembly: AssemblyTitle('')] // // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion('1.0.*')] // // In order to sign your assembly you must specify a key to use. Refer to the // Microsoft .NET Framework documentation for more information on assembly signing. // // Use the attributes below to control which key is used for signing. // // Notes: // (*) If no key is specified, the assembly is not signed. // (*) KeyName refers to a key that has been installed in the Crypto Service // Provider (CSP) on your machine. KeyFile refers to a file which contains // a key. // (*) If the KeyFile and the KeyName values are both specified, the // following processing occurs: // (1) If the KeyName can be found in the CSP, that key is used. // (2) If the KeyName does not exist and the KeyFile does exist, the key // in the KeyFile is installed into the CSP and used. // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. // When specifying the KeyFile, the location of the KeyFile should be // relative to the project output directory. For example, if your KeyFile is // located in the project directory, you would specify the AssemblyKeyFile // attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output // directory is the project directory (the default). // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework // documentation for more information on this. // [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] end. Index: Nunit.Jedi.nunit =================================================================== RCS file: /cvsroot/jedidotnet/main/Nunit/Nunit.Jedi.nunit,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Nunit.Jedi.nunit 24 Nov 2004 10:35:10 -0000 1.1 --- Nunit.Jedi.nunit 24 Nov 2004 15:19:11 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- <assembly path="Nunit.Jedi.Text.dll" /> <assembly path="Nunit.Jedi.Persistence.dll" /> + <assembly path="Nunit.Jedi.Core.dll" /> </Config> </NUnitProject> \ No newline at end of file --- NEW FILE: Nunit.Jedi.Core.bdsproj --- (This appears to be a binary file; contents omitted.) Index: Nunit.Jedi.Results.xml =================================================================== RCS file: /cvsroot/jedidotnet/main/Nunit/Nunit.Jedi.Results.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Nunit.Jedi.Results.xml 24 Nov 2004 10:35:10 -0000 1.1 --- Nunit.Jedi.Results.xml 24 Nov 2004 15:19:10 -0000 1.2 *************** *** 1,20 **** <?xml version="1.0" encoding="utf-8" standalone="no"?> <!--This file represents the results of running a test suite--> ! <test-results name="F:\Programming\JEDI\JediDotNet\main\Nunit\Nunit.Jedi.nunit" total="66" failures="0" not-run="0" date="24-11-2004" time="11:14"> <test-suite name="F:\Programming\JEDI\JediDotNet\main\Nunit\Nunit.Jedi.nunit" success="True" time="0,875" asserts="0"> <results> ! <test-suite name="F:\Programming\JEDI\JediDotNet\main\Nunit\Nunit.Jedi.Persistence.dll" success="True" time="0,390625" asserts="0"> <results> ! <test-suite name="Nunit" success="True" time="0,390625" asserts="0"> <results> ! <test-suite name="Jedi" success="True" time="0,390625" asserts="0"> <results> ! <test-suite name="IO" success="True" time="0,375" asserts="0"> <results> ! <test-suite name="PathHandling" success="True" time="0,375" asserts="0"> <results> ! <test-suite name="Manipulations" success="True" time="0,09375" asserts="0"> <results> ! <test-case name="Nunit.Jedi.IO.PathHandling.Manipulations.CombineTenPaths" executed="True" success="True" time="0.016" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.Manipulations.CombineTwo" executed="True" success="True" time="0.000" asserts="3" /> <test-case name="Nunit.Jedi.IO.PathHandling.Manipulations.CombineTwoAbsolutePaths" executed="True" success="True" time="0.000" asserts="3" /> --- 1,46 ---- <?xml version="1.0" encoding="utf-8" standalone="no"?> <!--This file represents the results of running a test suite--> ! <test-results name="F:\Programming\JEDI\JediDotNet\main\Nunit\Nunit.Jedi.nunit" total="72" failures="0" not-run="0" date="24-11-2004" time="16:12"> <test-suite name="F:\Programming\JEDI\JediDotNet\main\Nunit\Nunit.Jedi.nunit" success="True" time="0,875" asserts="0"> <results> ! <test-suite name="F:\Programming\JEDI\JediDotNet\main\Nunit\Nunit.Jedi.Core.dll" success="True" time="0,078125" asserts="0"> <results> ! <test-suite name="NUnit" success="True" time="0,078125" asserts="0"> <results> ! <test-suite name="Jedi" success="True" time="0,078125" asserts="0"> <results> ! <test-suite name="System" success="True" time="0,0625" asserts="0"> <results> ! <test-suite name="AttributeUtils" success="True" time="0,0625" asserts="0"> <results> ! <test-case name="NUnit.Jedi.System.AttributeUtils.Combine_Add" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="NUnit.Jedi.System.AttributeUtils.Combine_AddAndReplace" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="NUnit.Jedi.System.AttributeUtils.Combine_Delete" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="NUnit.Jedi.System.AttributeUtils.Combine_Replace" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="NUnit.Jedi.System.AttributeUtils.RetrieveAttributeByInstance" executed="True" success="True" time="0.000" asserts="4" /> ! <test-case name="NUnit.Jedi.System.AttributeUtils.RetrieveAttributeByType" executed="True" success="True" time="0.000" asserts="2" /> ! </results> ! </test-suite> ! </results> ! </test-suite> ! </results> ! </test-suite> ! </results> ! </test-suite> ! </results> ! </test-suite> ! <test-suite name="F:\Programming\JEDI\JediDotNet\main\Nunit\Nunit.Jedi.Persistence.dll" success="True" time="0,328125" asserts="0"> ! <results> ! <test-suite name="Nunit" success="True" time="0,328125" asserts="0"> ! <results> ! <test-suite name="Jedi" success="True" time="0,3125" asserts="0"> ! <results> ! <test-suite name="IO" success="True" time="0,3125" asserts="0"> ! <results> ! <test-suite name="PathHandling" success="True" time="0,3125" asserts="0"> ! <results> ! <test-suite name="Manipulations" success="True" time="0,03125" asserts="0"> <results> ! <test-case name="Nunit.Jedi.IO.PathHandling.Manipulations.CombineTenPaths" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.Manipulations.CombineTwo" executed="True" success="True" time="0.000" asserts="3" /> <test-case name="Nunit.Jedi.IO.PathHandling.Manipulations.CombineTwoAbsolutePaths" executed="True" success="True" time="0.000" asserts="3" /> *************** *** 25,32 **** <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.DeepRootedPath" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.DeepVolumeRootedPath" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.HasDottedFolderName" executed="True" success="True" time="0.016" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.InvalidRelativePathUpLevel" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.InvalidVolumeRoot" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.RelativePath" executed="True" success="True" time="0.016" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.RelativePathUpLevel" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.RelativePathUpTwoLevels" executed="True" success="True" time="0.000" asserts="1" /> --- 51,58 ---- <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.DeepRootedPath" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.DeepVolumeRootedPath" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.HasDottedFolderName" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.InvalidRelativePathUpLevel" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.InvalidVolumeRoot" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.RelativePath" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.RelativePathUpLevel" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.Normalize.RelativePathUpTwoLevels" executed="True" success="True" time="0.000" asserts="1" /> *************** *** 42,55 **** </results> </test-suite> ! <test-suite name="ValidityChecks" success="True" time="0,140625" asserts="0"> <results> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.DeepRootedPath" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.DeepVolumeRootedPath" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.HasDottedFolderName" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.InvalidRelativePathUpLevel" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.InvalidVolumeRoot" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.RelativePath" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.RelativePathUpLevel" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.RelativePathUpTwoLevels" executed="True" success="True" time="0.016" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.RelativePathUpTwoLevelsSep" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.StartWithThisPath" executed="True" success="True" time="0.000" asserts="1" /> --- 68,81 ---- </results> </test-suite> ! <test-suite name="ValidityChecks" success="True" time="0,125" asserts="0"> <results> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.DeepRootedPath" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.DeepVolumeRootedPath" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.HasDottedFolderName" executed="True" success="True" time="0.016" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.InvalidRelativePathUpLevel" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.InvalidVolumeRoot" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.RelativePath" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.RelativePathUpLevel" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.RelativePathUpTwoLevels" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.RelativePathUpTwoLevelsSep" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="Nunit.Jedi.IO.PathHandling.ValidityChecks.StartWithThisPath" executed="True" success="True" time="0.000" asserts="1" /> *************** *** 68,82 **** </results> </test-suite> ! <test-suite name="F:\Programming\JEDI\JediDotNet\main\Nunit\Nunit.Jedi.Text.dll" success="True" time="0,46875" asserts="0"> <results> ! <test-suite name="NUnit" success="True" time="0,453125" asserts="0"> <results> ! <test-suite name="Jedi" success="True" time="0,453125" asserts="0"> <results> ! <test-suite name="Strings" success="True" time="0,453125" asserts="0"> <results> <test-suite name="Manipulations" success="True" time="0,03125" asserts="0"> <results> ! <test-case name="NUnit.Jedi.Strings.Manipulations.ExpandTabs" executed="True" success="True" time="0.016" asserts="6" /> <test-case name="NUnit.Jedi.Strings.Manipulations.RemoveDuplicates" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="NUnit.Jedi.Strings.Manipulations.Repeat" executed="True" success="True" time="0.000" asserts="3" /> --- 94,108 ---- </results> </test-suite> ! <test-suite name="F:\Programming\JEDI\JediDotNet\main\Nunit\Nunit.Jedi.Text.dll" success="True" time="0,4375" asserts="0"> <results> ! <test-suite name="NUnit" success="True" time="0,421875" asserts="0"> <results> ! <test-suite name="Jedi" success="True" time="0,421875" asserts="0"> <results> ! <test-suite name="Strings" success="True" time="0,421875" asserts="0"> <results> <test-suite name="Manipulations" success="True" time="0,03125" asserts="0"> <results> ! <test-case name="NUnit.Jedi.Strings.Manipulations.ExpandTabs" executed="True" success="True" time="0.000" asserts="6" /> <test-case name="NUnit.Jedi.Strings.Manipulations.RemoveDuplicates" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="NUnit.Jedi.Strings.Manipulations.Repeat" executed="True" success="True" time="0.000" asserts="3" /> *************** *** 104,108 **** </results> </test-suite> ! <test-suite name="Substrings" success="True" time="0,125" asserts="0"> <results> <test-case name="NUnit.Jedi.Strings.Substrings.AfterLastMultipleDelimiters" executed="True" success="True" time="0.000" asserts="4" /> --- 130,134 ---- </results> </test-suite> ! <test-suite name="Substrings" success="True" time="0,109375" asserts="0"> <results> <test-case name="NUnit.Jedi.Strings.Substrings.AfterLastMultipleDelimiters" executed="True" success="True" time="0.000" asserts="4" /> *************** *** 112,128 **** <test-case name="NUnit.Jedi.Strings.Substrings.BeforeLastMultipleDelimiters" executed="True" success="True" time="0.000" asserts="4" /> <test-case name="NUnit.Jedi.Strings.Substrings.BeforeLastSingleDelimiter" executed="True" success="True" time="0.000" asserts="5" /> ! <test-case name="NUnit.Jedi.Strings.Substrings.BeforeMultipleDelimiters" executed="True" success="True" time="0.016" asserts="4" /> <test-case name="NUnit.Jedi.Strings.Substrings.BeforeSingleDelimiter" executed="True" success="True" time="0.000" asserts="5" /> <test-case name="NUnit.Jedi.Strings.Substrings.Left" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="NUnit.Jedi.Strings.Substrings.Mid" executed="True" success="True" time="0.016" asserts="1" /> <test-case name="NUnit.Jedi.Strings.Substrings.Right" executed="True" success="True" time="0.000" asserts="1" /> </results> </test-suite> ! <test-suite name="TabSet" success="True" time="0,078125" asserts="0"> <results> <test-case name="NUnit.Jedi.Strings.TabSet.AddingTabs" executed="True" success="True" time="0.000" asserts="53" /> <test-case name="NUnit.Jedi.Strings.TabSet.CloneAndEqual" executed="True" success="True" time="0.000" asserts="6" /> <test-case name="NUnit.Jedi.Strings.TabSet.ConvertToString" executed="True" success="True" time="0.000" asserts="4" /> ! <test-case name="NUnit.Jedi.Strings.TabSet.RemovingTabs" executed="True" success="True" time="0.016" asserts="245" /> <test-case name="NUnit.Jedi.Strings.TabSet.SimpleTabulation" executed="True" success="True" time="0.000" asserts="5" /> <test-case name="NUnit.Jedi.Strings.TabSet.SpecifiedTabsWithAutoDefault" executed="True" success="True" time="0.000" asserts="52" /> --- 138,154 ---- <test-case name="NUnit.Jedi.Strings.Substrings.BeforeLastMultipleDelimiters" executed="True" success="True" time="0.000" asserts="4" /> <test-case name="NUnit.Jedi.Strings.Substrings.BeforeLastSingleDelimiter" executed="True" success="True" time="0.000" asserts="5" /> ! <test-case name="NUnit.Jedi.Strings.Substrings.BeforeMultipleDelimiters" executed="True" success="True" time="0.000" asserts="4" /> <test-case name="NUnit.Jedi.Strings.Substrings.BeforeSingleDelimiter" executed="True" success="True" time="0.000" asserts="5" /> <test-case name="NUnit.Jedi.Strings.Substrings.Left" executed="True" success="True" time="0.000" asserts="1" /> ! <test-case name="NUnit.Jedi.Strings.Substrings.Mid" executed="True" success="True" time="0.000" asserts="1" /> <test-case name="NUnit.Jedi.Strings.Substrings.Right" executed="True" success="True" time="0.000" asserts="1" /> </results> </test-suite> ! <test-suite name="TabSet" success="True" time="0,0625" asserts="0"> <results> <test-case name="NUnit.Jedi.Strings.TabSet.AddingTabs" executed="True" success="True" time="0.000" asserts="53" /> <test-case name="NUnit.Jedi.Strings.TabSet.CloneAndEqual" executed="True" success="True" time="0.000" asserts="6" /> <test-case name="NUnit.Jedi.Strings.TabSet.ConvertToString" executed="True" success="True" time="0.000" asserts="4" /> ! <test-case name="NUnit.Jedi.Strings.TabSet.RemovingTabs" executed="True" success="True" time="0.000" asserts="245" /> <test-case name="NUnit.Jedi.Strings.TabSet.SimpleTabulation" executed="True" success="True" time="0.000" asserts="5" /> <test-case name="NUnit.Jedi.Strings.TabSet.SpecifiedTabsWithAutoDefault" executed="True" success="True" time="0.000" asserts="52" /> |
From: Marcel B. <jed...@us...> - 2004-11-24 15:18:47
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2823/main/run Modified Files: Jedi.System.pas Log Message: * AttributeUtils.IndexOf searching for a Attribute type, only accepts the same type, not inherited instances. * AttributeUtils.CombineAttributes always searches for the attribute type of the attribute in the second list. Index: Jedi.System.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.System.pas,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Jedi.System.pas 24 Nov 2004 13:48:27 -0000 1.6 --- Jedi.System.pas 24 Nov 2004 15:18:28 -0000 1.7 *************** *** 86,99 **** else attrType := attr.GetType; ! Result := attrList.Count - 1; endLoop := False; ! while (Result >= 0) and not endLoop do begin ! endLoop := attrType.IsInstanceOfType(attrList[Result]); if endLoop and not &Object.ReferenceEquals(attr, attrType) then endLoop := attr.Equals(attrList[Result]); if not endLoop then ! Dec(Result); end; end; --- 86,101 ---- else attrType := attr.GetType; ! Result := 0; endLoop := False; ! while (Result < attrList.Count) and not endLoop do begin ! endLoop := attrType = attrList[Result].GetType; if endLoop and not &Object.ReferenceEquals(attr, attrType) then endLoop := attr.Equals(attrList[Result]); if not endLoop then ! Inc(Result); end; + if Result >= attrList.Count then + Result := -1; end; *************** *** 123,127 **** for index := 0 to attributes2.Count - 1 do begin ! attrIndex := IndexOf(Result, attributes2[index]); if attrIndex > -1 then begin --- 125,129 ---- for index := 0 to attributes2.Count - 1 do begin ! attrIndex := IndexOf(Result, attributes2[index].GetType); if attrIndex > -1 then begin |
From: Marcel B. <jed...@us...> - 2004-11-24 13:48:43
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12317/main/run Modified Files: Jedi.System.pas Log Message: * AttributeUtils.IndexOf will only match attributes if the the Equals method returns True (only applicable if searching for an Attribute instance; when searching of an AttributeType, the same rules as before applies: any attribute of assignment compatible type will match). Index: Jedi.System.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.System.pas,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Jedi.System.pas 24 Nov 2004 12:08:13 -0000 1.5 --- Jedi.System.pas 24 Nov 2004 13:48:27 -0000 1.6 *************** *** 80,83 **** --- 80,84 ---- var attrType: System.Type; + endLoop: Boolean; begin if attr is System.Type then *************** *** 86,91 **** attrType := attr.GetType; Result := attrList.Count - 1; ! while (Result >= 0) and not attrType.IsAssignableFrom(attrList[Result].GetType) do ! Dec(Result); end; --- 87,99 ---- attrType := attr.GetType; Result := attrList.Count - 1; ! endLoop := False; ! while (Result >= 0) and not endLoop do ! begin ! endLoop := attrType.IsInstanceOfType(attrList[Result]); ! if endLoop and not &Object.ReferenceEquals(attr, attrType) then ! endLoop := attr.Equals(attrList[Result]); ! if not endLoop then ! Dec(Result); ! end; end; |
From: Marcel B. <jed...@us...> - 2004-11-24 12:08:24
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22368/main/run Modified Files: Jedi.System.pas Log Message: * Renamed Jedi.Drawing assembly to Jedi.Graphics (to avoid name clash with the Jedi.Drawing namespace). * Jedi.System, moved the hidden constructor to strict protected (avoiding the use of HINT OFF/HINT ON directives) Index: Jedi.System.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.System.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Jedi.System.pas 26 Aug 2004 09:44:10 -0000 1.4 --- Jedi.System.pas 24 Nov 2004 12:08:13 -0000 1.5 *************** *** 39,49 **** type AttributeUtils = class (System.Object) - strict private - { Avoids a hint about private symbol declared but not used. We need to declare it to prevent the compiler from - automatically generating a public constructor (due to a .NET rule) } - {$HINTS OFF} - constructor Create; - {$HINTS ON} strict protected class function CombineAttributes(attributes1, attributes2: ArrayList; operation: AttributeCombineOperation): ArrayList; overload; static; --- 39,44 ---- type AttributeUtils = class (System.Object) strict protected + constructor Create; class function CombineAttributes(attributes1, attributes2: ArrayList; operation: AttributeCombineOperation): ArrayList; overload; static; |
From: Marcel B. <jed...@us...> - 2004-11-24 12:08:23
|
Update of /cvsroot/jedidotnet/main/assemblies In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22368/main/assemblies Modified Files: Jedi.Core.bdsproj Jedi.Core.dpk Jedi.Windows.Forms.Hmi.bdsproj Jedi.Windows.Forms.Hmi.dpk Added Files: Jedi.Graphics.bdsproj Jedi.Graphics.dpk Removed Files: Jedi.Drawing.bdsproj Jedi.Drawing.dpk Log Message: * Renamed Jedi.Drawing assembly to Jedi.Graphics (to avoid name clash with the Jedi.Drawing namespace). * Jedi.System, moved the hidden constructor to strict protected (avoiding the use of HINT OFF/HINT ON directives) Index: Jedi.Windows.Forms.Hmi.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/main/assemblies/Jedi.Windows.Forms.Hmi.bdsproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Jedi.Windows.Forms.Hmi.bdsproj 16 Jun 2004 15:23:13 -0000 1.3 --- Jedi.Windows.Forms.Hmi.bdsproj 24 Nov 2004 12:08:11 -0000 1.4 *************** *** 121,125 **** <Directories Name="PackageDCPOutputDir" Type="String">..\bin</Directories> <Directories Name="SearchPath" Type="String">..\bin</Directories> ! <Directories Name="Packages" Type="String">..\bin\Jedi.Core.dll;..\bin\Jedi.Drawing.dll;$(SystemRoot)\microsoft.net\framework\v1.1.4322\mscorlib.dll;$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll;$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.dll;$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.dll;Borland.Delphi</Directories> <Directories Name="Conditionals" Type="String"></Directories> <Directories Name="DebugSourceDirs" Type="String"></Directories> --- 121,125 ---- <Directories Name="PackageDCPOutputDir" Type="String">..\bin</Directories> <Directories Name="SearchPath" Type="String">..\bin</Directories> ! <Directories Name="Packages" Type="String">..\bin\Jedi.Core.dll;..\bin\Jedi.Graphics.dll;System.Windows.Forms.dll;System.Drawing.dll;System.dll;Borland.Delphi</Directories> <Directories Name="Conditionals" Type="String"></Directories> <Directories Name="DebugSourceDirs" Type="String"></Directories> *************** *** 162,171 **** <FileList> ! <File FileName="$(BDSSharedAsm)\Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="7.1.1523.17956" LinkUnits="False"/> ! <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System" AssemblyName="System" Version="1.0.5000.0" LinkUnits="False"/> ! <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Drawing" AssemblyName="System.Drawing" Version="1.0.5000.0" LinkUnits="False"/> ! <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Windows.Forms" AssemblyName="System.Windows.Forms" Version="1.0.5000.0" LinkUnits="False"/> ! <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\mscorlib.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="mscorlib" AssemblyName="mscorlib" Version="1.0.5000.0" LinkUnits="False"/> ! <File FileName="..\bin\Jedi.Drawing.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.Drawing" AssemblyName="Jedi.Drawing" LinkUnits="False"/> <File FileName="..\bin\Jedi.Core.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.Core" AssemblyName="Jedi.Core" LinkUnits="False"/> <File FileName="..\run\Jedi.Windows.Forms.Hmi.Leds.pas" ContainerId="" ModuleName="Jedi.Windows.Forms.Hmi.Leds"/> --- 162,170 ---- <FileList> ! <File FileName="Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="7.1.1523.17956" LinkUnits="False"/> ! <File FileName="System.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System" AssemblyName="System" Version="1.0.5000.0" LinkUnits="False"/> ! <File FileName="System.Drawing.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Drawing" AssemblyName="System.Drawing" Version="1.0.5000.0" LinkUnits="False"/> ! <File FileName="System.Windows.Forms.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Windows.Forms" AssemblyName="System.Windows.Forms" Version="1.0.5000.0" LinkUnits="False"/> ! <File FileName="..\bin\Jedi.Graphics.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.Graphics" AssemblyName="Jedi.Graphics" LinkUnits="False"/> <File FileName="..\bin\Jedi.Core.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.Core" AssemblyName="Jedi.Core" LinkUnits="False"/> <File FileName="..\run\Jedi.Windows.Forms.Hmi.Leds.pas" ContainerId="" ModuleName="Jedi.Windows.Forms.Hmi.Leds"/> Index: Jedi.Windows.Forms.Hmi.dpk =================================================================== RCS file: /cvsroot/jedidotnet/main/assemblies/Jedi.Windows.Forms.Hmi.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.Windows.Forms.Hmi.dpk 16 Jun 2004 14:29:51 -0000 1.1 --- Jedi.Windows.Forms.Hmi.dpk 24 Nov 2004 12:08:11 -0000 1.2 *************** *** 30,35 **** System.Drawing, System.Windows.Forms, ! mscorlib, ! Jedi.Drawing, Jedi.Core; --- 30,34 ---- System.Drawing, System.Windows.Forms, ! Jedi.Graphics, Jedi.Core; --- NEW FILE: Jedi.Graphics.bdsproj --- (This appears to be a binary file; contents omitted.) Index: Jedi.Core.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/main/assemblies/Jedi.Core.bdsproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Jedi.Core.bdsproj 16 Jun 2004 15:23:13 -0000 1.3 --- Jedi.Core.bdsproj 24 Nov 2004 12:08:10 -0000 1.4 *************** *** 121,125 **** <Directories Name="PackageDCPOutputDir" Type="String">..\bin</Directories> <Directories Name="SearchPath" Type="String">..\bin</Directories> ! <Directories Name="Packages" Type="String">$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.dll;$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.dll;$(SystemRoot)\microsoft.net\framework\v1.1.4322\mscorlib.dll;Borland.Delphi</Directories> <Directories Name="Conditionals" Type="String"></Directories> <Directories Name="DebugSourceDirs" Type="String"></Directories> --- 121,125 ---- <Directories Name="PackageDCPOutputDir" Type="String">..\bin</Directories> <Directories Name="SearchPath" Type="String">..\bin</Directories> ! <Directories Name="Packages" Type="String">System.Drawing.dll;System.dll;Borland.Delphi</Directories> <Directories Name="Conditionals" Type="String"></Directories> <Directories Name="DebugSourceDirs" Type="String"></Directories> *************** *** 160,167 **** <FileList> ! <File FileName="$(BDSSharedAsm)\Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="7.1.1523.17956" LinkUnits="False"/> ! <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\mscorlib.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="mscorlib" AssemblyName="mscorlib" Version="1.0.5000.0" LinkUnits="False"/> ! <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System" AssemblyName="System" Version="1.0.5000.0" LinkUnits="False"/> ! <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Drawing" AssemblyName="System.Drawing" Version="1.0.5000.0" LinkUnits="False"/> <File FileName="..\run\Jedi.Collections.pas" ContainerId="" ModuleName="Jedi.Collections"/> <File FileName="..\run\Jedi.System.pas" ContainerId="" ModuleName="Jedi.System"/> --- 160,166 ---- <FileList> ! <File FileName="Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="7.1.1523.17956" LinkUnits="False"/> ! <File FileName="System.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System" AssemblyName="System" Version="1.0.5000.0" LinkUnits="False"/> ! <File FileName="System.Drawing.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Drawing" AssemblyName="System.Drawing" Version="1.0.5000.0" LinkUnits="False"/> <File FileName="..\run\Jedi.Collections.pas" ContainerId="" ModuleName="Jedi.Collections"/> <File FileName="..\run\Jedi.System.pas" ContainerId="" ModuleName="Jedi.System"/> --- Jedi.Drawing.dpk DELETED --- --- Jedi.Drawing.bdsproj DELETED --- Index: Jedi.Core.dpk =================================================================== RCS file: /cvsroot/jedidotnet/main/assemblies/Jedi.Core.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.Core.dpk 16 Jun 2004 14:29:51 -0000 1.1 --- Jedi.Core.dpk 24 Nov 2004 12:08:10 -0000 1.2 *************** *** 27,31 **** requires Borland.Delphi, - mscorlib, System, System.Drawing; --- 27,30 ---- --- NEW FILE: Jedi.Graphics.dpk --- package Jedi.Graphics; {$ALIGN 0} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$IMPLICITBUILD OFF} requires Borland.Delphi, System.Drawing; contains Jedi.Drawing in '..\run\Jedi.Drawing.pas'; [assembly: AssemblyTitle('Jedi.Graphics')] [assembly: AssemblyDescription('.NET graphic classes.')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] end. |
From: Marcel B. <jed...@us...> - 2004-11-24 10:35:22
|
Update of /cvsroot/jedidotnet/main/Nunit/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5049/main/Nunit/source Added Files: NUnit.Jedi.Strings.pas Nunit.Jedi.IO.PathHandling.pas Nunit.Jedi.IO.pas Log Message: Added unit tests for the Jedi.IO.Path class and Jedi.Strings.StringUtils class --- NEW FILE: Nunit.Jedi.IO.pas --- unit Nunit.Jedi.IO; interface type PathTestCases = class strict private class constructor Create; strict protected const sNormVolumeRoot = 'volume{0}{1}'; const sNormVolumeRoot2 = 'secondvolume{0}'; const sNormVolumeRootNoSlash = 'volume{0}'; const sNormInvalidVolumeRoot = '{1}path{1}volume{0}{1}'; const sNormInvalidRelativePathUpLevel = '..SubFolder2.2'; const sNormDeepVolumeRootedPath = 'volume{0}{1}MyRootFolder{1}SubFolder1{1}SubFolder1.1{1}SubFolder1.1.1'; const sNormVolumePath = 'primary{0}{1}PrimaryRoot{1}My Folder'; const sNormDeepRootedPath = '{1}MyRootFolder{1}SubFolder1{1}SubFolder1.1{1}SubFolder1.1.1'; const sNormRelativePath = 'SubFolder2{1}SubFolder2.1'; const sNormRelativePathUpLevel = '..{1}SubFolder2.2'; const sNormRelativePathUpTwoLevels = '..{1}..{1}SubFolder3{1}SubFolder3.1{1}SubFolder3.1.1{1}SubFolder3.1.4'; const sNormRelativePathUpTwoLevelsSep = '..{1}..{1}SubFolder4{1}SubFolder4.1{1}SubFolder4.1.1{1}SubFolder4.1.4'; const sNormStartWithThisPath = 'My Folder'; const sNormHasDottedFolderName = 'SubFolder5{1}.HiddenStuff'; const sNormWildcardedFile = '*.txt'; const sNormCombinedVolRootAndRelativePath = 'volume{0}{1}SubFolder2{1}SubFolder2.1'; const sNormCombinedDeepVolRootAndRelPathUpTwo = 'volume{0}{1}MyRootFolder{1}SubFolder1{1}SubFolder3{1}SubFolder3.1{1}SubFolder3.1.1{1}SubFolder3.1.4'; const sNormCombinedVolRoot2AndDeepRooted = 'secondvolume{0}{1}MyRootFolder{1}SubFolder1{1}SubFolder1.1{1}SubFolder1.1.1'; const sNormCombinedVolPathAndDeepRooted = 'primary{0}{1}MyRootFolder{1}SubFolder1{1}SubFolder1.1{1}SubFolder1.1.1'; const sNormCombinedRelAndRelPathUp = 'SubFolder2{1}SubFolder2.2'; public const sVolumeRoot = 'volume:\'; const sVolumeRoot2 = 'secondvolume:'; const sVolumeRootNoSlash = 'volume:'; const sInvalidVolumeRoot = '\path\volume:\'; const sInvalidRelativePathUpLevel = '..SubFolder2.2'; const sDeepVolumeRootedPath = 'volume:\MyRootFolder/SubFolder1\SubFolder1.1/SubFolder1.1.1\'; const sVolumePath = 'primary:/PrimaryRoot\My Folder'; const sDeepRootedPath = '\MyRootFolder/SubFolder1/\SubFolder1.1//SubFolder1.1.1\'; const sRelativePath = 'SubFolder2\SubFolder2.1'; const sRelativePathUpLevel = '..\SubFolder2.2'; const sRelativePathUpTwoLevels = '...\SubFolder3\SubFolder3.1\SubFolder3.1.1\SubFolder3.1.4'; const sRelativePathUpTwoLevelsSep = '..\..\SubFolder4\SubFolder4.1\SubFolder4.1.1\SubFolder4.1.4'; const sStartWithThisPath = '.\My Folder'; const sHasDottedFolderName = 'SubFolder5\.HiddenStuff'; const sWildcardedFile = '*.txt'; class var sVolumeRootNormalized: string; sVolumeRoot2Normalized: string; sVolumeRootNoSlashNormalized: string; sInvalidVolumeRootNormalized: string; sInvalidRelativePathUpLevelNormalized: string; sDeepVolumeRootedPathNormalized: string; sDeepRootedPathNormalized: string; sVolumePathNormalized: string; sRelativePathNormalized: string; sRelativePathUpLevelNormalized: string; sRelativePathUpTwoLevelsNormalized: string; sRelativePathUpTwoLevelsSepNormalized: string; sStartWithThisPathNormalized: string; sHasDottedFolderNameNormalized: string; sWildcardedFileNormalized: string; sCombinedVolRootAndRelativePath: string; sCombinedDeepVolRootAndRelPathUpTwo: string; sCombinedVolRoot2AndDeepRooted: string; sCombinedVolPathAndDeepRooted: string; sCombinedRelAndRelPathUp: string; end; implementation uses System.IO; class constructor PathTestCases.Create; begin sVolumeRootNormalized := System.String.Format(sNormVolumeRoot, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sVolumeRoot2Normalized := System.String.Format(sNormVolumeRoot2, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sVolumeRootNoSlashNormalized := System.String.Format(sNormVolumeRootNoSlash, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sInvalidVolumeRootNormalized := System.String.Format(sNormInvalidVolumeRoot, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sInvalidRelativePathUpLevelNormalized := System.String.Format(sNormInvalidRelativePathUpLevel, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sDeepVolumeRootedPathNormalized := System.String.Format(sNormDeepVolumeRootedPath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sDeepRootedPathNormalized := System.String.Format(sNormDeepRootedPath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sVolumePathNormalized := System.String.Format(sNormVolumePath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sRelativePathNormalized := System.String.Format(sNormRelativePath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sRelativePathUpLevelNormalized := System.String.Format(sNormRelativePathUpLevel, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sRelativePathUpTwoLevelsNormalized := System.String.Format(sNormRelativePathUpTwoLevels, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sRelativePathUpTwoLevelsSepNormalized := System.String.Format(sNormRelativePathUpTwoLevelsSep, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sStartWithThisPathNormalized := System.String.Format(sNormStartWithThisPath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sHasDottedFolderNameNormalized := System.String.Format(sNormHasDottedFolderName, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sWildcardedFileNormalized := System.String.Format(sNormWildcardedFile, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedVolRootAndRelativePath := System.String.Format(sNormCombinedVolRootAndRelativePath, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedDeepVolRootAndRelPathUpTwo := System.String.Format(sNormCombinedDeepVolRootAndRelPathUpTwo, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedVolRoot2AndDeepRooted := System.String.Format(sNormCombinedVolRoot2AndDeepRooted, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedVolPathAndDeepRooted := System.String.Format(sNormCombinedVolPathAndDeepRooted, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); sCombinedRelAndRelPathUp := System.String.Format(sNormCombinedRelAndRelPathUp, Path.VolumeSeparatorChar, Path.DirectorySeparatorChar); end; end. --- NEW FILE: Nunit.Jedi.IO.PathHandling.pas --- unit Nunit.Jedi.IO.PathHandling; interface uses System.IO, NUnit.Framework, Jedi.IO, Nunit.Jedi.IO; type [TestFixture] Normalize = class public [Test] procedure DeepVolumeRootedPath; [Test] procedure DeepRootedPath; [Test] procedure RelativePath; [Test] procedure RelativePathUpLevel; [Test] procedure RelativePathUpTwoLevels; [Test] procedure RelativePathUpTwoLevelsSep; [Test] procedure InvalidVolumeRoot; [Test] procedure InvalidRelativePathUpLevel; [Test] procedure VolumeRoot; [Test] procedure StartWithThisPath; [Test] procedure HasDottedFolderName; [Test] procedure WildcardedFile; end; [TestFixture] ValidityChecks = class public [Test] procedure DeepVolumeRootedPath; [Test] procedure DeepRootedPath; [Test] procedure RelativePath; [Test] procedure RelativePathUpLevel; [Test] procedure RelativePathUpTwoLevels; [Test] procedure RelativePathUpTwoLevelsSep; [Test] procedure InvalidVolumeRoot; [Test] procedure InvalidRelativePathUpLevel; [Test] procedure VolumeRoot; [Test] procedure StartWithThisPath; [Test] procedure HasDottedFolderName; [Test] procedure WildcardedFile; end; [TestFixture] Manipulations = class public [Test] procedure CombineTenPaths; [Test] procedure CombineTwo; [Test] procedure CombineTwoAbsolutePaths; end; [TestFixture] PathConfigurations = class public [Test] procedure TestConfiguration; end; implementation {$REGION 'Normalize'} procedure Normalize.DeepVolumeRootedPath; begin Assert.AreEqual(PathTestCases.sDeepVolumeRootedPathNormalized, Path.Normalize(PathTestCases.sDeepVolumeRootedPath)); end; procedure Normalize.DeepRootedPath; begin Assert.AreEqual(PathTestCases.sDeepRootedPathNormalized, Path.Normalize(PathTestCases.sDeepRootedPath)); end; procedure Normalize.RelativePath; begin Assert.AreEqual(PathTestCases.sRelativePathNormalized, Path.Normalize(PathTestCases.sRelativePath)); end; procedure Normalize.RelativePathUpLevel; begin Assert.AreEqual(PathTestCases.sRelativePathUpLevelNormalized, Path.Normalize(PathTestCases.sRelativePathUpLevel)); end; procedure Normalize.RelativePathUpTwoLevels; begin Assert.AreEqual(PathTestCases.sRelativePathUpTwoLevelsNormalized, Path.Normalize(PathTestCases.sRelativePathUpTwoLevels)); end; procedure Normalize.RelativePathUpTwoLevelsSep; begin Assert.AreEqual(PathTestCases.sRelativePathUpTwoLevelsSepNormalized, Path.Normalize(PathTestCases.sRelativePathUpTwoLevelsSep)); end; procedure Normalize.InvalidVolumeRoot; begin Assert.AreEqual(PathTestCases.sInvalidVolumeRootNormalized, Path.Normalize(PathTestCases.sInvalidVolumeRoot)); end; procedure Normalize.InvalidRelativePathUpLevel; begin Assert.AreEqual(PathTestCases.sInvalidRelativePathUpLevelNormalized, Path.Normalize(PathTestCases.sInvalidRelativePathUpLevel)); end; procedure Normalize.VolumeRoot; begin Assert.AreEqual(PathTestCases.sVolumeRootNormalized, Path.Normalize(PathTestCases.sVolumeRoot)); end; procedure Normalize.StartWithThisPath; begin Assert.AreEqual(PathTestCases.sStartWithThisPathNormalized, Path.Normalize(PathTestCases.sStartWithThisPath)); end; procedure Normalize.HasDottedFolderName; begin Assert.AreEqual(PathTestCases.sHasDottedFolderNameNormalized, Path.Normalize(PathTestCases.sHasDottedFolderName)); end; procedure Normalize.WildcardedFile; begin Assert.AreEqual(PathTestCases.sWildcardedFileNormalized, Path.Normalize(PathTestCases.sWildcardedFile)); end; {$ENDREGION} {$REGION 'ValidityChecks'} procedure ValidityChecks.DeepVolumeRootedPath; begin Assert.IsTrue(Jedi.IO.Path.IsValid(PathTestCases.sDeepVolumeRootedPath), 'IsValid({0}{{''{1}''}}) should be True', ['sDeepVolumeRootedPath', PathTestCases.sDeepVolumeRootedPath]); end; procedure ValidityChecks.DeepRootedPath; begin Assert.IsTrue(Jedi.IO.Path.IsValid(PathTestCases.sDeepRootedPath), 'IsValid({0}{{''{1}''}}) should be True', ['sDeepRootedPath', PathTestCases.sDeepRootedPath]); end; procedure ValidityChecks.RelativePath; begin Assert.IsTrue(Jedi.IO.Path.IsValid(PathTestCases.sRelativePath), 'IsValid({0}{{''{1}''}}) should be True', ['sRelativePath', PathTestCases.sRelativePath]); end; procedure ValidityChecks.RelativePathUpLevel; begin Assert.IsTrue(Jedi.IO.Path.IsValid(PathTestCases.sRelativePathUpLevel), 'IsValid({0}{{''{1}''}}) should be True', ['sRelativePathUpLevel', PathTestCases.sRelativePathUpLevel]); end; procedure ValidityChecks.RelativePathUpTwoLevels; begin Assert.IsTrue(Jedi.IO.Path.IsValid(PathTestCases.sRelativePathUpTwoLevels), 'IsValid({0}{{''{1}''}}) should be True', ['sRelativePathUpTwoLevels', PathTestCases.sRelativePathUpTwoLevels]); end; procedure ValidityChecks.RelativePathUpTwoLevelsSep; begin Assert.IsTrue(Jedi.IO.Path.IsValid(PathTestCases.sRelativePathUpTwoLevelsSep), 'IsValid({0}{{''{1}''}}) should be True', ['sRelativePathUpTwoLevelsSep', PathTestCases.sRelativePathUpTwoLevelsSep]); end; procedure ValidityChecks.InvalidVolumeRoot; begin Assert.IsFalse(Jedi.IO.Path.IsValid(PathTestCases.sInvalidVolumeRoot), 'IsValid({0}{{''{1}''}}) should be False', ['sInvalidVolumeRoot', PathTestCases.sInvalidVolumeRoot]); end; procedure ValidityChecks.InvalidRelativePathUpLevel; begin Assert.IsFalse(Jedi.IO.Path.IsValid(PathTestCases.sInvalidRelativePathUpLevel), 'IsValid({0}{{''{1}''}}) should be False', ['sInvalidRelativePathUpLevel', PathTestCases.sInvalidRelativePathUpLevel]); end; procedure ValidityChecks.VolumeRoot; begin Assert.IsTrue(Jedi.IO.Path.IsValid(PathTestCases.sVolumeRoot), 'IsValid({0}{{''{1}''}}) should be True', ['sVolumeRoot', PathTestCases.sVolumeRoot]); end; procedure ValidityChecks.StartWithThisPath; begin Assert.IsTrue(Jedi.IO.Path.IsValid(PathTestCases.sStartWithThisPath), 'IsValid({0}{{''{1}''}}) should be True', ['sStartWithThisPath', PathTestCases.sStartWithThisPath]); end; procedure ValidityChecks.HasDottedFolderName; begin Assert.IsTrue(Jedi.IO.Path.IsValid(PathTestCases.sHasDottedFolderName), 'IsValid({0}{{''{1}''}}) should be True', ['sHasDottedFolderName', PathTestCases.sHasDottedFolderName]); end; procedure ValidityChecks.WildcardedFile; begin Assert.IsFalse(Jedi.IO.Path.IsValid(PathTestCases.sWildcardedFile), 'IsValid({0}{{''{1}''}}) should be False', ['sWildcardedFile', PathTestCases.sWildcardedFile]); end; {$ENDREGION} {$REGION 'Manipulations'} procedure Manipulations.CombineTenPaths; begin Assert.AreEqual( System.String.Format('myvolume{0}{1}Root{1}Folder1{1}Folder1.1{1}Folder1.1.2{1}Folder1.1.2.1', System.IO.Path.VolumeSeparatorChar, System.IO.Path.DirectorySeparatorChar), Path.Combine(['dummy:NotAvailable\SubNotAvailable', '..\NotUsedEither', 'myvolume:\ignore', '\RootNotUsed\Ignore\Ignore2', '..\NotUsed', '\Root\Folder1\', '.\Folder1.1', 'Folder1.1.1\Folder1.1.1.1\Folder1.1.1.1.1\Folder1.1.1.1.1.1', '.....\Folder1.1.2', '.\Folder1.1.2.1'])); end; procedure Manipulations.CombineTwo; begin Assert.AreEqual( PathTestCases.sCombinedVolRootAndRelativePath, Jedi.IO.Path.Combine(PathTestCases.sVolumeRoot, PathTestCases.sRelativePath), 'Combine(sVolumeRoot, sRelativePath)'); Assert.AreEqual( PathTestCases.sCombinedDeepVolRootAndRelPathUpTwo, Jedi.IO.Path.Combine(PathTestCases.sDeepVolumeRootedPath, PathTestCases.sRelativePathUpTwoLevels), 'Combine(sDeepVolumeRootedPath, sRelativePathUpTwoLevels)'); Assert.AreEqual( PathTestCases.sCombinedRelAndRelPathUp, Jedi.IO.Path.Combine(PathTestCases.sRelativePath, PathTestCases.sRelativePathUpLevel), 'Combine(sRelativePath, sRelativePathUpLevel)'); end; procedure Manipulations.CombineTwoAbsolutePaths; begin Assert.AreEqual( PathTestCases.sCombinedVolRoot2AndDeepRooted, Jedi.IO.Path.Combine(PathTestCases.sVolumeRoot2, PathTestCases.sDeepRootedPath), 'Combine(sVolumeRoot2, sDeepRootedPath)'); Assert.AreEqual( PathTestCases.sCombinedVolPathAndDeepRooted, Jedi.IO.Path.Combine(PathTestCases.sVolumePath, PathTestCases.sDeepRootedPath), 'Combine(sVolumePath, sDeepRootedPath)'); Assert.AreEqual( PathTestCases.sDeepRootedPathNormalized, Jedi.IO.Path.Combine(PathTestCases.sRelativePath, PathTestCases.sDeepRootedPath), 'Combine(sRelativePath, sDeepRootedPath)'); end; {$ENDREGION} {$REGION 'PathConfigurations'} procedure PathConfigurations.TestConfiguration; begin Assert.AreEqual('myvolume#:folder1:folder2:folder3', Path.Normalize('myvolume#:folder1:folder2;folder3', Path.PathConfig.Create(':', ';', '#', ['$']))); end; {$ENDREGION} end. --- NEW FILE: NUnit.Jedi.Strings.pas --- unit NUnit.Jedi.Strings; interface uses Jedi.Strings, NUnit.Framework; type [TestFixture] TabSet = class strict protected TabSet1: StringUtils.TabSet; TabSet2: StringUtils.TabSet; TabSet3: StringUtils.TabSet; public [TestFixtureSetUp] procedure Init; [Test] procedure SimpleTabulation; [Test] procedure SpecifiedTabsWithAutoDefault; [Test] procedure SpecifiedTabsWithDefault; [Test] procedure CloneAndEqual; [Test] procedure RemovingTabs; [Test] procedure AddingTabs; [Test] procedure ConvertToString; end; [TestFixture] QuotedStrings = class strict protected const sSimpleTest = 'This is a simple test string.'; const sSimpleTestQuoted = '''This is a simple test string.'''; const sSimpleTestWithQuotes = 'This is a ''simple'' test string.'; const sSimpleTestWithQuotesQuoted = '''This is a ''''simple'''' test string.'''; const sSimpleTestWithOtherQuotes = 'This is a "simple" test string.'; const sSimpleTestWithOtherQuotesQuoted = '''This is a "simple" test string.'''; const sSimpleTestWithGarbageQuoted = '''This is a simple test string.'' With garbage.'; const sSimpleTestMissingEndQuote = '''This is a simple test string.'; const sComplexTest = 'Assuming single quotation ('') or double quotation (") this string '+ 'should always result in the roundtrip, regardless of actual used '+ 'quotation charachter. Scary combinations: ''''abc'''' and ""def""'; const sComplexTestQuoted = '''Assuming single quotation ('''') or double quotation (") this string '+ 'should always result in the roundtrip, regardless of actual used ' + 'quotation charachter. Scary combinations: ''''''''abc'''''''' and '+ '""def""'''; const sComplexTestAlternateQuoted = '"Assuming single quotation ('') or double quotation ("") this string '+ 'should always result in the roundtrip, regardless of actual used ' + 'quotation charachter. Scary combinations: ''''abc'''' and """"def"""""'; public [Test] procedure QuoteComplexString; [Test] procedure QuoteComplexStringWithAlternateQuoting; [Test] procedure QuoteSimpleString; [Test] procedure QuoteStringWithQuotes; [Test] procedure QuoteStringWithOtherQuotes; [Test] procedure RoundtripSimpleString; [Test] procedure RoundtripStringWithQuotes; [Test] procedure RoundtripStringWithOtherQuotes; [Test] procedure RoundtripComplexString; [Test] procedure RoundtripComplexStringWithAlternateQuoting; [ExpectedException(TypeOf(FormatException), 'String ends in garbage.')] [Test] procedure DequoteStringWithGarbage; [ExpectedException(TypeOf(FormatException), 'End quote missing.')] [Test] procedure DequoteStringWithoutEndQuote; [Test] procedure DequoteStringWithAllowedGarbage; [Test] procedure DequoteStringAllowedMissingEndQuote; [Test] procedure DequoteStringCheckGarbage; [Test] procedure DequoteStringCheckEndQuote; [Test] procedure DequoteNonQuotedString; end; [TestFixture] Substrings = class strict protected const sDelimTest = '|Abc(def){ghi}.jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestBeforeParenthesis = '|Abc'; const sDelimTestBeforeBrace = '|Abc(def)'; const sDelimTestBeforeDot = '|Abc(def){ghi}.'; const sDelimTestBeforeSemiColon = '|Abc(def){ghi}.jkl'; const sDelimTestBeforeEquals = '|Abc(def){ghi}.jkl;mno'; const sDelimTestBeforeLastEquals = '|Abc(def){ghi}.jkl;mno'; const sDelimTestBeforeLastParenthesis = '|Abc(def){ghi}.jkl;mno='; const sDelimTestBeforeLastBrace = '|Abc(def){ghi}.jkl;mno=(pqr)'; const sDelimTestBeforeLastDot = '|Abc(def){ghi}.jkl;mno=(pqr){stu}'; const sDelimTestBeforeLastSemiColon = '|Abc(def){ghi}.jkl;mno=(pqr){stu}.vwx'; const sDelimTestBeforeLastPipe = '|Abc(def){ghi}.jkl;mno=(pqr){stu}.vwx;yz'; const sDelimTestAfterFirstPipe = 'Abc(def){ghi}.jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstParenthesis = 'def){ghi}.jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstBrace = 'ghi}.jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstDot = 'jkl;mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstSemiColon = 'mno=(pqr){stu}.vwx;yz|'; const sDelimTestAfterFirstEquals = '(pqr){stu}.vwx;yz|'; const sDelimTestAfterEquals = '(pqr){stu}.vwx;yz|'; const sDelimTestAfterParenthesis = 'pqr){stu}.vwx;yz|'; const sDelimTestAfterBrace = 'stu}.vwx;yz|'; const sDelimTestAfterDot = 'vwx;yz|'; const sDelimTestAfterSemiColon = 'yz|'; const sSliceTest = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; public [Test] procedure AfterSingleDelimiter; [Test] procedure AfterMultipleDelimiters; [Test] procedure AfterLastSingleDelimiter; [Test] procedure AfterLastMultipleDelimiters; [Test] procedure BeforeSingleDelimiter; [Test] procedure BeforeMultipleDelimiters; [Test] procedure BeforeLastSingleDelimiter; [Test] procedure BeforeLastMultipleDelimiters; [Test] procedure Left; [Test] procedure Mid; [Test] procedure Right; end; [TestFixture] Manipulations = class strict protected const sTabTest1 = 'Abc'#9'Def Ghi'#9'Jkl'#9#9'Mno'#9#9#9'Pqr'; const sTabTest2 = #9'Abc'#9'Def Ghi'#9'Jkl'#9#9'Mno'#9#9#9'Pqr'; // 1 2 3 4 5 6 7 // 01234567890123456789012345678901234567890123456789012345678901234567890123456789 const sTabTest1Output1 = 'Abc Def Ghi Jkl Mno Pqr'; const sTabTest1Output2 = 'Abc Def Ghi Jkl Mno Pqr'; const sTabTest1Output3 = 'Abc Def Ghi Jkl Mno Pqr'; const sTabTest2Output1 = ' Abc Def Ghi Jkl Mno Pqr'; const sTabTest2Output2 = ' Abc Def Ghi Jkl Mno Pqr'; const sTabTest2Output3 = ' Abc Def Ghi Jkl Mno Pqr'; strict protected const sTest1 = '***abc***def***ghi***'; const sTest1Output = '*abc*def*ghi*'; strict protected const sRepeatInput = 'ab(cd)ef'; const sRepeatOutput0 = ''; const sRepeatOutput1 = 'ab(cd)ef'; const sRepeatOutput10 = 'ab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)efab(cd)ef'; public [Test] procedure ExpandTabs; [Test] procedure RemoveDuplicates; [Test] procedure &Repeat; end; implementation {$REGION 'TabSet'} procedure TabSet.ConvertToString; begin Assert.AreEqual('[]+2', TabSet1.ToString, 'TabSet1.ToString'); Assert.AreEqual('[15,20,40,44]+4 (automatic)', TabSet2.ToString, 'TabSet2.ToString'); Assert.AreEqual('[15,20,40,44]+2', TabSet3.ToString, 'TabSet3.ToString'); Assert.AreEqual('[]+2 (automatic)', StringUtils.TabSet.Create.ToString, 'StringUtils.TabSet.Create.ToString'); end; procedure TabSet.Init; begin TabSet1 := StringUtils.TabSet.Create(2); TabSet2 := StringUtils.TabSet.Create([15, 20, 40, 44]); TabSet3 := StringUtils.TabSet.Create([15, 20, 40, 44], 2); end; procedure TabSet.SimpleTabulation; begin // TabSet1 should always tabulate to even positions Assert.AreEqual(TabSet1.TabFrom(1), 2); Assert.AreEqual(TabSet1.TabFrom(2), 4); Assert.AreEqual(TabSet1.TabFrom(3), 4); Assert.AreEqual(TabSet1.TabFrom(51), 52); Assert.AreEqual(TabSet1.TabFrom(52), 54); end; procedure TabSet.SpecifiedTabsWithAutoDefault; var i: Integer; begin // TabSet2 will tabulate to 15, 20, 40 and 44. Beyond that it will tabulate to a multiple of 4 (44-40) for i := 0 to 14 do Assert.AreEqual(TabSet2.TabFrom(i), 15, 'Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(TabSet2.TabFrom(i), 20, 'Tabulate from {0}', [i]); for i := 20 to 39 do Assert.AreEqual(TabSet2.TabFrom(i), 40, 'Tabulate from {0}', [i]); for i := 40 to 43 do Assert.AreEqual(TabSet2.TabFrom(i), 44, 'Tabulate from {0}', [i]); for i := 44 to 47 do Assert.AreEqual(TabSet2.TabFrom(i), 48, 'Tabulate from {0}', [i]); for i := 48 to 51 do Assert.AreEqual(TabSet2.TabFrom(i), 52, 'Tabulate from {0}', [i]); end; procedure TabSet.SpecifiedTabsWithDefault; var i: Integer; begin // TabSet2 will tabulate to 15, 20, 40 and 44. Beyond that it will tabulate to a multiple of 2 for i := 0 to 14 do Assert.AreEqual(TabSet3.TabFrom(i), 15, 'Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(TabSet3.TabFrom(i), 20, 'Tabulate from {0}', [i]); for i := 20 to 39 do Assert.AreEqual(TabSet3.TabFrom(i), 40, 'Tabulate from {0}', [i]); for i := 40 to 43 do Assert.AreEqual(TabSet3.TabFrom(i), 44, 'Tabulate from {0}', [i]); for i := 44 to 45 do Assert.AreEqual(TabSet3.TabFrom(i), 46, 'Tabulate from {0}', [i]); for i := 46 to 47 do Assert.AreEqual(TabSet3.TabFrom(i), 48, 'Tabulate from {0}', [i]); for i := 48 to 49 do Assert.AreEqual(TabSet3.TabFrom(i), 50, 'Tabulate from {0}', [i]); for i := 50 to 51 do Assert.AreEqual(TabSet3.TabFrom(i), 52, 'Tabulate from {0}', [i]); end; procedure TabSet.CloneAndEqual; var tempSet: StringUtils.TabSet; begin tempSet := StringUtils.TabSet(TabSet1.Clone); Assert.AreNotSame(TabSet1, tempSet); Assert.AreEqual(TabSet1, tempSet, 'Cloned'); tempSet.Add(2); Assert.AreEqual(TabSet1, tempSet, 'TabPos=[2], DefaultWidth=2'); tempSet.DefaultWidth := 0; Assert.AreEqual(TabSet1, tempSet, 'TabPos=[2], DefaultWidth=0 (automatic)'); tempSet.Add(4); Assert.AreEqual(TabSet1, tempSet, 'TabPos=[2,4], DefaultWidth=0 (automatic)'); tempSet.Clear; Assert.AreEqual(TabSet1, tempSet, 'TabPos=[], DefaultWidth=0 (automatic)'); end; procedure TabSet.RemovingTabs; var tempSet: StringUtils.TabSet; i: Integer; begin tempSet := StringUtils.TabSet(TabSet2.Clone); tempSet.Remove(20); for i := 0 to 14 do Assert.AreEqual(tempSet.TabFrom(i), 15, 'Removed 20; Tabulate from {0}', [i]); for i := 15 to 39 do Assert.AreEqual(tempSet.TabFrom(i), 40, 'Removed 20; Tabulate from {0}', [i]); for i := 40 to 43 do Assert.AreEqual(tempSet.TabFrom(i), 44, 'Removed 20; Tabulate from {0}', [i]); for i := 44 to 47 do Assert.AreEqual(tempSet.TabFrom(i), 48, 'Removed 20; Tabulate from {0}', [i]); for i := 48 to 51 do Assert.AreEqual(tempSet.TabFrom(i), 52, 'Removed 20; Tabulate from {0}', [i]); for i := 52 to 55 do Assert.AreEqual(tempSet.TabFrom(i), 56, 'Removed 20; Tabulate from {0}', [i]); for i := 56 to 59 do Assert.AreEqual(tempSet.TabFrom(i), 60, 'Removed 20; Tabulate from {0}', [i]); tempSet := StringUtils.TabSet(TabSet2.Clone); tempSet.Remove(40); for i := 0 to 14 do Assert.AreEqual(tempSet.TabFrom(i), 15, 'Removed 40; Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(tempSet.TabFrom(i), 20, 'Removed 40; Tabulate from {0}', [i]); for i := 20 to 43 do Assert.AreEqual(tempSet.TabFrom(i), 44, 'Removed 40; Tabulate from {0}', [i]); for i := 44 to 67 do Assert.AreEqual(tempSet.TabFrom(i), 68, 'Removed 40; Tabulate from {0}', [i]); for i := 68 to 91 do Assert.AreEqual(tempSet.TabFrom(i), 92, 'Removed 40; Tabulate from {0}', [i]); for i := 92 to 115 do Assert.AreEqual(tempSet.TabFrom(i), 116, 'Removed 40; Tabulate from {0}', [i]); for i := 116 to 139 do Assert.AreEqual(tempSet.TabFrom(i), 140, 'Removed 40; Tabulate from {0}', [i]); tempSet := StringUtils.TabSet(TabSet2.Clone); tempSet.Remove(40, True); for i := 0 to 14 do Assert.AreEqual(tempSet.TabFrom(i), 15, 'Removed 40+; Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(tempSet.TabFrom(i), 20, 'Removed 40+; Tabulate from {0}', [i]); for i := 20 to 24 do Assert.AreEqual(tempSet.TabFrom(i), 25, 'Removed 40+; Tabulate from {0}', [i]); for i := 25 to 29 do Assert.AreEqual(tempSet.TabFrom(i), 30, 'Removed 40+; Tabulate from {0}', [i]); for i := 30 to 34 do Assert.AreEqual(tempSet.TabFrom(i), 35, 'Removed 40+; Tabulate from {0}', [i]); for i := 35 to 39 do Assert.AreEqual(tempSet.TabFrom(i), 40, 'Removed 40+; Tabulate from {0}', [i]); for i := 40 to 44 do Assert.AreEqual(tempSet.TabFrom(i), 45, 'Removed 40+; Tabulate from {0}', [i]); end; procedure TabSet.AddingTabs; var tempSet: StringUtils.TabSet; tempSet2: StringUtils.TabSet; i: Integer; begin tempSet := StringUtils.TabSet(TabSet2.Clone); tempSet.Add(42); for i := 0 to 14 do Assert.AreEqual(tempSet.TabFrom(i), 15, 'Added 42; Tabulate from {0}', [i]); for i := 15 to 19 do Assert.AreEqual(tempSet.TabFrom(i), 20, 'Added 42; Tabulate from {0}', [i]); for i := 20 to 39 do Assert.AreEqual(tempSet.TabFrom(i), 40, 'Added 42; Tabulate from {0}', [i]); for i := 40 to 41 do Assert.AreEqual(tempSet.TabFrom(i), 42, 'Added 42; Tabulate from {0}', [i]); for i := 42 to 43 do Assert.AreEqual(tempSet.TabFrom(i), 44, 'Added 42; Tabulate from {0}', [i]); for i := 44 to 45 do Assert.AreEqual(tempSet.TabFrom(i), 46, 'Added 42; Tabulate from {0}', [i]); for i := 46 to 47 do Assert.AreEqual(tempSet.TabFrom(i), 48, 'Added 42; Tabulate from {0}', [i]); for i := 48 to 49 do Assert.AreEqual(tempSet.TabFrom(i), 50, 'Added 42; Tabulate from {0}', [i]); for i := 50 to 51 do Assert.AreEqual(tempSet.TabFrom(i), 52, 'Added 42; Tabulate from {0}', [i]); tempSet2 := StringUtils.TabSet.Create([40, 20, 15], 2); Assert.AreEqual(tempSet2, tempSet); end; {$ENDREGION} {$REGION 'QuotedStrings'} procedure QuotedStrings.QuoteComplexString; var s: string; begin s := StringUtils.QuoteString(sComplexTest, ''''); Assert.AreEqual(s, sComplexTestQuoted); end; procedure QuotedStrings.QuoteComplexStringWithAlternateQuoting; var s: string; begin s := StringUtils.QuoteString(sComplexTest, '"'); Assert.AreEqual(s, sComplexTestAlternateQuoted); end; procedure QuotedStrings.QuoteSimpleString; var s: string; begin s := StringUtils.QuoteString(sSimpleTest); Assert.AreEqual(sSimpleTestQuoted, s); end; procedure QuotedStrings.QuoteStringWithQuotes; var s: string; begin s := StringUtils.QuoteString(sSimpleTestWithQuotes); Assert.AreEqual(sSimpleTestWithQuotesQuoted, s); end; procedure QuotedStrings.QuoteStringWithOtherQuotes; var s: string; begin s := StringUtils.QuoteString(sSimpleTestWithOtherQuotes); Assert.AreEqual(sSimpleTestWithOtherQuotesQuoted, s); end; procedure QuotedStrings.RoundtripSimpleString; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sSimpleTest)); Assert.AreEqual(sSimpleTest, s); end; procedure QuotedStrings.RoundtripStringWithOtherQuotes; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sSimpleTestWithOtherQuotes)); Assert.AreEqual(sSimpleTestWithOtherQuotes, s); end; procedure QuotedStrings.RoundtripStringWithQuotes; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sSimpleTestWithQuotes)); Assert.AreEqual(sSimpleTestWithQuotes, s); end; procedure QuotedStrings.RoundtripComplexString; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sComplexTest, '''')); Assert.AreEqual(s, sComplexTest); end; procedure QuotedStrings.RoundtripComplexStringWithAlternateQuoting; var s: string; begin s := StringUtils.ExtractQuotedString(StringUtils.QuoteString(sComplexTest, '"')); Assert.AreEqual(s, sComplexTest); end; procedure QuotedStrings.DequoteStringWithGarbage; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTestWithGarbageQuoted); Assert.Fail('Should result in an exception. Resulting string={0}', [s]); end; procedure QuotedStrings.DequoteStringWithoutEndQuote; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTestMissingEndQuote); Assert.Fail('Should result in an exception. Resulting string={0}', [s]); end; procedure QuotedStrings.DequoteStringWithAllowedGarbage; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTestWithGarbageQuoted, ExtractQuotedStringFlags.IgnoreGarbage or ExtractQuotedStringFlags.EndQuoteMandetory); Assert.AreEqual(sSimpleTest, s, 'actual garbage'); s := StringUtils.ExtractQuotedString(sSimpleTestQuoted, ExtractQuotedStringFlags.IgnoreGarbage or ExtractQuotedStringFlags.EndQuoteMandetory); Assert.AreEqual(sSimpleTest, s, 'no actual garbage'); end; procedure QuotedStrings.DequoteStringAllowedMissingEndQuote; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTestMissingEndQuote, ExtractQuotedStringFlags.IgnoreGarbage); Assert.AreEqual(sSimpleTest, s, 'end quote actually missing'); s := StringUtils.ExtractQuotedString(sSimpleTestQuoted, ExtractQuotedStringFlags.IgnoreGarbage); Assert.AreEqual(sSimpleTest, s, 'end quote provided'); end; procedure QuotedStrings.DequoteStringCheckGarbage; var s: string; i: Integer; begin s := StringUtils.ExtractQuotedString(sSimpleTestWithGarbageQuoted, i); Assert.AreEqual(sSimpleTest, s); Assert.AreEqual(sSimpleTestWithGarbageQuoted.LastIndexOf(''''), i); end; procedure QuotedStrings.DequoteStringCheckEndQuote; var s: string; i: Integer; begin s := StringUtils.ExtractQuotedString(sSimpleTestMissingEndQuote, i); Assert.AreEqual(sSimpleTest, s); Assert.AreEqual(not sSimpleTestMissingEndQuote.Length, i); end; procedure QuotedStrings.DequoteNonQuotedString; var s: string; begin s := StringUtils.ExtractQuotedString(sSimpleTest); Assert.AreEqual(sSimpleTest, s); s := StringUtils.ExtractQuotedString(sSimpleTestWithQuotes); Assert.AreEqual(sSimpleTestWithQuotes, s); end; {$ENDREGION} {$REGION 'Substrings'} procedure Substrings.AfterSingleDelimiter; var s: string; begin s := StringUtils.After(sDelimTest, '='); Assert.AreEqual(sDelimTestAfterFirstEquals, s); s := StringUtils.After(sDelimTest, '('); Assert.AreEqual(sDelimTestAfterFirstParenthesis, s); s := StringUtils.After(sDelimTest, '{'); Assert.AreEqual(sDelimTestAfterFirstBrace, s); s := StringUtils.After(sDelimTest, ' '); Assert.AreEqual('', s); s := StringUtils.After(sDelimTest, '|'); Assert.AreEqual(sDelimTestAfterFirstPipe, s); end; procedure Substrings.AfterMultipleDelimiters; var s: string; begin s := StringUtils.AfterAnyOf(sDelimTest, '={'.ToCharArray); Assert.AreEqual(sDelimTestAfterFirstBrace, s); s := StringUtils.AfterAnyOf(sDelimTest, ' =;'.ToCharArray); Assert.AreEqual(sDelimTestAfterFirstSemiColon, s); s := StringUtils.AfterAnyOf(sDelimTest, ';.{(='.ToCharArray); Assert.AreEqual(sDelimTestAfterFirstParenthesis, s); s := StringUtils.AfterAnyOf(sDelimTest, ' %$#&*_+-'.ToCharArray); Assert.AreEqual('', s); end; procedure Substrings.AfterLastSingleDelimiter; var s: string; begin s := StringUtils.AfterLast(sDelimTest, '='); Assert.AreEqual(sDelimTestAfterEquals, s); s := StringUtils.AfterLast(sDelimTest, '('); Assert.AreEqual(sDelimTestAfterParenthesis, s); s := StringUtils.AfterLast(sDelimTest, '{'); Assert.AreEqual(sDelimTestAfterBrace, s); s := StringUtils.AfterLast(sDelimTest, ' '); Assert.AreEqual('', s); s := StringUtils.AfterLast(sDelimTest, '|'); Assert.AreEqual('', s); end; procedure Substrings.AfterLastMultipleDelimiters; var s: string; begin s := StringUtils.AfterLastAnyOf(sDelimTest, '={'.ToCharArray); Assert.AreEqual(sDelimTestAfterBrace, s); s := StringUtils.AfterLastAnyOf(sDelimTest, ' =.'.ToCharArray); Assert.AreEqual(sDelimTestAfterDot, s); s := StringUtils.AfterLastAnyOf(sDelimTest, ';.{(='.ToCharArray); Assert.AreEqual(sDelimTestAfterSemiColon, s); s := StringUtils.AfterLastAnyOf(sDelimTest, ' %$#&*_+-'.ToCharArray); Assert.AreEqual('', s); end; procedure Substrings.BeforeSingleDelimiter; var s: string; begin s := StringUtils.Before(sDelimTest, '='); Assert.AreEqual(sDelimTestBeforeEquals, s); s := StringUtils.Before(sDelimTest, '('); Assert.AreEqual(sDelimTestBeforeParenthesis, s); s := StringUtils.Before(sDelimTest, '{'); Assert.AreEqual(sDelimTestBeforeBrace, s); s := StringUtils.Before(sDelimTest, ' '); Assert.AreEqual(sDelimTest, s); s := StringUtils.Before(sDelimTest, '|'); Assert.AreEqual('', s); end; procedure Substrings.BeforeMultipleDelimiters; var s: string; begin s := StringUtils.BeforeAnyOf(sDelimTest, '={'.ToCharArray); Assert.AreEqual(sDelimTestBeforeBrace, s); s := StringUtils.BeforeAnyOf(sDelimTest, ' =;'.ToCharArray); Assert.AreEqual(sDelimTestBeforeSemiColon, s); s := StringUtils.BeforeAnyOf(sDelimTest, ';.{(='.ToCharArray); Assert.AreEqual(sDelimTestBeforeParenthesis, s); s := StringUtils.BeforeAnyOf(sDelimTest, ' %$#&*_+-'.ToCharArray); Assert.AreEqual(sDelimTest, s); end; procedure Substrings.BeforeLastSingleDelimiter; var s: string; begin s := StringUtils.BeforeLast(sDelimTest, '='); Assert.AreEqual(sDelimTestBeforeLastEquals, s); s := StringUtils.BeforeLast(sDelimTest, '('); Assert.AreEqual(sDelimTestBeforeLastParenthesis, s); s := StringUtils.BeforeLast(sDelimTest, '{'); Assert.AreEqual(sDelimTestBeforeLastBrace, s); s := StringUtils.BeforeLast(sDelimTest, ' '); Assert.AreEqual(sDelimTest, s); s := StringUtils.BeforeLast(sDelimTest, '|'); Assert.AreEqual(sDelimTestBeforeLastPipe, s); end; procedure Substrings.BeforeLastMultipleDelimiters; var s: string; begin s := StringUtils.BeforeLastAnyOf(sDelimTest, '={'.ToCharArray); Assert.AreEqual(sDelimTestBeforeLastBrace, s); s := StringUtils.BeforeLastAnyOf(sDelimTest, ' =;'.ToCharArray); Assert.AreEqual(sDelimTestBeforeLastSemiColon, s); s := StringUtils.BeforeLastAnyOf(sDelimTest, ';.{(='.ToCharArray); Assert.AreEqual(sDelimTestBeforeLastSemiColon, s); s := StringUtils.BeforeLastAnyOf(sDelimTest, ' %$#&*_+-'.ToCharArray); Assert.AreEqual(sDelimTest, s); end; procedure Substrings.Left; var s: string; begin s := StringUtils.Left(sSliceTest, 10); Assert.AreEqual('0123456789', s); end; procedure Substrings.Mid; var s: string; begin s := StringUtils.Mid(sSliceTest, 10, 14); Assert.AreEqual('ABCDE', s); end; procedure Substrings.Right; var s: string; begin s := StringUtils.Right(sSliceTest, 10); Assert.AreEqual('qrstuvwxyz', s); end; {$ENDREGION} {$REGION 'Manipulations'} procedure Manipulations.ExpandTabs; var tabSet1: StringUtils.TabSet; tabSet2: StringUtils.TabSet; tabSet3: StringUtils.TabSet; begin tabSet1 := StringUtils.TabSet.Create(2); tabSet2 := StringUtils.TabSet.Create([15, 20, 40, 44]); tabSet3 := StringUtils.TabSet.Create([15, 20, 40, 44], 2); Assert.AreEqual(sTabTest1Output1, StringUtils.ExpandTabs(sTabTest1, tabSet1), 'sTabTest1Output1'); Assert.AreEqual(sTabTest2Output1, StringUtils.ExpandTabs(sTabTest2, tabSet1), 'sTabTest2Output1'); Assert.AreEqual(sTabTest1Output2, StringUtils.ExpandTabs(sTabTest1, tabSet2), 'sTabTest1Output2'); Assert.AreEqual(sTabTest2Output2, StringUtils.ExpandTabs(sTabTest2, tabSet2), 'sTabTest2Output2'); Assert.AreEqual(sTabTest1Output3, StringUtils.ExpandTabs(sTabTest1, tabSet3), 'sTabTest1Output3'); Assert.AreEqual(sTabTest2Output3, StringUtils.ExpandTabs(sTabTest2, tabSet3), 'sTabTest2Output3'); end; procedure Manipulations.RemoveDuplicates; begin Assert.AreEqual(sTest1Output, StringUtils.RemoveDuplicateChars(sTest1, '*'), 'sTest1'); end; procedure Manipulations.&Repeat; begin Assert.AreEqual(sRepeatOutput0, StringUtils.&Repeat(sRepeatInput, 0), 'Count=0'); Assert.AreEqual(sRepeatOutput1, StringUtils.&Repeat(sRepeatInput, 1), 'Count=1'); Assert.AreEqual(sRepeatOutput10, StringUtils.&Repeat(sRepeatInput, 10), 'Count=10'); end; {$ENDREGION} end. |
Update of /cvsroot/jedidotnet/main/Nunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5049/main/Nunit Added Files: Nunit.Jedi.Persistence.bdsproj Nunit.Jedi.Persistence.dpk Nunit.Jedi.Results.xml Nunit.Jedi.Text.bdsproj Nunit.Jedi.Text.dpk Nunit.Jedi.nunit Log Message: Added unit tests for the Jedi.IO.Path class and Jedi.Strings.StringUtils class --- NEW FILE: Nunit.Jedi.Text.bdsproj --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Nunit.Jedi.Persistence.dpk --- package Nunit.Jedi.Persistence; {$ALIGN 0} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$IMPLICITBUILD OFF} requires Borland.Delphi, nunit.framework, Jedi.Persistence; contains Nunit.Jedi.IO in 'source\Nunit.Jedi.IO.pas', Nunit.Jedi.IO.PathHandling in 'source\Nunit.Jedi.IO.PathHandling.pas'; [assembly: AssemblyDescription('')] [assembly: AssemblyConfiguration('')] [assembly: AssemblyCompany('')] [assembly: AssemblyProduct('')] [assembly: AssemblyCopyright('')] [assembly: AssemblyTrademark('')] [assembly: AssemblyCulture('')] // The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. // You can set this in the IDE via the Project Options. // Manually setting the AssemblyTitle attribute below will override the IDE // setting. // [assembly: AssemblyTitle('')] // // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion('1.0.*')] // // In order to sign your assembly you must specify a key to use. Refer to the // Microsoft .NET Framework documentation for more information on assembly signing. // // Use the attributes below to control which key is used for signing. // // Notes: // (*) If no key is specified, the assembly is not signed. // (*) KeyName refers to a key that has been installed in the Crypto Service // Provider (CSP) on your machine. KeyFile refers to a file which contains // a key. // (*) If the KeyFile and the KeyName values are both specified, the // following processing occurs: // (1) If the KeyName can be found in the CSP, that key is used. // (2) If the KeyName does not exist and the KeyFile does exist, the key // in the KeyFile is installed into the CSP and used. // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. // When specifying the KeyFile, the location of the KeyFile should be // relative to the project output directory. For example, if your KeyFile is // located in the project directory, you would specify the AssemblyKeyFile // attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output // directory is the project directory (the default). // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework // documentation for more information on this. // [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] end. --- NEW FILE: Nunit.Jedi.nunit --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Nunit.Jedi.Persistence.bdsproj --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Nunit.Jedi.Text.dpk --- package Nunit.Jedi.Text; {$ALIGN 0} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$IMPLICITBUILD OFF} requires Borland.Delphi, nunit.framework, Jedi.Text; contains NUnit.Jedi.Strings in 'source\NUnit.Jedi.Strings.pas'; [assembly: AssemblyDescription('')] [assembly: AssemblyConfiguration('')] [assembly: AssemblyCompany('')] [assembly: AssemblyProduct('')] [assembly: AssemblyCopyright('')] [assembly: AssemblyTrademark('')] [assembly: AssemblyCulture('')] // The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. // You can set this in the IDE via the Project Options. // Manually setting the AssemblyTitle attribute below will override the IDE // setting. // [assembly: AssemblyTitle('')] // // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion('1.0.*')] // // In order to sign your assembly you must specify a key to use. Refer to the // Microsoft .NET Framework documentation for more information on assembly signing. // // Use the attributes below to control which key is used for signing. // // Notes: // (*) If no key is specified, the assembly is not signed. // (*) KeyName refers to a key that has been installed in the Crypto Service // Provider (CSP) on your machine. KeyFile refers to a file which contains // a key. // (*) If the KeyFile and the KeyName values are both specified, the // following processing occurs: // (1) If the KeyName can be found in the CSP, that key is used. // (2) If the KeyName does not exist and the KeyFile does exist, the key // in the KeyFile is installed into the CSP and used. // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. // When specifying the KeyFile, the location of the KeyFile should be // relative to the project output directory. For example, if your KeyFile is // located in the project directory, you would specify the AssemblyKeyFile // attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output // directory is the project directory (the default). // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework // documentation for more information on this. // [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] end. --- NEW FILE: Nunit.Jedi.Results.xml --- (This appears to be a binary file; contents omitted.) |
From: Marcel B. <jed...@us...> - 2004-11-24 10:32:56
|
Update of /cvsroot/jedidotnet/main/Nunit/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4575/source Log Message: Directory /cvsroot/jedidotnet/main/Nunit/source added to the repository |
From: Marcel B. <jed...@us...> - 2004-11-24 10:32:32
|
Update of /cvsroot/jedidotnet/main/Nunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4521/Nunit Log Message: Directory /cvsroot/jedidotnet/main/Nunit added to the repository |
From: Marcel B. <jed...@us...> - 2004-11-24 10:31:59
|
Update of /cvsroot/jedidotnet/main/assemblies In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4384/main/assemblies Added Files: Jedi.Persistence.bdsproj Jedi.Persistence.dpk Jedi.Text.bdsproj Jedi.Text.dpk Log Message: * Added StringUtils class (static methods to expand tabs, extract quoted strings, quote strings, retrieve sections of strings (before dellimiter, after delimiter) amd repeat strings. * Added Path class (static methods to normalize paths, combine multiple (relative) paths into one absolute path) --- NEW FILE: Jedi.Persistence.dpk --- package Jedi.Persistence; {$ALIGN 0} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$IMPLICITBUILD OFF} requires Borland.Delphi, Jedi.Text; contains Jedi.IO in '..\run\Jedi.IO.pas'; [assembly: AssemblyTitle('Jedi.Persistence')] [assembly: AssemblyDescription('.NET persistency classes.')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] end. --- NEW FILE: Jedi.Text.dpk --- package Jedi.Text; {$ALIGN 0} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$IMPLICITBUILD OFF} requires Borland.Delphi; contains Jedi.Strings in '..\run\Jedi.Strings.pas'; [assembly: AssemblyTitle('Jedi.Text')] [assembly: AssemblyDescription('.NET text classes.')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] end. --- NEW FILE: Jedi.Text.bdsproj --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Jedi.Persistence.bdsproj --- (This appears to be a binary file; contents omitted.) |
From: Marcel B. <jed...@us...> - 2004-11-24 10:31:58
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4384/main/run Added Files: Jedi.IO.pas Jedi.Strings.pas Log Message: * Added StringUtils class (static methods to expand tabs, extract quoted strings, quote strings, retrieve sections of strings (before dellimiter, after delimiter) amd repeat strings. * Added Path class (static methods to normalize paths, combine multiple (relative) paths into one absolute path) --- NEW FILE: Jedi.Strings.pas --- {--------------------------------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: Jedi.Strings.pas, released on 2004-11-24. The Initial Developer of the Original Code is Marcel Bestebroer Portions created by Marcel Bestebroer are Copyright (C) 2004 Marcel Bestebroer All Rights Reserved. Contributor(s): You may retrieve the latest version of this file at the JEDI.NET home page, located at http://sf.net/projects/jedidotnet Known Issues: ---------------------------------------------------------------------------------------------------} // $Id: Jedi.Strings.pas,v 1.1 2004/11/24 10:31:41 jedi_mbe Exp $ unit Jedi.Strings; interface {$REGION 'interface uses'} uses System.Collections, System.Text; {$ENDREGION} {$REGION 'String utilities'} type [Flags] ExtractQuotedStringFlags = (Default = 0, IgnoreGarbage = 1, EndQuoteMandetory = 2); StringUtils = class {$REGION 'TabSet class'} public type TabSet = class (&Object, ICloneable) strict private FTabs: ArrayList; FDefaultWidth: Integer; FUpdateCount: Integer; strict protected function IsAutoWidth: Boolean; function IsUpdating: Boolean; procedure RecalcDefaultWidth; public constructor Create; overload; constructor Create(defaultWidth: Integer); overload; constructor Create(tabs: array of Integer); overload; constructor Create(tabs: array of Integer; defaultWidth: Integer); overload; procedure Add(tabPosition: Integer); procedure BeginUpdate; procedure Clear; function Clone: &Object; virtual; procedure EndUpdate; function Equals(obj: &Object): Boolean; override; function RealDefaultWidth: Integer; procedure Remove(tabPosition: Integer; includeFollowing: Boolean = False); procedure RemoveAt(index: Integer; includeFollowing: Boolean = False); function TabFrom(pos: Integer): Integer; function get_Count: Integer; function get_DefaultWidth: Integer; function get_Tabs(index: Integer): Integer; procedure set_Tabs(index: Integer; value: Integer); procedure set_DefaultWidth(value: Integer); function ToString: string; override; property Count: Integer read get_Count; property DefaultWidth: Integer read get_DefaultWidth write set_DefaultWidth; property Tabs[index: Integer]: Integer read get_Tabs write set_Tabs; default; end; {$ENDREGION} strict protected constructor Create; public class function After(s: string; delimiter: System.Char): string; static; class function AfterAnyOf(s: string; delimiters: array of System.Char): string; static; class function AfterLast(s: string; delimiter: System.Char): string; static; class function AfterLastAnyOf(s: string; delimiters: array of System.Char): string; static; class function Before(s: string; delimiter: System.Char): string; static; class function BeforeAnyOf(s: string; delimiters: array of System.Char): string; static; class function BeforeLast(s: string; delimiter: System.Char): string; static; class function BeforeLastAnyOf(s: string; delimiters: array of System.Char): string; static; class function ExpandTabs(s: string; tabs: array of Int32): string; overload; static; class function ExpandTabs(s: string; tabs: array of Int32; additionalTabsWidth: Int32): string; overload; static; class function ExpandTabs(s: string; tabSet: TabSet): string; overload; static; class function ExtractQuotedString(s: string): string; overload; static; class function ExtractQuotedString(s: string; flags: ExtractQuotedStringFlags): string; overload; static; class function ExtractQuotedString(s: string; out lastUsedChar: Integer): string; overload; static; class function Left(s: string; length: Integer): string; static; class function Mid(s: string; from, &to: Integer): string; static; class function RemoveDuplicateChars(s: string; char: System.Char): string; overload; static; class function RemoveDuplicateChars(s: string; chars: array of System.Char): string; overload; static; class function &Repeat(s: string; count: Integer): string; static; class function Right(s: string; length: Integer): string; static; class function QuoteString(s: string): string; overload; static; class function QuoteString(s: string; quoteChar: Char): string; overload; static; end; {$ENDREGION} implementation {$AUTOBOX ON} {$REGION 'StringUtils'} constructor StringUtils.Create; begin inherited Create; end; class function StringUtils.After(s: string; delimiter: System.Char): string; var idx: Integer; begin idx := s.IndexOf(delimiter); if idx = -1 then Result := '' else Result := s.Substring(idx + 1); end; class function StringUtils.AfterAnyOf(s: string; delimiters: array of System.Char): string; var idx: Integer; begin idx := s.IndexOfAny(delimiters); if idx = -1 then Result := '' else Result := s.Substring(idx + 1); end; class function StringUtils.AfterLast(s: string; delimiter: System.Char): string; var idx: Integer; begin idx := s.LastIndexOf(delimiter); if idx = -1 then Result := '' else Result := s.Substring(idx + 1); end; class function StringUtils.AfterLastAnyOf(s: string; delimiters: array of System.Char): string; var idx: Integer; begin idx := s.LastIndexOfAny(delimiters); if idx = -1 then Result := '' else Result := s.Substring(idx + 1); end; class function StringUtils.Before(s: string; delimiter: System.Char): string; var idx: Integer; begin idx := s.IndexOf(delimiter); if idx = -1 then Result := s else Result := s.Substring(0, idx); end; class function StringUtils.BeforeAnyOf(s: string; delimiters: array of System.Char): string; var idx: Integer; begin idx := s.IndexOfAny(delimiters); if idx = -1 then Result := s else Result := s.Substring(0, idx); end; class function StringUtils.BeforeLast(s: string; delimiter: System.Char): string; var idx: Integer; begin idx := s.LastIndexOf(delimiter); if idx = -1 then Result := s else Result := s.Substring(0, idx); end; class function StringUtils.BeforeLastAnyOf(s: string; delimiters: array of System.Char): string; var idx: Integer; begin idx := s.LastIndexOfAny(delimiters); if idx = -1 then Result := s else Result := s.Substring(0, idx); end; class function StringUtils.ExpandTabs(s: string; tabs: array of Integer): string; begin Result := ExpandTabs(s, TabSet.Create(tabs)); end; class function StringUtils.ExpandTabs(s: string; tabs: array of Integer; additionalTabsWidth: Integer): string; begin Result := ExpandTabs(s, TabSet.Create(tabs, additionalTabsWidth)); end; class function StringUtils.ExpandTabs(s: string; tabSet: TabSet): string; var sb: StringBuilder; startIndex: Integer; idx: Integer; begin sb := StringBuilder.Create; startIndex := 0; repeat idx := s.IndexOf(#9, startIndex); if idx > -1 then begin if idx > startIndex then sb.Append(s.Substring(startIndex, idx - startIndex)); Inc(idx); startIndex := idx; idx := tabSet.TabFrom(sb.Length); sb.Append(' ', idx - sb.Length) end else sb.Append(s.Substring(startIndex)); until idx = -1; Result := sb.ToString; end; class function StringUtils.ExtractQuotedString(s: string): string; begin Result := ExtractQuotedString(s, ExtractQuotedStringFlags.EndQuoteMandetory); end; class function StringUtils.ExtractQuotedString(s: string; flags: ExtractQuotedStringFlags): string; var i: Integer; begin if s = '' then Result := '' else begin Result := ExtractQuotedString(s, i); if ((flags and ExtractQuotedStringFlags.IgnoreGarbage) <> ExtractQuotedStringFlags.IgnoreGarbage) and (i > 0) and (i <> (s.Length - 1)) then raise FormatException.Create('String ends in garbage.'); if ((flags and ExtractQuotedStringFlags.EndQuoteMandetory) = ExtractQuotedStringFlags.EndQuoteMandetory) and (not i = s.Length) then raise FormatException.Create('End quote missing.'); end; end; class function StringUtils.ExtractQuotedString(s: string; out lastUsedChar: Integer): string; var qteChar: Char; sb: StringBuilder; i: Integer; begin Result := ''; lastUsedChar := 0; if s.Length > 0 then begin qteChar := s.Chars[0]; if (qteChar = '''') or (qteChar = '"') then begin sb := StringBuilder.Create; repeat i := s.IndexOf(qteChar, lastUsedChar + 1); if i >= 0 then begin if i <> (lastUsedChar + 1) then sb.Append(s.Substring(lastUsedChar + 1, i - lastUsedChar - 1)); lastUsedChar := i; Inc(i); if (i < s.Length) and (s.Chars[i] = qteChar) then begin sb.Append(qteChar); Inc(lastUsedChar); end else i := -1; end else begin sb.Append(s.Substring(lastUsedChar + 1)); lastUsedChar := not s.Length; end; until i < 0; Result := sb.ToString; end else begin Result := s; lastUsedChar := s.Length - 1; end; end; end; class function StringUtils.Left(s: string; length: Integer): string; begin Result := s.Substring(0, length); end; class function StringUtils.Mid(s: string; from, &to: Integer): string; begin Result := s.Substring(from, &to - from + 1); end; class function StringUtils.RemoveDuplicateChars(s: string; char: System.Char): string; var lastFound: Integer; sb: StringBuilder; newFound: Integer; foundCh: System.Char; begin lastFound := 0; sb := StringBuilder.Create; repeat newFound := s.IndexOf(char, lastFound); if newFound > -1 then begin sb.Append(Mid(s, lastFound, newFound)); foundCh := s.Chars[newFound]; while (newFound < s.Length) and (s.Chars[newFound] = foundCh) do Inc(newFound); lastFound := newFound; end else sb.Append(s.Substring(lastFound)); until (newFound = -1) or (newFound >= s.Length); Result := sb.ToString; end; class function StringUtils.RemoveDuplicateChars(s: string; chars: array of System.Char): string; var lastFound: Integer; sb: StringBuilder; newFound: Integer; foundCh: System.Char; begin lastFound := 0; sb := StringBuilder.Create; repeat newFound := s.IndexOfAny(chars, lastFound); if newFound > -1 then begin sb.Append(Mid(s, lastFound, newFound)); foundCh := s.Chars[newFound]; while (newFound < s.Length) and (s.Chars[newFound] = foundCh) do Inc(newFound); lastFound := newFound; end else sb.Append(s.Substring(lastFound)); until (newFound = -1) or (newFound >= s.Length); Result := sb.ToString; end; class function StringUtils.&Repeat(s: string; count: Integer): string; var sb: StringBuilder; begin if count < 0 then raise ArgumentOutOfRangeException.Create('param', count, 'The count parameter must be zero or positive.'); sb := StringBuilder.Create(s.Length * count); while count > 0 do begin sb.Append(s); Dec(count); end; Result := sb.ToString; end; class function StringUtils.Right(s: string; length: Integer): string; begin Result := s.Substring(s.length - length, length); end; class function StringUtils.QuoteString(s: string): string; begin Result := QuoteString(s, ''''); end; class function StringUtils.QuoteString(s: string; quoteChar: Char): string; var sb: StringBuilder; lastQtePos: Integer; thisQtePos: Integer; begin sb := StringBuilder.Create(quoteChar, s.Length * 11 div 10); lastQtePos := 0; thisQtePos := s.IndexOf(quoteChar); while thisQtePos > -1 do begin sb.Append(s.Substring(lastQtePos, thisQtePos - lastQtePos)); sb.Append(quoteChar, 2); lastQtePos := thisQtePos + 1; thisQtePos := s.IndexOf(quoteChar, lastQtePos); end; sb.Append(s.Substring(lastQtePos)); sb.Append(quoteChar); Result := sb.ToString; end; {$ENDREGION} {$REGION 'StringUtils.TabSet'} constructor StringUtils.TabSet.Create; begin Create([], 0); end; constructor StringUtils.TabSet.Create(defaultWidth: Integer); begin Create([], defaultWidth); end; constructor StringUtils.TabSet.Create(tabs: array of Integer); begin Create(tabs, 0); end; constructor StringUtils.TabSet.Create(tabs: array of Integer; defaultWidth: Integer); var idx: Integer; begin inherited Create; FTabs := ArrayList.Create(&Array(tabs).Length); FDefaultWidth := defaultWidth; BeginUpdate; try for idx := 0 to High(tabs) do Add(tabs[idx]); finally EndUpdate; end; end; procedure StringUtils.TabSet.Add(tabPosition: Integer); var idx: Integer; begin idx := FTabs.BinarySearch(tabPosition); if idx < 0 then begin FTabs.Insert(not idx, tabPosition); if IsAutoWidth and not IsUpdating then RecalcDefaultWidth; end else raise InvalidOperationException.Create('Duplicate positions are not allowed.'); end; procedure StringUtils.TabSet.BeginUpdate; begin Inc(FUpdateCount); end; procedure StringUtils.TabSet.Clear; begin FTabs.Clear; if IsAutoWidth and not IsUpdating then RecalcDefaultWidth; end; function StringUtils.TabSet.Clone: &Object; type IntArray = array of Integer; begin Result := StringUtils.TabSet.Create(IntArray(FTabs.ToArray(TypeOf(Integer))), DefaultWidth); end; procedure StringUtils.TabSet.EndUpdate; begin if IsUpdating then begin Dec(FUpdateCount); if not IsUpdating and IsAutoWidth then RecalcDefaultWidth; end; end; function StringUtils.TabSet.Equals(obj: &Object): Boolean; var firstSet: StringUtils.TabSet; secondSet: StringUtils.TabSet; tabPos: Integer; i: Integer; begin Result := &Object.ReferenceEquals(Self, obj); if not Result and (TypeOf(StringUtils.TabSet).IsInstanceOfType(obj)) then begin firstSet := StringUtils.TabSet(obj); if IsAutoWidth and IsUpdating then RecalcDefaultWidth; if firstSet.IsAutoWidth and firstSet.IsUpdating then firstSet.RecalcDefaultWidth; Result := RealDefaultWidth = firstSet.RealDefaultWidth; if firstSet.Count > Count then begin secondSet := firstSet; firstSet := Self; end else secondSet := Self; if Result and (firstSet.Count < secondSet.Count) then begin if firstSet.Count > 0 then begin tabPos := firstSet.Tabs[firstSet.Count - 1]; i := firstSet.Count; end else begin tabPos := 0; i := 0; end; while Result and (i < secondSet.Count) do begin Inc(tabPos, firstSet.RealDefaultWidth); Result := tabPos = secondSet.Tabs[i]; Inc(i); end; end; i := firstSet.Count - 1; while Result and (i >= 0) do begin Result := firstSet.Tabs[i] = secondSet.Tabs[i]; Dec(i); end; end; end; function StringUtils.TabSet.get_Count: Integer; begin Result := FTabs.Count; end; function StringUtils.TabSet.get_DefaultWidth: Integer; begin if IsAutoWidth then Result := 0 else Result := FDefaultWidth; end; function StringUtils.TabSet.get_Tabs(index: Integer): Integer; begin Result := Integer(FTabs[index]); end; function StringUtils.TabSet.IsAutoWidth: Boolean; begin Result := FDefaultWidth <= 0; end; function StringUtils.TabSet.IsUpdating: Boolean; begin Result := FUpdateCount > 0; end; function StringUtils.TabSet.RealDefaultWidth: Integer; begin if IsAutoWidth then Result := not FDefaultWidth else Result := FDefaultWidth; end; procedure StringUtils.TabSet.RecalcDefaultWidth; begin if FTabs.Count > 1 then FDefaultWidth := not (Tabs[FTabs.Count - 1] - Tabs[FTabs.Count - 2]) else if FTabs.Count = 1 then FDefaultWidth := not Tabs[0] else FDefaultWidth := not 2; end; procedure StringUtils.TabSet.Remove(tabPosition: Integer; includeFollowing: Boolean); var idx: Integer; begin idx := FTabs.BinarySearch(tabPosition); if (idx < 0) and includeFollowing then idx := not idx; if (idx >= 0) and (idx < FTabs.Count) then RemoveAt(idx, includeFollowing); end; procedure StringUtils.TabSet.RemoveAt(index: Integer; includeFollowing: Boolean); begin if (index < 0) or (index >= FTabs.Count) then raise ArgumentOutOfRangeException.Create('index', index, 'Index must be within {0} and {1}.'); if includeFollowing then FTabs.RemoveRange(index, FTabs.Count - index) else FTabs.RemoveAt(index); if IsAutoWidth and not IsUpdating then RecalcDefaultWidth; end; procedure StringUtils.TabSet.set_DefaultWidth(value: Integer); begin if value < 0 then raise ArgumentOutOfRangeException.Create('value', value, 'DefaultWidth must be zero or positive.'); if (value > 0) and (value <> FDefaultWidth) then FDefaultWidth := value else if (value = 0) and not IsAutoWidth then RecalcDefaultWidth; end; procedure StringUtils.TabSet.set_Tabs(index: Integer; value: Integer); var newIdx: Integer; begin if (index < FTabs.Count) and (Integer(FTabs[index]) <> value) or (index = FTabs.Count) then begin newIdx := FTabs.BinarySearch(value); if newIdx >= 0 then raise InvalidOperationException.Create('Duplicate positions are not allowed.'); newIdx := not newIdx; FTabs.RemoveAt(index); if newIdx >= index then Dec(newIdx); FTabs.Insert(newIdx, value); if IsAutoWidth and not IsUpdating then RecalcDefaultWidth; end; end; function StringUtils.TabSet.TabFrom(pos: Integer): Integer; var idx: Integer; begin idx := FTabs.BinarySearch(pos + 1); if idx < 0 then idx := not idx; if idx < FTabs.Count then Result := Integer(FTabs[idx]) else begin if FTabs.Count > 0 then Result := Integer(FTabs[idx - 1]) else Result := 0; while Result <= pos do Inc(Result, RealDefaultWidth); end; end; function StringUtils.TabSet.ToString: string; var sb: StringBuilder; enum: IEnumerator; begin sb := StringBuilder.Create; sb.Append('['); enum := FTabs.GetEnumerator; if FTabs.Count > 0 then begin while enum.MoveNext do begin sb.Append(Integer(enum.Current)); sb.Append(','); end; sb.Remove(sb.Length - 1, 1); end; sb.Append(']+'); sb.Append(RealDefaultWidth); if RealDefaultWidth <> DefaultWidth then sb.Append(' (automatic)'); Result := sb.ToString; end; {$ENDREGION} end. --- NEW FILE: Jedi.IO.pas --- {--------------------------------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: Jedi.IO.pas, released on 2004-11-24. The Initial Developer of the Original Code is Marcel Bestebroer Portions created by Marcel Bestebroer are Copyright (C) 2004 Marcel Bestebroer All Rights Reserved. Contributor(s): You may retrieve the latest version of this file at the JEDI.NET home page, located at http://sf.net/projects/jedidotnet Known Issues: ---------------------------------------------------------------------------------------------------} // $Id: Jedi.IO.pas,v 1.1 2004/11/24 10:31:41 jedi_mbe Exp $ unit Jedi.IO; interface {$REGION 'Path manipulations'} type CharArray = array of Char; Path = class {$REGION 'PathConfig'} public type PathConfig = class strict private FDirSep: Char; FAltDirSep: Char; FVolSep: Char; FInvalidPathChars: array of Char; public constructor Create; overload; constructor Create(directorySeparator, altDirectorySeparator, volumeSeparator: Char; invalidPathChars: array of Char); overload; function AltDirectorySeparator: Char; function DirectorySeparator: Char; function InvalidPathChars: CharArray; function VolumeSeparator: Char; end; {$ENDREGION} strict private class constructor Create; strict protected constructor Create; strict protected class var SysConfig: PathConfig; public class function Combine(paths: array of string): string; overload; static; class function Combine(paths: array of string; config: PathConfig): string; overload; static; class function Combine(path1, path2: string): string; overload; static; class function Combine(path1, path2: string; config: PathConfig): string; overload; static; class function EnsureEndingDirectorySeparator(path: string): string; overload; static; class function EnsureEndingDirectorySeparator(path: string; config: PathConfig): string; overload; static; class function IsPathRooted(path: string): Boolean; overload; static; class function IsPathRooted(path: string; config: PathConfig): Boolean; overload; static; class function IsValid(path: string): Boolean; overload; static; class function IsValid(path: string; config: PathConfig): Boolean; overload; static; class function IsValid(path: string; allowWildcards: Boolean): Boolean; overload; static; class function IsValid(path: string; allowWildcards: Boolean; config: PathConfig): Boolean; overload; static; class function IsVolumePath(path: string): Boolean; overload; static; class function IsVolumePath(path: string; config: PathConfig): Boolean; overload; static; class function Normalize(path: string): string; overload; static; class function Normalize(path: string; config: PathConfig): string; overload; static; class function SystemConfig: PathConfig; static; end; PathException = class (SystemException) end; {$ENDREGION} implementation {$REGION 'implementation uses'} uses System.Collections, System.IO, System.Text, Jedi.Strings; {$ENDREGION} {$AUTOBOX ON} {$REGION 'Path'} class constructor Path.Create; begin SysConfig := Path.PathConfig.Create; end; constructor Path.Create; begin inherited Create; end; class function Path.Combine(paths: array of string): string; begin Result := Combine(paths, SysConfig); end; class function Path.Combine(paths: array of string; config: PathConfig): string; var i: Integer; lastRoot: Integer; al: ArrayList; level: Integer; sb: StringBuilder; begin if not Assigned(paths) then raise ArgumentNullException.Create('paths'); i := &Array(paths).Length - 1; lastRoot := -1; while (i >= 0) and not IsVolumePath(paths[i], config) do begin if (lastRoot = -1) and IsPathRooted(paths[i], config) then lastRoot := i; Dec(i); end; al := ArrayList.Create; if i = -1 then i := lastRoot else if i < lastRoot then begin al.Add(StringUtils.Before(paths[i], config.VolumeSeparator) + config.VolumeSeparator); i := lastRoot; end; if i = -1 then i := 0; while i < &Array(paths).Length do begin al.AddRange(&Array(StringUtils.RemoveDuplicateChars(paths[i].Trim([config.DirectorySeparator, config.AltDirectorySeparator]), [config.DirectorySeparator, config.AltDirectorySeparator]).Split( [config.DirectorySeparator, config.AltDirectorySeparator]))); Inc(i); end; i := 0; while (i < al.Count) and (System.String.Create('.', string(al[i]).Length).Equals(string(al[i]))) do Inc(i); while (i < al.Count) do begin if string(al[i]).Equals(System.String.Create('.', string(al[i]).Length)) then begin level := string(al[i]).Length - 1; if level > i then raise PathException.Create('Level traversal is too deep.'); al.RemoveRange(i - level, level + 1); Dec(i, level); end else Inc(i); end; sb := StringBuilder.Create(256); for i := 0 to al.Count - 1 do sb.Append(string(al[i]) + config.DirectorySeparator); if al.Count > 0 then sb.Remove(sb.Length - 1, 1); Result := Normalize(sb.ToString, config); if (lastRoot <> -1) and not IsVolumePath(Result, config) then Result := Result.Insert(0, config.DirectorySeparator); end; class function Path.Combine(path1, path2: string): string; begin Result := Combine([path1, path2], SysConfig); end; class function Path.Combine(path1, path2: string; config: PathConfig): string; begin Result := Combine([path1, path2], config); end; class function Path.EnsureEndingDirectorySeparator(path: string): string; begin Result := EnsureEndingDirectorySeparator(path, SysConfig); end; class function Path.EnsureEndingDirectorySeparator(path: string; config: PathConfig): string; begin if not path.EndsWith(config.DirectorySeparator) then Result := path + config.DirectorySeparator else Result := path; end; class function Path.IsPathRooted(path: string): Boolean; begin Result := IsPathRooted(path, SysConfig); end; class function Path.IsPathRooted(path: string; config: PathConfig): Boolean; begin Result := IsVolumePath(path, config) or path.StartsWith(config.DirectorySeparator) or path.StartsWith(config.AltDirectorySeparator); end; class function Path.IsValid(path: string): Boolean; begin Result := IsValid(path, False, SysConfig); end; class function Path.IsValid(path: string; config: PathConfig): Boolean; begin Result := IsValid(path, False, config); end; class function Path.IsValid(path: string; allowWildcards: Boolean): Boolean; begin Result := IsValid(path, allowWildcards, SysConfig); end; class function Path.IsValid(path: string; allowWildcards: Boolean; config: PathConfig): Boolean; var i: Integer; begin Result := ((path.IndexOf(config.VolumeSeparator) = -1) or IsVolumePath(path, config)) and (path.IndexOfAny(config.InvalidPathChars) = -1) and (allowWildcards or (path.IndexOfAny('*?'.ToCharArray) = -1)); i := 0; while Result and (i < path.Length) do begin if (i = 0) or (config.DirectorySeparator = path.Chars[i]) or (config.AltDirectorySeparator = path.Chars[i]) then begin if i > 0 then Inc(i); if (i < path.Length - 1) and (path.Chars[i] = '.') and (path.Chars[i + 1] = '.') then begin while Result and (i < path.Length) and ((config.DirectorySeparator + config.AltDirectorySeparator).IndexOf(path.Chars[i]) = -1) do begin Result := path.Chars[i] = '.'; Inc(i); end; end else Inc(i); end else Inc(i); end; end; class function Path.IsVolumePath(path: string): Boolean; begin Result := IsVolumePath(path, SysConfig); end; class function Path.IsVolumePath(path: string; config: PathConfig): Boolean; var idx1: Integer; idx2: Integer; begin idx1 := path.IndexOf(config.VolumeSeparator); if idx1 > -1 then begin idx2 := path.IndexOfAny([config.DirectorySeparator, config.AltDirectorySeparator]); Result := (idx2 = -1) or (idx2 > idx1) and (path.IndexOf(config.VolumeSeparator, idx1 + 1) = -1); end else Result := False; end; class function Path.Normalize(path: string): string; begin Result := Normalize(path, SysConfig); end; class function Path.Normalize(path: string; config: PathConfig): string; var i: Integer; lastSet: Integer; begin Result := path.Replace(config.AltDirectorySeparator, config.DirectorySeparator).Replace( config.DirectorySeparator + '.' + config.DirectorySeparator, ''); while Result.StartsWith('.' + config.DirectorySeparator) do Result := Result.Remove(0, 2); i := Result.Length - 1; while (i >= 1) and (Result.Chars[i] = config.DirectorySeparator) and (Result.Chars[i - 1] <> config.VolumeSeparator) do Dec(i); Result := Result.Substring(0, i + 1); lastSet := -1; repeat lastSet := Result.IndexOf('...', lastSet + 1); if lastSet > -1 then begin i := lastSet + 3; while (i < Result.Length) and (Result.Chars[i] = '.') do Inc(i); Result := Result.Remove(lastSet, i - lastSet).Insert(lastSet, StringUtils.Repeat( '..' + config.DirectorySeparator, i - lastSet - 1)); lastSet := lastSet + 3 * (i - lastSet - 1); end; until lastSet = -1; Result := StringUtils.RemoveDuplicateChars(Result, config.DirectorySeparator); i := Result.IndexOf(config.VolumeSeparator); if (i > -1) and (i < Result.Length - 1) and (Result.Chars[i + 1] <> config.DirectorySeparator) then Result := Result.Insert(i + 1, config.DirectorySeparator); end; class function Path.SystemConfig: PathConfig; begin Result := SysConfig; end; {$ENDREGION} {$REGION 'Path.PathConfig'} constructor Path.PathConfig.Create; begin Create(System.IO.Path.DirectorySeparatorChar, System.IO.Path.AltDirectorySeparatorChar, System.IO.Path.VolumeSeparatorChar, System.IO.Path.InvalidPathChars); end; constructor Path.PathConfig.Create(directorySeparator, altDirectorySeparator, volumeSeparator: Char; invalidPathChars: array of Char); begin inherited Create; FDirSep := directorySeparator; FAltDirSep := altDirectorySeparator; FVolSep := volumeSeparator; FInvalidPathChars := invalidPathChars; end; function Path.PathConfig.AltDirectorySeparator: Char; begin Result := FAltDirSep; end; function Path.PathConfig.DirectorySeparator: Char; begin Result := FDirSep; end; function Path.PathConfig.InvalidPathChars: CharArray; begin Result := FInvalidPathChars; end; function Path.PathConfig.VolumeSeparator: Char; begin Result := FVolSep; end; {$ENDREGION} end. |
From: Marcel B. <jed...@us...> - 2004-09-30 16:45:49
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2875/main/run Modified Files: Jedi.System.IO.pas Log Message: Mantis #2129: * and / operators of StoredExtended were wrong Index: Jedi.System.IO.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.System.IO.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.System.IO.pas 29 Jul 2004 09:35:56 -0000 1.1 --- Jedi.System.IO.pas 30 Sep 2004 16:45:19 -0000 1.2 *************** *** 245,254 **** class operator StoredExtended.Multiply(const A: StoredExtended; const B: Extended): StoredExtended; begin ! Result := Extended(A) + B; end; class operator StoredExtended.Divide(const A: StoredExtended; const B: Extended): StoredExtended; begin ! Result := Extended(A) - B; end; --- 245,254 ---- class operator StoredExtended.Multiply(const A: StoredExtended; const B: Extended): StoredExtended; begin ! Result := Extended(A) * B; end; class operator StoredExtended.Divide(const A: StoredExtended; const B: Extended): StoredExtended; begin ! Result := Extended(A) / B; end; |
From: Marcel B. <jed...@us...> - 2004-09-04 15:06:44
|
Update of /cvsroot/jedidotnet/main/examples/Jedi.System.IO/FileOfRecord In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19426/main/examples/Jedi.System.IO/FileOfRecord Modified Files: WinFormMain.pas Log Message: Mantis #2111: In the FileOfRecord example the age is written to income field Index: WinFormMain.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/examples/Jedi.System.IO/FileOfRecord/WinFormMain.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WinFormMain.pas 29 Jul 2004 09:36:06 -0000 1.1 --- WinFormMain.pas 4 Sep 2004 15:06:30 -0000 1.2 *************** *** 310,314 **** r.Name := TextBoxName.Text; r.Age := Decimal.ToByte(NumericUpDownAge.Value); ! r.Income := Decimal.ToDouble(NumericUpDownAge.Value); f.Write(r); finally --- 310,314 ---- r.Name := TextBoxName.Text; r.Age := Decimal.ToByte(NumericUpDownAge.Value); ! r.Income := Decimal.ToDouble(NumericUpDownIncome.Value); f.Write(r); finally *************** *** 372,376 **** r.Name := TextBoxName.Text; r.Age := Decimal.ToByte(NumericUpDownAge.Value); ! r.Income := Decimal.ToDouble(NumericUpDownAge.Value); f.Write(r); finally --- 372,376 ---- r.Name := TextBoxName.Text; r.Age := Decimal.ToByte(NumericUpDownAge.Value); ! r.Income := Decimal.ToDouble(NumericUpDownIncome.Value); f.Write(r); finally |
From: Marcel B. <jed...@us...> - 2004-08-26 09:46:13
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27169/main/run Modified Files: Jedi.Collections.pas Log Message: * Override the typeconverter for the 'new' item so it suppresses the child properties (which are useless in that scenario) * Minor corrections in one of the overloaded methods to create the 'new' item. Index: Jedi.Collections.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.Collections.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Jedi.Collections.pas 25 Aug 2004 18:56:12 -0000 1.4 --- Jedi.Collections.pas 26 Aug 2004 09:45:46 -0000 1.5 *************** *** 210,213 **** --- 210,214 ---- NewItemPropertyDescriptor = class (SimplePropertyDescriptor) strict private + FOrgConverter: TypeConverter; FPropertyId: System.Object; strict protected *************** *** 218,228 **** function GetValue(component: System.Object): System.Object; override; procedure SetValue(component, value: System.Object); override; end; constructor NewItemPropertyDescriptor.Create(componentType: System.Type; name: string; propertyType: System.Type; attributes: AttributeArray; propertyId: System.Object); begin ! inherited Create(componentType, name, propertyType, attributes); FPropertyId := propertyId; end; --- 219,364 ---- function GetValue(component: System.Object): System.Object; override; procedure SetValue(component, value: System.Object); override; + property OrgConverter: TypeConverter read FOrgConverter; end; + {$REGION 'NewPropertyTypeConverter'} + type + NewPropertyTypeConverter = class (TypeConverter) + strict private + FRealConverter: TypeConverter; + strict protected + function RealConverter(context: ITypeDescriptorContext): TypeConverter; + public + function CanConvertFrom(context: ITypeDescriptorContext; sourceType: System.Type): Boolean; override; + function CanConvertTo(context: ITypeDescriptorContext; destinationType: System.Type): Boolean; override; + function ConvertFrom(context: ITypeDescriptorContext; culture: CultureInfo; value: System.Object): System.Object; override; + function ConvertTo(context: ITypeDescriptorContext; culture: CultureInfo; value: System.Object; destinationType: System.Type): System.Object; override; + function CreateInstance(context: ITypeDescriptorContext; propertyValues: IDictionary): System.Object; override; + function GetCreateInstanceSupported(context: ITypeDescriptorContext): Boolean; override; + function GetProperties(context: ITypeDescriptorContext; value: System.Object; attributes: AttributeArray): PropertyDescriptorCollection; override; + function GetPropertiesSupported(context: ITypeDescriptorContext): Boolean; override; + function GetStandardValues(context: ITypeDescriptorContext): TypeConverter.StandardValuesCollection; override; + function GetStandardValuesExclusive(context: ITypeDescriptorContext): Boolean; override; + function GetStandardValuesSupported(context: ITypeDescriptorContext): Boolean; override; + function IsValid(context: ITypeDescriptorContext; value: System.Object): Boolean; override; + end; + + function NewPropertyTypeConverter.RealConverter(context: ITypeDescriptorContext): TypeConverter; + begin + if not Assigned(FRealConverter) and Assigned(context) and + Assigned(NewItemPropertyDescriptor(context.PropertyDescriptor)) then + FRealConverter := NewItemPropertyDescriptor(context.PropertyDescriptor).OrgConverter; + Result := FRealConverter; + end; + + function NewPropertyTypeConverter.CanConvertFrom(context: ITypeDescriptorContext; sourceType: System.Type): Boolean; + begin + if Assigned(RealConverter(context)) then + Result := FRealConverter.CanConvertFrom(context, sourceType) + else + Result := inherited CanConvertFrom(context, sourceType); + end; + + function NewPropertyTypeConverter.CanConvertTo(context: ITypeDescriptorContext; destinationType: System.Type): Boolean; + begin + if Assigned(RealConverter(context)) then + Result := FRealConverter.CanConvertTo(context, destinationType) + else + Result := inherited CanConvertTo(context, destinationType); + end; + + function NewPropertyTypeConverter.ConvertFrom(context: ITypeDescriptorContext; culture: CultureInfo; + value: System.Object): System.Object; + begin + if Assigned(RealConverter(context)) then + Result := FRealConverter.ConvertFrom(context, culture, value) + else + Result := inherited ConvertFrom(context, culture, value); + end; + + function NewPropertyTypeConverter.ConvertTo(context: ITypeDescriptorContext; culture: CultureInfo; + value: System.Object; destinationType: System.Type): System.Object; + begin + if Assigned(RealConverter(context)) then + Result := FRealConverter.ConvertTo(context, culture, value, destinationType) + else + Result := inherited ConvertTo(context, culture, value, destinationType); + end; + + function NewPropertyTypeConverter.CreateInstance(context: ITypeDescriptorContext; + propertyValues: IDictionary): System.Object; + begin + if Assigned(RealConverter(context)) then + Result := FRealConverter.CreateInstance(context, propertyValues) + else + Result := inherited CreateInstance(context, propertyValues); + end; + + function NewPropertyTypeConverter.GetCreateInstanceSupported(context: ITypeDescriptorContext): Boolean; + begin + if Assigned(RealConverter(context)) then + Result := FRealConverter.GetCreateInstanceSupported(context) + else + Result := inherited GetCreateInstanceSupported(context); + end; + + function NewPropertyTypeConverter.GetProperties(context: ITypeDescriptorContext; value: System.Object; + attributes: AttributeArray): PropertyDescriptorCollection; + begin + Result := PropertyDescriptorCollection.Empty; + end; + + function NewPropertyTypeConverter.GetPropertiesSupported(context: ITypeDescriptorContext): Boolean; + begin + Result := False; + end; + + function NewPropertyTypeConverter.GetStandardValues( + context: ITypeDescriptorContext): TypeConverter.StandardValuesCollection; + begin + if Assigned(RealConverter(context)) then + Result := FRealConverter.GetStandardValues(context) + else + Result := inherited GetStandardValues(context); + end; + + function NewPropertyTypeConverter.GetStandardValuesExclusive(context: ITypeDescriptorContext): Boolean; + begin + if Assigned(RealConverter(context)) then + Result := FRealConverter.GetStandardValuesExclusive(context) + else + Result := inherited GetStandardValuesExclusive(context); + end; + + function NewPropertyTypeConverter.GetStandardValuesSupported(context: ITypeDescriptorContext): Boolean; + begin + if Assigned(RealConverter(context)) then + Result := FRealConverter.GetStandardValuesSupported(context) + else + Result := inherited GetStandardValuesSupported(context); + end; + + function NewPropertyTypeConverter.IsValid(context: ITypeDescriptorContext; value: System.Object): Boolean; + begin + if Assigned(RealConverter(context)) then + Result := FrealConverter.IsValid(context, value) + else + Result := inherited IsValid(context, value); + end; + {$ENDREGION} + constructor NewItemPropertyDescriptor.Create(componentType: System.Type; name: string; propertyType: System.Type; attributes: AttributeArray; propertyId: System.Object); + var + orgConvAttr: TypeConverterAttribute; begin ! inherited Create(componentType, name, propertyType, AttributeUtils.CombineAttributes( ! attributes, Jedi.System.AttributeArray.Create(TypeConverterAttribute.Create(TypeOf(NewPropertyTypeConverter))))); FPropertyId := propertyId; + orgConvAttr := TypeConverterAttribute(AttributeUtils.GetAttribute(attributes, TypeOf(TypeConverterAttribute))); + if Assigned(orgConvAttr) then + FOrgConverter := TypeConverter(Activator.CreateInstance(&Type.GetType(orgConvAttr.ConverterTypeName), True)) + else + FOrgConverter := TypeDescriptor.GetConverter(propertyType); end; *************** *** 917,922 **** class function InlineCollectionUtils.CreateNewItemProperty(baseDescriptor: PropertyDescriptor; name, description: string; propertyId: System.Object): PropertyDescriptor; - var - attrs: ArrayList; begin if not Assigned(baseDescriptor) then --- 1053,1056 ---- *************** *** 925,938 **** name := baseDescriptor.Name; ! attrs := ArrayList.Create(baseDescriptor.Attributes); ! Result := NewItemPropertyDescriptor.Create(baseDescriptor.ComponentType, name, baseDescriptor.PropertyType, ! AttributeArray(attrs.ToArray(TypeOf(Attribute))), propertyId); end; class function InlineCollectionUtils.CreateNewItemProperty(info: PropertyInfo; name, description: string; propertyId: System.Object): PropertyDescriptor; - var - mattrs: array of System.Object; - attrs: AttributeArray; begin if not Assigned(info) then --- 1059,1069 ---- name := baseDescriptor.Name; ! Result := CreateNewItemProperty(baseDescriptor.ComponentType, baseDescriptor.PropertyType, ! AttributeArray(ArrayList.Create(baseDescriptor.Attributes).ToArray(TypeOf(Attribute))), name, description, ! propertyId); end; class function InlineCollectionUtils.CreateNewItemProperty(info: PropertyInfo; name, description: string; propertyId: System.Object): PropertyDescriptor; begin if not Assigned(info) then *************** *** 940,948 **** if not Assigned(name) or (name = '') then name := info.Name; ! mattrs := info.GetCustomAttributes(True); ! attrs := new(AttributeArray, Length(mattrs)); ! System.Array.Copy(mattrs, attrs, Length(mattrs)); ! Result := InlineCollectionUtils.CreateNewItemProperty(info.DeclaringType, info.PropertyType, attrs, name, description, ! propertyId); end; --- 1071,1076 ---- if not Assigned(name) or (name = '') then name := info.Name; ! Result := CreateNewItemProperty(info.DeclaringType, info.PropertyType, ! AttributeArray(&Array(info.GetCustomAttributes(True))), name, description, propertyId); end; |
From: Marcel B. <jed...@us...> - 2004-08-26 09:44:30
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26951/main/run Modified Files: Jedi.System.pas Log Message: * Added ToArrayList methods to safely convert 'array of Attribute' or AttributeCollection to an ArrayList, specifically when the specified array or collection is a nil reference. * Added GetAttribute to retrieve a specific attribute from the array or collection Index: Jedi.System.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.System.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Jedi.System.pas 4 Aug 2004 08:28:18 -0000 1.3 --- Jedi.System.pas 26 Aug 2004 09:44:10 -0000 1.4 *************** *** 46,52 **** {$HINTS ON} strict protected - class function IndexOf(attrList: ArrayList; attr: System.Object): Integer; static; class function CombineAttributes(attributes1, attributes2: ArrayList; operation: AttributeCombineOperation): ArrayList; overload; static; public class function CombineAttributes(attributes1, attributes2: array of Attribute): AttributeArray; overload; static; --- 46,54 ---- {$HINTS ON} strict protected class function CombineAttributes(attributes1, attributes2: ArrayList; operation: AttributeCombineOperation): ArrayList; overload; static; + class function IndexOf(attrList: ArrayList; attr: System.Object): Integer; static; + class function ToArrayList(attrs: array of Attribute): ArrayList; overload; static; + class function ToArrayList(attrs: AttributeCollection): ArrayList; overload; static; public class function CombineAttributes(attributes1, attributes2: array of Attribute): AttributeArray; overload; static; *************** *** 65,68 **** --- 67,74 ---- class function CombineAttributes(attributes1: AttributeCollection; attributes2: array of Attribute; operation: AttributeCombineOperation): AttributeCollection; overload; static; + class function GetAttribute(attributes: array of Attribute; attr: Attribute): Attribute; overload; static; + class function GetAttribute(attributes: array of Attribute; attrType: System.Type): Attribute; overload; static; + class function GetAttribute(attributes: AttributeCollection; attr: Attribute): Attribute; overload; static; + class function GetAttribute(attributes: AttributeCollection; attrType: System.Type): Attribute; overload; static; end; {$ENDREGION} *************** *** 89,92 **** --- 95,114 ---- end; + class function AttributeUtils.ToArrayList(attrs: array of Attribute): ArrayList; + begin + if Assigned(attrs) then + Result := ArrayList.Create(&Array(attrs)) + else + Result := ArrayList.Create; + end; + + class function AttributeUtils.ToArrayList(attrs: AttributeCollection): ArrayList; + begin + if Assigned(attrs) then + Result := ArrayList.Create(attrs) + else + Result := ArrayList.Create; + end; + class function AttributeUtils.CombineAttributes(attributes1, attributes2: ArrayList; operation: AttributeCombineOperation): ArrayList; *************** *** 123,128 **** operation: AttributeCombineOperation): AttributeArray; begin ! Result := AttributeArray(CombineAttributes(ArrayList.Create(&Array(attributes1)), ! ArrayList.Create(&Array(attributes2)), operation).ToArray(TypeOf(Attribute))); end; --- 145,150 ---- operation: AttributeCombineOperation): AttributeArray; begin ! Result := AttributeArray(CombineAttributes(ToArrayList(attributes1), ToArrayList(attributes2), ! operation).ToArray(TypeOf(Attribute))); end; *************** *** 135,140 **** operation: AttributeCombineOperation): AttributeCollection; begin ! Result := AttributeCollection.Create(AttributeArray(CombineAttributes(ArrayList.Create(attributes1), ! ArrayList.Create(attributes2), operation).ToArray(TypeOf(Attribute)))); end; --- 157,162 ---- operation: AttributeCombineOperation): AttributeCollection; begin ! Result := AttributeCollection.Create(AttributeArray(CombineAttributes(ToArrayList(attributes1), ! ToArrayList(attributes2), operation).ToArray(TypeOf(Attribute)))); end; *************** *** 148,153 **** operation: AttributeCombineOperation): AttributeArray; begin ! Result := AttributeArray(CombineAttributes(ArrayList.Create(&Array(attributes1)), ! ArrayList.Create(attributes2), operation).ToArray(TypeOf(Attribute))); end; --- 170,175 ---- operation: AttributeCombineOperation): AttributeArray; begin ! Result := AttributeArray(CombineAttributes(ToArrayList(attributes1), ToArrayList(attributes2), ! operation).ToArray(TypeOf(Attribute))); end; *************** *** 161,166 **** attributes2: array of Attribute; operation: AttributeCombineOperation): AttributeCollection; begin ! Result := AttributeCollection.Create(AttributeArray(CombineAttributes(ArrayList.Create(attributes1), ! ArrayList.Create(&Array(attributes2)), operation).ToArray(TypeOf(Attribute)))); end; {$ENDREGION} --- 183,232 ---- attributes2: array of Attribute; operation: AttributeCombineOperation): AttributeCollection; begin ! Result := AttributeCollection.Create(AttributeArray(CombineAttributes(ToArrayList(attributes1), ! ToArrayList(attributes2), operation).ToArray(TypeOf(Attribute)))); ! end; ! ! class function AttributeUtils.GetAttribute(attributes: array of Attribute; attr: Attribute): Attribute; ! var ! idx: Integer; ! begin ! idx := IndexOf(ToArrayList(attributes), attr); ! if idx > -1 then ! Result := attributes[idx] ! else ! Result := nil; ! end; ! ! class function AttributeUtils.GetAttribute(attributes: array of Attribute; attrType: System.Type): Attribute; ! var ! idx: Integer; ! begin ! idx := IndexOf(ToArrayList(attributes), attrType); ! if idx > -1 then ! Result := attributes[idx] ! else ! Result := nil; ! end; ! ! class function AttributeUtils.GetAttribute(attributes: AttributeCollection; attr: Attribute): Attribute; ! var ! idx: Integer; ! begin ! idx := IndexOf(ToArrayList(attributes), attr); ! if idx > -1 then ! Result := attributes[idx] ! else ! Result := nil; ! end; ! ! class function AttributeUtils.GetAttribute(attributes: AttributeCollection; attrType: System.Type): Attribute; ! var ! idx: Integer; ! begin ! idx := IndexOf(ToArrayList(attributes), attrType); ! if idx > -1 then ! Result := attributes[idx] ! else ! Result := nil; end; {$ENDREGION} |
From: Marcel B. <jed...@us...> - 2004-08-25 18:56:29
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4246/main/run Modified Files: Jedi.Collections.pas Log Message: * SubPropertyTypeConverter.ConvertTo now checks if it should use the provded value or that of the real property. Fixes problems with drop down lists at the item property level. * The UITypeEditor for the ItemSubPropertyDescriptor is only set to the SubPropertyUITypeEditor if the editor attribute was actually used for the real property or the type it represents. Fixes problems with drop down lists at the item property level. Index: Jedi.Collections.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.Collections.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Jedi.Collections.pas 25 Aug 2004 15:14:56 -0000 1.3 --- Jedi.Collections.pas 25 Aug 2004 18:56:12 -0000 1.4 *************** *** 550,554 **** begin pd := ItemSubPropertyDescriptor(context.PropertyDescriptor).RealDescriptor; ! propValue := pd.GetValue(ItemSubPropertyDescriptor(context.PropertyDescriptor).ItemInstance(context.Instance)); Result := FPropertyConverter.ConvertTo(SubPropertyContext.Create(context), culture, propValue, destinationType); end --- 550,557 ---- begin pd := ItemSubPropertyDescriptor(context.PropertyDescriptor).RealDescriptor; ! if value = context.PropertyDescriptor.GetValue(context.Instance) then ! propValue := pd.GetValue(ItemSubPropertyDescriptor(context.PropertyDescriptor).ItemInstance(context.Instance)) ! else ! propValue := value; Result := FPropertyConverter.ConvertTo(SubPropertyContext.Create(context), culture, propValue, destinationType); end *************** *** 723,727 **** EditorAttribute.Create(TypeOf(SubPropertyUITypeEditor), TypeOf(UITypeEditor)) ), ! AttributeCombineOperation.AddAndReplace ) else --- 726,730 ---- EditorAttribute.Create(TypeOf(SubPropertyUITypeEditor), TypeOf(UITypeEditor)) ), ! AttributeCombineOperation.Replace ) else *************** *** 736,740 **** EditorAttribute.Create(TypeOf(SubPropertyUITypeEditor), TypeOf(UITypeEditor)) ), ! AttributeCombineOperation.AddAndReplace ); inherited Create(componentType, name, itemType, --- 739,743 ---- EditorAttribute.Create(TypeOf(SubPropertyUITypeEditor), TypeOf(UITypeEditor)) ), ! AttributeCombineOperation.Replace ); inherited Create(componentType, name, itemType, |
From: Marcel B. <jed...@us...> - 2004-08-25 15:15:05
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24322/main/run Modified Files: Jedi.Collections.pas Log Message: * Added missing 'ignoreDefaultProperty' parameter in one of the InlineCollectionUtils.CreateItemProperty methods. * The InlineCollectionUtils.CreateItemProperty with the PropertyInfo parameter now just calls the other version of the method (minimizing code duplication is good ;-) ) Index: Jedi.Collections.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.Collections.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jedi.Collections.pas 24 Jun 2004 20:06:33 -0000 1.2 --- Jedi.Collections.pas 25 Aug 2004 15:14:56 -0000 1.3 *************** *** 52,56 **** overload; static; class function CreateItemProperty(propertyType: System.Type; attributes: AttributeArray; component: System.Object; ! name, description: string; index, emptyValue: System.Object): PropertyDescriptor; overload; static; { Creates a property descriptor that will function as a 'new item' property. The property will get the specified --- 52,57 ---- overload; static; class function CreateItemProperty(propertyType: System.Type; attributes: AttributeArray; component: System.Object; ! name, description: string; index, emptyValue: System.Object; ! ignoreDefaultProperty: Boolean = False): PropertyDescriptor; overload; static; { Creates a property descriptor that will function as a 'new item' property. The property will get the specified *************** *** 858,927 **** class function InlineCollectionUtils.CreateItemProperty(info: PropertyInfo; component: System.Object; name, description: string; index, emptyValue: System.Object; ignoreDefaultProperty: Boolean): PropertyDescriptor; var itemInstance: System.Object; itemType: System.Type; defaultProperty: PropertyDescriptor; - mattrs: array of System.Object; - attrs: ArrayList; - i: Integer; begin ! if not Assigned(info) then ! raise ArgumentNullException.Create('info'); if not Assigned(component) then raise ArgumentNullException.Create('component'); ! itemInstance := info.GetValue(component, [index]); ! defaultProperty := nil; if not ignoreDefaultProperty then begin if Assigned(itemInstance) then ! begin ! itemType := itemInstance.GetType; ! defaultProperty := TypeDescriptor.GetDefaultProperty(itemInstance); ! end else ! begin ! itemType := info.PropertyType; ! defaultProperty := TypeDescriptor.GetDefaultProperty(info.PropertyType); ! end end else ! begin ! if Assigned(itemInstance) then ! itemType := itemInstance.GetType ! else ! itemType := info.PropertyType; ! end; ! ! if Assigned(defaultProperty) then ! Result := ItemSubPropertyDescriptor.Create(info.DeclaringType, name, description, defaultProperty, itemType, ! emptyValue, index) ! else ! begin ! mattrs := info.GetCustomAttributes(True); ! attrs := ArrayList.Create; ! for i := 0 to High(mattrs) do ! begin ! if (description = '') or (mattrs[i].GetType <> TypeOf(DescriptionAttribute)) then ! attrs.Add(mattrs[i]); ! end; ! if description <> '' then ! attrs.Add(DescriptionAttribute.Create(description)); ! ! Result := ItemPropertyDescriptor.Create(info.DeclaringType, name, itemInstance.GetType, ! AttributeArray(attrs.ToArray(TypeOf(Attribute))), emptyValue, index); ! end; ! end; - class function InlineCollectionUtils.CreateItemProperty(propertyType: System.Type; attributes: AttributeArray; - component: System.Object; name, description: string; index, emptyValue: System.Object): PropertyDescriptor; - begin - if not Assigned(propertyType) then - raise ArgumentNullException.Create('propertyType'); - if not Assigned(component) then - raise ArgumentNullException.Create('component'); if description <> '' then attributes := AttributeUtils.CombineAttributes(attributes, AttributeArray.Create(DescriptionAttribute.Create(description))); ! Result := ItemPropertyDescriptor.Create(component.GetType, name, propertyType, attributes, emptyValue, index); end; --- 859,913 ---- class function InlineCollectionUtils.CreateItemProperty(info: PropertyInfo; component: System.Object; name, description: string; index, emptyValue: System.Object; ignoreDefaultProperty: Boolean): PropertyDescriptor; + begin + if not Assigned(info) then + raise ArgumentNullException.Create('info'); + + Result := CreateItemProperty(info.PropertyType, AttributeArray(&Array(info.GetCustomAttributes(True))), component, + name, description, index, emptyValue, ignoreDefaultProperty) + end; + + class function InlineCollectionUtils.CreateItemProperty(propertyType: System.Type; attributes: AttributeArray; + component: System.Object; name, description: string; index, emptyValue: System.Object; + ignoreDefaultProperty: Boolean): PropertyDescriptor; var itemInstance: System.Object; itemType: System.Type; defaultProperty: PropertyDescriptor; begin ! if not Assigned(propertyType) then ! raise ArgumentNullException.Create('propertyType'); if not Assigned(component) then raise ArgumentNullException.Create('component'); ! if component is IList then ! itemInstance := IList(component)[Integer(index)] ! else ! if component is IDictionary then ! itemInstance := IDictionary(component)[index] ! else ! itemInstance := nil; ! if Assigned(itemInstance) then ! itemType := itemInstance.GetType ! else ! itemType := propertyType; ! if not ignoreDefaultProperty then begin if Assigned(itemInstance) then ! defaultProperty := TypeDescriptor.GetDefaultProperty(itemInstance) else ! defaultProperty := TypeDescriptor.GetDefaultProperty(propertyType); end else ! defaultProperty := nil; if description <> '' then attributes := AttributeUtils.CombineAttributes(attributes, AttributeArray.Create(DescriptionAttribute.Create(description))); ! ! if Assigned(defaultProperty) then ! Result := ItemSubPropertyDescriptor.Create(component.GetType, name, description, defaultProperty, itemType, ! emptyValue, index) ! else ! Result := ItemPropertyDescriptor.Create(component.GetType, name, propertyType, attributes, emptyValue, index); end; |
From: Marcel B. <jed...@us...> - 2004-08-04 08:28:27
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10100/main/run Modified Files: Jedi.System.pas Log Message: * Reduced the use of AttributeArray to only function result types * Added comment why the private constructor and the {$HINT OFF} directive. Index: Jedi.System.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.System.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jedi.System.pas 24 Jun 2004 20:06:33 -0000 1.2 --- Jedi.System.pas 4 Aug 2004 08:28:18 -0000 1.3 *************** *** 40,43 **** --- 40,45 ---- AttributeUtils = class (System.Object) strict private + { Avoids a hint about private symbol declared but not used. We need to declare it to prevent the compiler from + automatically generating a public constructor (due to a .NET rule) } {$HINTS OFF} constructor Create; *************** *** 48,53 **** operation: AttributeCombineOperation): ArrayList; overload; static; public ! class function CombineAttributes(attributes1, attributes2: AttributeArray): AttributeArray; overload; static; ! class function CombineAttributes(attributes1, attributes2: AttributeArray; operation: AttributeCombineOperation): AttributeArray; overload; static; class function CombineAttributes(attributes1, attributes2: AttributeCollection): AttributeCollection; --- 50,55 ---- operation: AttributeCombineOperation): ArrayList; overload; static; public ! class function CombineAttributes(attributes1, attributes2: array of Attribute): AttributeArray; overload; static; ! class function CombineAttributes(attributes1, attributes2: array of Attribute; operation: AttributeCombineOperation): AttributeArray; overload; static; class function CombineAttributes(attributes1, attributes2: AttributeCollection): AttributeCollection; *************** *** 55,65 **** class function CombineAttributes(attributes1, attributes2: AttributeCollection; operation: AttributeCombineOperation): AttributeCollection; overload; static; ! class function CombineAttributes(attributes1: AttributeArray; attributes2: AttributeCollection): AttributeArray; overload; static; ! class function CombineAttributes(attributes1: AttributeArray; attributes2: AttributeCollection; operation: AttributeCombineOperation): AttributeArray; overload; static; class function CombineAttributes(attributes1: AttributeCollection; attributes2: ! AttributeArray): AttributeCollection; overload; static; ! class function CombineAttributes(attributes1: AttributeCollection; attributes2: AttributeArray; operation: AttributeCombineOperation): AttributeCollection; overload; static; end; --- 57,67 ---- class function CombineAttributes(attributes1, attributes2: AttributeCollection; operation: AttributeCombineOperation): AttributeCollection; overload; static; ! class function CombineAttributes(attributes1: array of Attribute; attributes2: AttributeCollection): AttributeArray; overload; static; ! class function CombineAttributes(attributes1: array of Attribute; attributes2: AttributeCollection; operation: AttributeCombineOperation): AttributeArray; overload; static; class function CombineAttributes(attributes1: AttributeCollection; attributes2: ! array of Attribute): AttributeCollection; overload; static; ! class function CombineAttributes(attributes1: AttributeCollection; attributes2: array of Attribute; operation: AttributeCombineOperation): AttributeCollection; overload; static; end; *************** *** 113,122 **** end; ! class function AttributeUtils.CombineAttributes(attributes1, attributes2: AttributeArray): AttributeArray; begin Result := CombineAttributes(attributes1, attributes2, AttributeCombineOperation.AddAndReplace); end; ! class function AttributeUtils.CombineAttributes(attributes1, attributes2: AttributeArray; operation: AttributeCombineOperation): AttributeArray; begin --- 115,124 ---- end; ! class function AttributeUtils.CombineAttributes(attributes1, attributes2: array of Attribute): AttributeArray; begin Result := CombineAttributes(attributes1, attributes2, AttributeCombineOperation.AddAndReplace); end; ! class function AttributeUtils.CombineAttributes(attributes1, attributes2: array of Attribute; operation: AttributeCombineOperation): AttributeArray; begin *************** *** 137,141 **** end; ! class function AttributeUtils.CombineAttributes(attributes1: AttributeArray; attributes2: AttributeCollection): AttributeArray; begin --- 139,143 ---- end; ! class function AttributeUtils.CombineAttributes(attributes1: array of Attribute; attributes2: AttributeCollection): AttributeArray; begin *************** *** 143,147 **** end; ! class function AttributeUtils.CombineAttributes(attributes1: AttributeArray; attributes2: AttributeCollection; operation: AttributeCombineOperation): AttributeArray; begin --- 145,149 ---- end; ! class function AttributeUtils.CombineAttributes(attributes1: array of Attribute; attributes2: AttributeCollection; operation: AttributeCombineOperation): AttributeArray; begin *************** *** 151,155 **** class function AttributeUtils.CombineAttributes(attributes1: AttributeCollection; ! attributes2: AttributeArray): AttributeCollection; begin Result := CombineAttributes(attributes1, attributes2, AttributeCombineOperation.AddAndReplace); --- 153,157 ---- class function AttributeUtils.CombineAttributes(attributes1: AttributeCollection; ! attributes2: array of Attribute): AttributeCollection; begin Result := CombineAttributes(attributes1, attributes2, AttributeCombineOperation.AddAndReplace); *************** *** 157,161 **** class function AttributeUtils.CombineAttributes(attributes1: AttributeCollection; ! attributes2: AttributeArray; operation: AttributeCombineOperation): AttributeCollection; begin Result := AttributeCollection.Create(AttributeArray(CombineAttributes(ArrayList.Create(attributes1), --- 159,163 ---- class function AttributeUtils.CombineAttributes(attributes1: AttributeCollection; ! attributes2: array of Attribute; operation: AttributeCombineOperation): AttributeCollection; begin Result := AttributeCollection.Create(AttributeArray(CombineAttributes(ArrayList.Create(attributes1), |
From: Marcel B. <jed...@us...> - 2004-08-04 08:23:20
|
Update of /cvsroot/jedidotnet/main/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9387/main/run Modified Files: Jedi.Windows.Forms.Hmi.Leds.pas Log Message: * AutoSize defaults to True. * Applied DefaultValue attribute to AutoSize and BlinkInterval Index: Jedi.Windows.Forms.Hmi.Leds.pas =================================================================== RCS file: /cvsroot/jedidotnet/main/run/Jedi.Windows.Forms.Hmi.Leds.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Jedi.Windows.Forms.Hmi.Leds.pas 3 Aug 2004 14:47:27 -0000 1.3 --- Jedi.Windows.Forms.Hmi.Leds.pas 4 Aug 2004 08:23:12 -0000 1.4 *************** *** 569,575 **** {$ENDREGION} published ! [Category('Behavior'), Description('Specifies if the control resizes to the size of the led.')] property AutoSize: Boolean read FAutoSize write set_AutoSize; ! [Category('Behavior'), Description('Blinking interval in ms. Use 0 to disable blinking.')] property BlinkInterval: Double read get_BlinkInterval write set_BlinkInterval; [Category('Behavior'), Description('State of the led.')] --- 569,575 ---- {$ENDREGION} published ! [Category('Behavior'), Description('Specifies if the control resizes to the size of the led.'), DefaultValue(True)] property AutoSize: Boolean read FAutoSize write set_AutoSize; ! [Category('Behavior'), Description('Blinking interval in ms. Use 0 to disable blinking.'), DefaultValue(0.0)] property BlinkInterval: Double read get_BlinkInterval write set_BlinkInterval; [Category('Behavior'), Description('State of the led.')] *************** *** 2257,2260 **** --- 2257,2261 ---- LedStyle := SingleColorNormalLedStyle.Create; LedState := LedStyle.States[1]; + AutoSize := True; FBlinkTimer := System.Timers.Timer.Create; Include(FBlinkTimer.Elapsed, BlinkTimer_Elapsed); |