Community
Participate
Working Groups
Build 20020508 - had file open in project B - sync'ed project A - it prompted to save changes to the file It should only prompt for the resources being sync'ed.
We have no API to do this. We are calling IWorkbenchPage.saveAllEditors(), which is consistent with the way that refactoring et al. prompt. This won't be changed for M6.
later, would require different API than what we have avail now
Reopening
The UI in question is providd by the UI component so moving to UI for comment.
Would the following API be enough? IWorkbench.getDirtyEditors() returning an IEditorPart[] IWorkbench.saveEditors(IEditorPart[],boolean confirm) So you would call getDirtyEditors(), filter out the ones you do not care about and then call saveEditors().
As long as an IEditorPart adapts to the resource that is being edited, that API should be adequate.
No, IEditorPart do not adapt to IResource. I am going to defer it for 3.0 if it is OK with you. PS. We released API in IWorkbench to save all editors so you do not have to loop on all windows and pages. This means the user gets only one dialog instead of one for each window.
See bug 24841 and bug 24843.
Note that you can get the file for an editor by asking for the file or resource adapter on the editor's input: editor.getEditorInput().getAdapter(IFile.class). At least, that works for editors that use FileEditorInput. If an editor has its own kind of input, there are no guarantees that it supports this (though it should if it's editing a resource).
If the above is true, then the API proposed by Eduardo should be adequate.
Is this still an issue in 3.2?
I seem to recall it still being an issue earlier in 3.2, but I just tried in RC5 and it seems better: - modify file in project 1 without saving - sync project 2 - no prompt
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.