| Ctrl+S with editor doesn't work with RAP (but works with RCP) [message #739429] |
Mon, 17 October 2011 09:20  |
Angelo ZERR Messages: 111 Registered: July 2009 |
Senior Member |
|
|
Hi RAP Team,
I have implemented a FormEditor for our RCP/RAP application and I have discovered that Ctrl+S (to save the editor) on the editor works with RCP but not with RAP.
I have debugged my RAP and RCP Application and for RCP it call org.eclipse.ui.internal.handlers.SaveHandler although for RAP org.eclipse.ui.internal.handlers.SaveHandler doesn't exsist?
So I suspect that is the problem.
For RCP Save command is declared with SaveHandler like this :
<command
name="%command.save.name"
description="%command.save.description"
categoryId="org.eclipse.ui.category.file"
defaultHandler="org.eclipse.ui.internal.handlers.SaveHandler"
id="org.eclipse.ui.file.save" />
Although for RAP:
<command
name="%command.save.name"
description="%command.save.description"
categoryId="org.eclipse.ui.category.file"
id="org.eclipse.ui.file.save" />
Is it a bug? Or must I develop my own Command Handler? If I must do that, how to manage that?
Thank a lot for your help.
Regards Angelo
|
|
|
|
|
|
| Re: Ctrl+S with editor doesn't work with RAP (but works with RCP) [message #739840 is a reply to message #739662] |
Mon, 17 October 2011 19:08   |
Angelo ZERR Messages: 111 Registered: July 2009 |
Senior Member |
|
|
Hi Arnaud,
Many thank's for your great sample! I have studied your sample and I have do like you. The only difference with your sample is that in my ActionBarAdvisor implementation , I had not defined the save action as you :
protected void makeActions(IWorkbenchWindow window) {
register(ActionFactory.SAVE.create(window));
}
So I have added those code lines in my ActionBarAdvisor implementation and it works great!
For information, for RCP you need not to add the previous code (but it works too if you use this code) and for RAP you need to add the previous code for Ctrl+S.
Regards Angelo
[Updated on: Mon, 17 October 2011 19:38] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.15342 seconds