Community
Participate
Working Groups
Very related to: https://bugs.eclipse.org/bugs/show_bug.cgi?id=286699 The server editor can have multiple pages. Bug 286699 addresses new pages. However, I've added a ServerEditorSection on the first page, OverviewEditorPart. However, OverviewEditorPart.doSave(), or ServerEditorPart.doSave() does not call doSave() on the children sections. In fact, the children sections have no doSave() api at all. I recognize the idea here is that we should only be editing objects in the IServerWorkingCopy and so the sections themselves shouldn't need to save anything, however our editor would like to keep some data in external models, for example, eclipse secure storage. Being limited here to only adding data to the IServerWorkingCopy is hard to deal with. A workaround is to add an additional page, and add this section to a ServerEditorPart which is not OverviewEditorPart. Then, my custom page can take whatever actions it wants. While this workaround is effective, it is very limiting in that it forces our UI to change because of a limitation on the first page.
Created attachment 208755 [details] A patch adding the required API I hope this patch is safe and uncontroversial enough that we can maybe push this into a release without too much delay.
The only possible dangers I see here is if one of the sections do not properly catch all exceptions, and somehow throw a RuntimeException. This could potentially blow up the stack during a doSave... however I would see this more as a coding error in the ServerEditorSection that decides to make use of this new functionality. So long as all overriders of the method properly catch and handle all exceptions, this should work fine.
Created attachment 208785 [details] v1.0 The logic looks good. The updated patch is based on the original submitted patch with some code cleanup and provide the default implementation to increment the progress monitor properly even if the adopter decided not to overwrite the doSave() method.
Code released to 32M and HEAD
New Gerrit change created: https://git.eclipse.org/r/109087
New Gerrit change created: https://git.eclipse.org/r/109085