Skip to content
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

Add execute/evaluate to TreeEditor #9836

Merged
merged 14 commits into from
Jun 6, 2021

Conversation

danielb987
Copy link
Contributor

@dsand47
This PR adds the popup menu item "Execute" or "Evaluate" when you right click (command click) on an action or expression in the ConditionalNG editor.

If you select Execute on an action, that action is executed and a message box is shown when the action is completed.
If you select Evaluate on an expression, that expression is evaluated and the result is shown in a message box when the expression is completed.

This allows you to execute/evaluate only a part of the tree, which might be useful for debugging.

One thing is still missing: If the tree has local variables, these variables are initialized. But the user has no way to change these variables. When execute/evaluate is selected and there is local variables, I will show a table to the user there he might give other values to the variables if he wants to.

@danielb987 danielb987 added this to the 4.23.7 milestone May 27, 2021
@danielb987 danielb987 self-assigned this May 27, 2021
@mergeable mergeable bot added the New PR Newly created PR that is less than 1 day old label May 27, 2021
@mergeable
Copy link

mergeable bot commented May 27, 2021

Thanks for the PR. Please consider adding a release note in the help/en/releasenotes/current-draft-note.shtml file.

@mergeable mergeable bot added the Needs L10N Needs localization label May 27, 2021
@mergeable
Copy link

mergeable bot commented May 27, 2021

Thanks for the PR. It includes changes to properties files, so the 'Needs L10N' label has been added"

@danielb987
Copy link
Contributor Author

It doesn't currently work to execute/evaluate an action/expression in a Module. But I'm working on that.

@codecov
Copy link

codecov bot commented May 28, 2021

Codecov Report

Merging #9836 (94632fd) into master (b204c88) will decrease coverage by 0.1%.
The diff coverage is 34.6%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master    #9836     +/-   ##
===========================================
- Coverage      51.8%    51.8%   -0.0%     
- Complexity    64065    64116     +51     
===========================================
  Files          5098     5101      +3     
  Lines        445013   445246    +233     
  Branches      64285    64335     +50     
===========================================
+ Hits         230169   230281    +112     
- Misses       192120   192201     +81     
- Partials      22724    22764     +40     
Impacted Files Coverage Δ
java/src/jmri/jmrit/logixng/MaleSocket.java 65.0% <ø> (ø)
java/src/jmri/jmrit/logixng/SymbolTable.java 81.3% <ø> (ø)
.../jmri/jmrit/logixng/actions/LogLocalVariables.java 37.1% <0.0%> (ø)
...gixng/actions/swing/AbstractAnalogActionSwing.java 60.0% <0.0%> (-15.0%) ⬇️
...ixng/actions/swing/AbstractBooleanActionSwing.java 80.0% <0.0%> (-20.0%) ⬇️
...gixng/actions/swing/AbstractStringActionSwing.java 60.0% <0.0%> (-15.0%) ⬇️
...pressions/swing/AbstractAnalogExpressionSwing.java 60.0% <0.0%> (-15.0%) ⬇️
...pressions/swing/AbstractStringExpressionSwing.java 60.0% <0.0%> (-15.0%) ⬇️
...rit/logixng/implementation/AbstractMaleSocket.java 58.8% <0.0%> (ø)
...implementation/DefaultMaleDigitalActionSocket.java 93.2% <ø> (ø)
... and 80 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b204c88...94632fd. Read the comment docs.

@coveralls
Copy link

coveralls commented May 28, 2021

Coverage Status

Coverage increased (+0.004%) to 56.891% when pulling 94632fd on danielb987:UpdateConditionalNGEditor_2 into b204c88 on JMRI:master.

@mergeable mergeable bot removed the New PR Newly created PR that is less than 1 day old label May 28, 2021
@danielb987 danielb987 changed the title WIP - Add execute/evaluate to TreeEditor Add execute/evaluate to TreeEditor Jun 5, 2021
@danielb987
Copy link
Contributor Author

Ready for review.

@danielb987 danielb987 requested a review from dsand47 June 6, 2021 08:00
Copy link
Contributor

@dsand47 dsand47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The evaluate/execute menu items work fine.
The Table: for each works. The new dialog structure and descriptions are much better.

@danielb987 danielb987 merged commit e081939 into JMRI:master Jun 6, 2021
@danielb987 danielb987 deleted the UpdateConditionalNGEditor_2 branch June 6, 2021 13:35
@danielb987 danielb987 modified the milestones: 4.23.8, 4.23.7 Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs L10N Needs localization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants