-
Notifications
You must be signed in to change notification settings - Fork 193
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
ISaveablePart2.promptToSaveOnClose() invoke on "Save All" #173
Comments
From our tests, it seems that we did not have the prompt on "Save All" under Eclipse 2019-06, but it is present when using Eclipse 2020-06 (we have not tested the intermediate versions). |
Do you think you can write a test-case that reproduces it with a plain text editor? Or at least if you cannot provide a working JUnit Test, some steps to reproduce with plain Eclipse SDK? |
I'm investigating. I can't reproduce yet outside of Sirius, it might be related to the fact that we can have multiple editors associated to a single in memory session (an EMF ResourceSet), se we have an intermediate |
Still trying to understand what's happening exactly in our case. @Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
IWorkbenchPage page = window.getActivePage();
if (page != null) {
((WorkbenchPage) page).saveAllEditors(false, false, true); // A
}
EPartService partService = getPartService(window);
if (partService != null && (partService.getDirtyParts().size() > 0)) {
partService.saveAll(false); // B
}
return null;
} Line A triggers an asynchronous job (launched by
I can not reproduce with a simple text editor because it |
The second part of the method (starting from |
The Javadoc for
ISaveablePart2.promptToSaveOnClose()
indicates that:In Sirius we have a case where it is invoked also on "Save All" (not on a plain "Save"), with the following stack (
DDiagramEditorImpl
is in Sirius, and ):In our case this triggers a (redundant) prompt to save dialog when the end user hits "Save All".
I don't understand why
WorkbenchWindow$2.saveParts
, which is asked just to save our editor invokesSaveablesList.preCloseParts
.The text was updated successfully, but these errors were encountered: