Skip to main content


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 13:20 Go to next message
Angelo ZERR is currently offline Angelo ZERRFriend
Messages: 122
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 16:04 Go to previous messageGo to next message
Arnaud MERGEY is currently offline Arnaud MERGEYFriend
Messages: 243
Registered: March 2010
Location: France
Senior 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 16: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 16:09 Go to previous messageGo to next message
Angelo ZERR is currently offline Angelo ZERRFriend
Messages: 122
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 18:03 Go to previous messageGo to next message
Arnaud MERGEY is currently offline Arnaud MERGEYFriend
Messages: 243
Registered: March 2010
Location: France
Senior 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 186 times)

[Updated on: Mon, 17 October 2011 18: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 23:08 Go to previous messageGo to next message
Angelo ZERR is currently offline Angelo ZERRFriend
Messages: 122
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 23: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 23:08 Go to previous messageGo to next message
Angelo is currently offline AngeloFriend
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] Fri, 25 November 2011 02:21 Go to previous messageGo to next message
wahyu  is currently offline wahyu Friend
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] Fri, 25 November 2011 02:21 Go to previous message
wahyu  is currently offline wahyu Friend
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:Deploy rap on virgo with root as URL
Next Topic:Ctrl+S with editor doesn't work with RAP (but works with RCP)
Goto Forum:
  


Current Time: Mon May 13 09:41:13 GMT 2024

Powered by FUDForum. Page generated in 0.04084 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top