eclipse-rcpe4

How to customize default SaveHandler of an e4 application?


In my e4 application, I am using the default ISaveHandler(which i have not defined explicitly anywhere) as shown in the image.

I just need to update the icon, title & text of this handler, rest works fine for me for single mPart save or multiple mPart save prompt.

I don't want to create my own save handler UI. Even if I could inherit the original one, that will work for me.

[4]## Heading ##[1]


Solution

  • That dialog is an inner class of org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer so you can't get at it. I don't think you have any choice but to write your own ISaveHandler and the dialog.

    You might be able to use org.eclipse.e4.ui.internal.workbench.PartServiceSaveHandler to do some of the work.

    To use your save handler everywhere set it in the main window context. (see this question).