-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement menu validation based on a string expression #23
Labels
enhancement
New feature or request
Milestone
Comments
An external library may be required for evaluating the string expressions.
|
More candidate:
or code my own parser as described here. |
Some use case scenarios: <visibility expression="${selection.count} == 3" />
<visibility expression=""${my_software.active}" == "true"" />
<visibility expression=""%{level}" == "unknown" || "%{level}" == "top"" />
<visibility expression="length(${selection.path}) >= 10" />
<visibility expression="'${myapp.state}' == 'PAUSED'" /> |
end2endzone
added a commit
that referenced
this issue
Sep 15, 2020
…matically. The project `libeval` was created to wrap exprtk library for easier usage. Implemented Validator::SetExprtk() and Validator::GetExprtk() with tests. Created the following new properties: `selection.count`, `selection.files.count` and `selection.directories.count`. For issue #23.
end2endzone
added a commit
that referenced
this issue
Sep 15, 2020
Add a dependency to INSTALL.md: [exprtk d312ba9](https://github.com/ArashPartow/exprtk) (downloaded automatically) Add the missing license file to |
end2endzone
added a commit
that referenced
this issue
Nov 14, 2020
* feature-issue23: Updated CHANGES for this issue. Merged 'master' into 'feature-issue23' branch. Added a small contribution. Small correction in exprtk attribute documentation. Added documentation for exprtk attribute on <property> elements. Small corrections. Fixed libEval::evaluate() to prevent buffer overflows. Implemented exprtk attribute support for ActionProperty. Created unit tests for ActionProperty. Implemented exprtk error logging when validating for visibility or validity. Errors are added to the logs. Implemented error support in libEval (with unit tests). Updated INSTALL.md document for exprtk dependency. Updated UserManual.md for exprtk attribute Added exprtk license file: exprtk LICENSE.txt Implemented logging for Validator class when an invalid value for class or exprtk attributes. Implemented more testing for exprtk attribute. Added exprtk license file: exprtk LICENSE.txt Implemented inversed exprtk support and tests. Implemented parsing of attribute `exprtk`. For issue #23. Partially reverted code that was commented in error. Added a dependency to Exprtk. The library is downloaded and used automatically. The project `libeval` was created to wrap exprtk library for easier usage. Implemented Validator::SetExprtk() and Validator::GetExprtk() with tests. Created the following new properties: `selection.count`, `selection.files.count` and `selection.directories.count`. For issue #23. Enabled building of branch `feature-issue23`.
end2endzone
added a commit
that referenced
this issue
Nov 21, 2020
Squashed commit of the following: commit 5969148 Merge: b0ebc99 da19eaf Author: Antoine <[email protected]> Date: Sat Nov 14 12:29:28 2020 -0500 Merge branch 'feature-issue23' #23 * feature-issue23: Updated CHANGES for this issue. Merged 'master' into 'feature-issue23' branch. Added a small contribution. Small correction in exprtk attribute documentation. Added documentation for exprtk attribute on <property> elements. Small corrections. Fixed libEval::evaluate() to prevent buffer overflows. Implemented exprtk attribute support for ActionProperty. Created unit tests for ActionProperty. Implemented exprtk error logging when validating for visibility or validity. Errors are added to the logs. Implemented error support in libEval (with unit tests). Updated INSTALL.md document for exprtk dependency. Updated UserManual.md for exprtk attribute Added exprtk license file: exprtk LICENSE.txt Implemented logging for Validator class when an invalid value for class or exprtk attributes. Implemented more testing for exprtk attribute. Added exprtk license file: exprtk LICENSE.txt Implemented inversed exprtk support and tests. Implemented parsing of attribute `exprtk`. For issue #23. Partially reverted code that was commented in error. Added a dependency to Exprtk. The library is downloaded and used automatically. The project `libeval` was created to wrap exprtk library for easier usage. Implemented Validator::SetExprtk() and Validator::GetExprtk() with tests. Created the following new properties: `selection.count`, `selection.files.count` and `selection.directories.count`. For issue #23. Enabled building of branch `feature-issue23`. commit da19eaf Author: Antoine <[email protected]> Date: Sat Nov 14 12:21:04 2020 -0500 Updated CHANGES for this issue. commit 249dc78 Author: Antoine <[email protected]> Date: Sat Nov 14 12:07:11 2020 -0500 Merged 'master' into 'feature-issue23' branch. Squashed commit of the following: commit b0ebc99 Author: Antoine <[email protected]> Date: Sat Nov 14 11:40:54 2020 -0500 Increased product version to 0.6.0. commit 0aa7e75 Author: Antoine <[email protected]> Date: Sat Nov 14 10:10:06 2020 -0500 Updated CHANGES for v0.5.1. commit 7bbc45d Author: Antoine <[email protected]> Date: Sat Nov 14 09:27:16 2020 -0500 Moved the generated html files (from markdown) to the build directory. commit 2e83c44 Author: Antoine <[email protected]> Date: Sat Nov 14 08:44:03 2020 -0500 Modified Wix installer: - Application how installs in directory `C:\Program Files\ShellAnything 0.5.1`. - Start menu entry is now named `ShellAnything 0.5.1` instead of `ShellAnything`. For issue #75 commit 8185779 Author: Antoine <[email protected]> Date: Fri Nov 13 20:16:51 2020 -0500 Added AUTHORS, CHANGES, LICENSE and CONTRIBUTING.md files to installer package. Text files without extensions are packaged with 'txt' file extension. For issue #75 commit 270c48e Author: Antoine <[email protected]> Date: Fri Nov 13 20:16:12 2020 -0500 Increased product to 0.5.1. commit 1af4c0c Merge: c2e7699 2a14529 Author: Mindaugas <[email protected]> Date: Sun Nov 8 09:40:29 2020 +0200 Merge pull request #74 from end2endzone/feature-issue56 Reintegrating issue #56 into master branch. commit 2a14529 Author: Antoine <[email protected]> Date: Sat Nov 7 10:58:28 2020 -0500 Modified TestActionExecute.testVerb() to use shellanything_unittest.exe for debugging instead of cmd.exe which does not well with 'runas' verb. commit 740af0f Author: Antoine <[email protected]> Date: Sat Nov 7 10:57:20 2020 -0500 Modified ArgumentsHandler::PrintProcessSettings() to also print command line arguments and also print the settings to an output file. commit 7412ab8 Author: Antoine <[email protected]> Date: Sat Nov 7 09:22:08 2020 -0500 Implemented custom command line arguments in unit tests. commit bff3894 Author: Antoine <[email protected]> Date: Tue Nov 3 17:35:52 2020 -0500 Modified ActionExecute::Execute() to delegate to ExecuteVerb() or ExecuteProcess(). Created unit tests. commit 23e3df9 Author: Antoine <[email protected]> Date: Sun Nov 1 07:54:18 2020 -0500 Updated CHANGES file. Moved `ActionExecute::StartProcess()` private. Fixed a bad copy paste for `ActionExecute::SetVerb()` and `ActionExecute::GetVerb()`. Updated documentation for verb attribute of <exec> element. Fixed missing closing quotes in logs of ActionExecute::Execute(). Created TestObjectFactory.testParseActionExecute() unit tests to validate parsing. For issue #56. commit d0de816 Author: Mindaugas <[email protected]> Date: Wed Oct 7 21:21:16 2020 +0300 Migrating from CreateProcess to ShellExecuteEx commit c2e7699 Author: Antoine <[email protected]> Date: Sat Oct 3 08:26:27 2020 -0400 Updated CHANGES for issue #54. commit 8659617 Author: Mindaugas <[email protected]> Date: Wed Sep 30 21:56:56 2020 +0300 Bitmap device-independent (DIP) transparency corrections commit aa627ad Author: Mindaugas <[email protected]> Date: Sun Sep 27 21:26:45 2020 +0300 Bitmap device-independent (DIP) transparency commit 0be9aac Author: Antoine <[email protected]> Date: Sat Nov 14 12:05:47 2020 -0500 Added a small contribution. commit b0ebc99 Author: Antoine <[email protected]> Date: Sat Nov 14 11:40:54 2020 -0500 Increased product version to 0.6.0. commit 0aa7e75 Author: Antoine <[email protected]> Date: Sat Nov 14 10:10:06 2020 -0500 Updated CHANGES for v0.5.1. commit 7bbc45d Author: Antoine <[email protected]> Date: Sat Nov 14 09:27:16 2020 -0500 Moved the generated html files (from markdown) to the build directory. commit 2e83c44 Author: Antoine <[email protected]> Date: Sat Nov 14 08:44:03 2020 -0500 Modified Wix installer: - Application how installs in directory `C:\Program Files\ShellAnything 0.5.1`. - Start menu entry is now named `ShellAnything 0.5.1` instead of `ShellAnything`. For issue #75 commit 8185779 Author: Antoine <[email protected]> Date: Fri Nov 13 20:16:51 2020 -0500 Added AUTHORS, CHANGES, LICENSE and CONTRIBUTING.md files to installer package. Text files without extensions are packaged with 'txt' file extension. For issue #75 commit 270c48e Author: Antoine <[email protected]> Date: Fri Nov 13 20:16:12 2020 -0500 Increased product to 0.5.1. commit 1af4c0c Merge: c2e7699 2a14529 Author: Mindaugas <[email protected]> Date: Sun Nov 8 09:40:29 2020 +0200 Merge pull request #74 from end2endzone/feature-issue56 Reintegrating issue #56 into master branch. commit 2a14529 Author: Antoine <[email protected]> Date: Sat Nov 7 10:58:28 2020 -0500 Modified TestActionExecute.testVerb() to use shellanything_unittest.exe for debugging instead of cmd.exe which does not well with 'runas' verb. commit 740af0f Author: Antoine <[email protected]> Date: Sat Nov 7 10:57:20 2020 -0500 Modified ArgumentsHandler::PrintProcessSettings() to also print command line arguments and also print the settings to an output file. commit 7412ab8 Author: Antoine <[email protected]> Date: Sat Nov 7 09:22:08 2020 -0500 Implemented custom command line arguments in unit tests. commit bff3894 Author: Antoine <[email protected]> Date: Tue Nov 3 17:35:52 2020 -0500 Modified ActionExecute::Execute() to delegate to ExecuteVerb() or ExecuteProcess(). Created unit tests. commit 23e3df9 Author: Antoine <[email protected]> Date: Sun Nov 1 07:54:18 2020 -0500 Updated CHANGES file. Moved `ActionExecute::StartProcess()` private. Fixed a bad copy paste for `ActionExecute::SetVerb()` and `ActionExecute::GetVerb()`. Updated documentation for verb attribute of <exec> element. Fixed missing closing quotes in logs of ActionExecute::Execute(). Created TestObjectFactory.testParseActionExecute() unit tests to validate parsing. For issue #56. commit adc1a2d Author: Antoine <[email protected]> Date: Sat Oct 31 09:41:26 2020 -0400 Small correction in exprtk attribute documentation. commit 7bfe79d Author: Antoine <[email protected]> Date: Sat Oct 31 09:33:54 2020 -0400 Added documentation for exprtk attribute on <property> elements. commit dc3c459 Author: Antoine <[email protected]> Date: Sat Oct 31 09:27:09 2020 -0400 Small corrections. commit 22879cb Author: Antoine <[email protected]> Date: Sat Oct 24 12:00:03 2020 -0400 Fixed libEval::evaluate() to prevent buffer overflows. commit 98fea11 Author: Antoine <[email protected]> Date: Fri Oct 23 19:00:02 2020 -0400 Implemented exprtk attribute support for ActionProperty. Created unit tests for ActionProperty. commit 74447c0 Author: Antoine <[email protected]> Date: Thu Oct 22 18:57:57 2020 -0400 Implemented exprtk error logging when validating for visibility or validity. Errors are added to the logs. commit 2990f9d Author: Antoine <[email protected]> Date: Wed Oct 21 18:55:48 2020 -0400 Implemented error support in libEval (with unit tests). commit 0aef7da Author: Antoine <[email protected]> Date: Fri Oct 16 20:51:46 2020 -0400 Updated INSTALL.md document for exprtk dependency. Updated UserManual.md for exprtk attribute commit f70cd8d Author: Antoine <[email protected]> Date: Fri Oct 16 20:48:55 2020 -0400 Added exprtk license file: exprtk LICENSE.txt commit c91c033 Author: Antoine <[email protected]> Date: Fri Oct 16 20:48:34 2020 -0400 Implemented logging for Validator class when an invalid value for class or exprtk attributes. Implemented more testing for exprtk attribute. Added exprtk license file: exprtk LICENSE.txt commit d0de816 Author: Mindaugas <[email protected]> Date: Wed Oct 7 21:21:16 2020 +0300 Migrating from CreateProcess to ShellExecuteEx commit 504f74e Author: Antoine <[email protected]> Date: Sun Oct 4 09:13:01 2020 -0400 Implemented inversed exprtk support and tests. commit c2e7699 Author: Antoine <[email protected]> Date: Sat Oct 3 08:26:27 2020 -0400 Updated CHANGES for issue #54. commit 8659617 Author: Mindaugas <[email protected]> Date: Wed Sep 30 21:56:56 2020 +0300 Bitmap device-independent (DIP) transparency corrections commit aa627ad Author: Mindaugas <[email protected]> Date: Sun Sep 27 21:26:45 2020 +0300 Bitmap device-independent (DIP) transparency commit f7ecf2c Author: Antoine <[email protected]> Date: Tue Sep 15 19:12:45 2020 -0400 Implemented parsing of attribute `exprtk`. For issue #23. commit cb6b893 Author: Antoine <[email protected]> Date: Mon Sep 14 20:21:42 2020 -0400 Partially reverted code that was commented in error. commit 08f21fb Author: Antoine <[email protected]> Date: Mon Sep 14 20:20:50 2020 -0400 Added a dependency to Exprtk. The library is downloaded and used automatically. The project `libeval` was created to wrap exprtk library for easier usage. Implemented Validator::SetExprtk() and Validator::GetExprtk() with tests. Created the following new properties: `selection.count`, `selection.files.count` and `selection.directories.count`. For issue #23. commit ab055c9 Author: Antoine <[email protected]> Date: Sun Sep 13 08:46:48 2020 -0400 Enabled building of branch `feature-issue23`. commit 02fcca0 Author: Antoine <[email protected]> Date: Mon Sep 7 10:22:05 2020 -0400 Fixed a small issue with pattern attribute documentation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The system should implement a way to define a a menu validation based on an expression that contains a property, an operator and a expected value.
For instance,
${myproperty}=="true"
would validate a<visibility>
or<visibility>
node only if the value of propertymyproperty
is set to the valuetrue
.The attribute sugested for specifying an expression would be
propertyexpression
.For instance:
This kind of validation would allow the application to support "exclusive menus". For instance, in a 2 menu scenario, the application would be able to only show one of the two menus at a time.
For instance, the following could be implemented:
The text was updated successfully, but these errors were encountered: