-
Notifications
You must be signed in to change notification settings - Fork 3
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
Save in main thread #45
Conversation
…for save on close dialog"" This reverts commit 8f9fe07.
|
||
//This will stop the window from closing if an error occurs | ||
//when saving from the dialog that appears when you close a dirty tab | ||
monitor.setCanceled(true); |
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.
@atothhpe Looking at the code, it seems that doSave is only called twice and with null as a param.
monitor.setCanceled(true); will definitely throw an exception.
What will happen to "updateEntityJob.join(1000 * 10, monitor);" when monitor is null?
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.
updateEntityJob.join(1000 * 10, monitor); can have a null monitor param
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.
The monitor for the doSave is provided from the platfrom, sadly I have no idea where to get it from.
monitor.setCancelled is a problem, I need to find another way to keep the tab from closing on error
@paul-ciobanu ok, I think i fixed it |
doSave() method now locks the UI thread. Has a 10 second timeout.
This is needed for the save before close dialog to work.
If the save method would not block, the editor would close before save operation would finish