I'm creating E4 RCP application in that I have one part. I want to implement "Save As" functionality for my Part, as it is implemented for Editors (Like:Java file Editor).
Requirements:
- When user click on my part "Save As" option should be enable.
- When user click on "Save As" option my code should run so that I can do what I want.
So my question is for this what should I do, is I have to implement any extension point or any this else. ?
In a pure e4 application there is no built in support for Save As so you will need to code this yourself.
To be consistent with the
@Persist
support for Save I would suggest doing this with an annotation, lets call it@PersistAs
:You will have to add a command definition for 'save as' along with a handler and menu items in the usual way.
The handler for Save As would look something like:
and in your part you would have:
In Eclipse 3 compatibility mode you implement the
doSaveAs
andisSaveAsAllowed
methods in yourEditorPart
.