Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Ctrl+S with editor doesn't work with RAP (but works with RCP)(org.eclipse.ui.internal.handlers.SaveHandler doesn't exsists for RAP?)
Ctrl+S with editor doesn't work with RAP (but works with RCP) [message #739429] Mon, 17 October 2011 09:20 Go to next message
Angelo ZERR is currently offline 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 #739569 is a reply to message #739429] Mon, 17 October 2011 12:04 Go to previous messageGo to next message
Arnaud MERGEY is currently offline Arnaud MERGEY
Messages: 86
Registered: March 2010
Location: France
Member
Hello Angelo,

what version of RAP are you using ? key binding has been added in 1.4, so you should be able to save editor using Ctrl+S

http://www.eclipse.org/rap/noteworthy/1.4/#JFace%20/%20Workbench

Regards,
Arnaud

[Updated on: Mon, 17 October 2011 12:08]

Report message to a moderator

Re: Ctrl+S with editor doesn't work with RAP (but works with RCP) [message #739575 is a reply to message #739569] Mon, 17 October 2011 12:09 Go to previous messageGo to next message
Angelo ZERR is currently offline Angelo ZERR
Messages: 111
Registered: July 2009
Senior Member
Hi Arnaud,

I'm using RAP 1.5 from the P2 http://download.eclipse.org/rt/rap/1.5/runtime

Regards Angelo
Re: Ctrl+S with editor doesn't work with RAP (but works with RCP) [message #739662 is a reply to message #739575] Mon, 17 October 2011 14:03 Go to previous messageGo to next message
Arnaud MERGEY is currently offline Arnaud MERGEY
Messages: 86
Registered: March 2010
Location: France
Member
I have tested with RAP 1.5 and Ctrl+S works also by default for me.

You can look at the simple snippet I attach (it works with RCP or RAP), you can double-click on an item in the tree. Adding something in Text set the editor as dirty, then you should be able to save it using Ctrl+S

Hope it will help you to find what is wrong

regards,
Arnaud
  • Attachment: snippet.zip
    (Size: 30.04KB, Downloaded 55 times)

[Updated on: Mon, 17 October 2011 14:04]

Report message to a moderator

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 Go to previous messageGo to next message
Angelo ZERR is currently offline 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

Re: Ctrl+S with editor doesn't work with RAP (but works with RCP) [message #739842 is a reply to message #739662] Mon, 17 October 2011 19:08 Go to previous messageGo to next message
Angelo is currently offline Angelo
Messages: 27
Registered: July 2009
Junior 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 hzd 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
Re: Ctrl+S with editor doesn't work with RAP (but works with RCP) [message #758883 is a reply to message #739842] Thu, 24 November 2011 21:21 Go to previous messageGo to next message
wahyu  is currently offline wahyu
Messages: 4
Registered: November 2011
Junior Member
how you act then? if I can save the file with the code SWT.SAVE?


best..
Re: Ctrl+S with editor doesn't work with RAP (but works with RCP) [message #758884 is a reply to message #739842] Thu, 24 November 2011 21:21 Go to previous message
wahyu  is currently offline wahyu
Messages: 4
Registered: November 2011
Junior Member
how you act then? if I can save the file with the code SWT.SAVE?


best..
Previous Topic:filedialog save not working
Next Topic:Remote Debugging in RAP
Goto Forum:
  


Current Time: Fri May 24 01:22:17 EDT 2013

Powered by FUDForum. Page generated in 0.15342 seconds