-
Notifications
You must be signed in to change notification settings - Fork 33
Ability to run multiple statements #352
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
Conversation
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
👋 A new build is available for this PR based on 67644d2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of issues and questions I have run into so far:
- For run selected:
- does not work for partial selection, i get "No statements to run". I expect it to automatically pick up the two statements because there are two statements highlighted, regardless if it is fully highlighted
- similar, if i highlight a full statement but partially highlight another statement, it will only run the fully highlighted statement. Similar to above I expect it to run both
- does not work for partial selection, i get "No statements to run". I expect it to automatically pick up the two statements because there are two statements highlighted, regardless if it is fully highlighted
- General:
- when an error happens in one of the statements it produces both a pop up error and an error in the IBM i view. Not sure if that was intended, but a bit annoying as a user. If I already have the error in the window, I do not need a notification as well. Can discuss furthur if you disagree
- Why cant run all and run from cursor also be options when things are selected?
- Not sure if this is something you want to implement, but since we have the syntax checking, if there are any errors, maybe we shouldnt be allowed to run all? The only caveat being if its actual valid syntax and the checker is incorrect. If so then maybe we can give a warning that "the syntax is incorrect, would you like to still run all".
- if a statement is taking awhile, and i happen to edit the file while i wait, will that break the upcoming statement? Or are we saving the statements before we start the whole run?
In better news, I like that it highlights which statement is currently running!
Adding on, it does seem like you are saving the statements, not sure how that works when a file is edited though (is the get of the document a snapshot?). |
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
If you edit a document while it is running the statements, they will run as the statements were run it was initiated, but the ranges may be incorrect when it comes around the the next statement being executed is selected. We could add some logic to re-parse the document after every statement is run to grab the current changes.. though that might be slow for very very large documents. |
--
-- Watch compare progress / activity
--
SELECT *
FROM TABLE (
qsys2.active_job_info(
job_name_filter => 'IFSCOMP', subsystem_list_filter => 'QBATCH')
);
stop; |
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
@forstie New build is coming.
|
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
I think if you just pre-parse all the statements out, then run it all, that should avoid accidentally messing up the run. I dont think we should reparse the document and pick up new changes, that seems unnecessary overhead. Essentially just run it as a snapshot of when the button was hit |
Aside from the issue with CL vs cl, looks good! |
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
@julesyan A new commit is in to make the prefixes case insensitive. |
Everything is looking super now. Thanks for the adjustments! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent.
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Run Selected works correctly after the change, thank you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
The only thing to consider is short cuts to these great new actions.
This adds new options under the play button.
Shown when there is no selection:
Shown when there is a selection:
This will execute all statements, but only show the result set for the last statement. Prefixes like
cl
,csv
, etc, are still allowed and will work as they do when running single statements.If a statement is execute and it errors, then no more statements will be executed.
If you use
stop
, then the statement execution will stop.