Page 1 of 1

PropertyDepot - property code generator and repository

Posted: 26 Nov 2022 14:27
by Harrison Pratt
Ever get annoyed by all the code you have to type to support properties ... and then you need to make a few changes and have to reorganize it all? Yeah, me too!

PropertyDepot is will let you maintain a database of your own sets of properties and generate property or single fact code that you can paste into your .i, .cl and .pro files.

When you are done exploring the sample database, just delete all the *.PDB files and start creating your own database.

Merry Christmas! :-)

ADDENDUM as of 12 February 2023:
The project ZIP file is obsolete and has been deleted.
Use the updated PropertyDepot.zip in the following post.
PropertyDepot Screenshot 2022-11-26 080733.jpg
PropertyDepot Screenshot 2022-11-26 080733.jpg (164.42 KiB) Viewed 368 times

Re: PropertyDepot - property code generator and repository

Posted: 12 Feb 2023 18:38
by Harrison Pratt
PropertyDepot is updated as follows:

Domains may be prefixed with '::'

Code: Select all

    propColor : ::color
Parameter labels are allowed

Code: Select all

  myTerm : trm( string ID, real Value )     myRect : vpiDomains::rct( integer X, integer Y, integer Right, integer Bottom )
Tuple definitions are supported, as is star-list syntax

Code: Select all

    propTuple : tuple{ string Label, integer Value }     propTuples : tuple{ string Label, integer Value }* % you can use a comment     propList : real*
Miscellaneous updates
  • Property Import supports the above structures and now will also import in-line comments for imported properties.
  • Helpful error messages are displayed when various parsing errors are encountered during code generation.
  • Minor aesthetic changes are made in the Property Editor dialog.
  • There is no change in the database structure.
The attached project here fully replaces the original one posted 26 Nov 2022.

Re: PropertyDepot - property code generator and repository

Posted: 14 Feb 2023 10:44
by Thomas Linder Puls
I think you should use the sciLexer instead of an edit control. So I have update a few files.
Using sciLexer
Using sciLexer
using_sciLexer.png (86.65 KiB) Viewed 181 times
I have problems with string properties.

You should also notice that auto-formatting will write the code differently.

Re: PropertyDepot - property code generator and repository

Posted: 14 Feb 2023 14:58
by Harrison Pratt
Thanks for the sciLexer update -- that's much better.

I realize that autoFormat will change the layout. I laid out the generated code to be easy to read in the generated-code dialog.

About the string problem, did you not quote the string value or did you see different kind of error? There is a specific error message for an unquoted string.

Do you have any other suggestions?

Re: PropertyDepot - property code generator and repository

Posted: 15 Feb 2023 14:50
by Harrison Pratt
Updated properties_PACKAGE folder attached as ZIP file.

Attachment deleted. Use the package in the 16 February 2023 post below.

Re: PropertyDepot - property code generator and repository

Posted: 16 Feb 2023 9:21
by Thomas Linder Puls
Regarding string: I didn't supply a value. I assumed it would work since that worked for integer, etc.

Re: PropertyDepot - property code generator and repository

Posted: 16 Feb 2023 13:04
by Harrison Pratt
Fixed it. I neglected to consider empty string when checking for unquoted string value.

myString : string should generate myString_fact : string := erroneous. and supporting clauses.

Thanks.