Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Accelerator problem
Accelerator problem [message #1171605] Tue, 05 November 2013 10:54 Go to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 188
Registered: August 2013
Senior Member
Hi, I created a menuItem with an Acceleator

      
fileSaveItem = new MenuItem(fileMenu, SWT.PUSH);
fileSaveItem.setText("&Save\tF11");
fileSaveItem.setAccelerator(SWT.F11);


When I run the application I get

java.lang.IllegalArgumentException: Empty key sequence definition found
	at org.eclipse.rap.rwt.internal.util.ActiveKeysUtil.translateKeySequence(ActiveKeysUtil.java:278)
	at org.eclipse.rap.rwt.internal.util.ActiveKeysUtil.translateKeySequences(ActiveKeysUtil.java:267)
	at org.eclipse.rap.rwt.internal.util.ActiveKeysUtil.renderActiveKeys(ActiveKeysUtil.java:131)
	at org.eclipse.swt.internal.widgets.displaykit.DisplayLCA.render(DisplayLCA.java:124)
	at org.eclipse.rap.rwt.internal.lifecycle.Render.execute(Render.java:29)
	at org.eclipse.rap.rwt.internal.lifecycle.PhaseExecutor.execute(PhaseExecutor.java:35)
	at org.eclipse.rap.rwt.internal.lifecycle.SimpleLifeCycle.execute(SimpleLifeCycle.java:51)
	at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.runLifeCycle(LifeCycleServiceHandler.java:139)
	at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.handlePostRequest(LifeCycleServiceHandler.java:125)
	at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:76)
	at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:67)
	at org.eclipse.rap.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:119)
	at org.eclipse.rap.rwt.engine.RWTServlet.handleRequest(RWTServlet.java:106)
	at org.eclipse.rap.rwt.engine.RWTServlet.doPost(RWTServlet.java:99)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
	at org.eclipse.jetty.server.Server.handle(Server.java:368)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
	at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
	at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
	at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
	at java.lang.Thread.run(Unknown Source)



However, when I do :
      
fileSaveItem = new MenuItem(fileMenu, SWT.PUSH);
fileSaveItem.setText("&Save\tALT+T");
fileSaveItem.setAccelerator(SWT.ALT + 'T');

it works. Is this a bug or intended? (I use RAP 2.2)
Re: Accelerator problem [message #1171856 is a reply to message #1171605] Tue, 05 November 2013 14:34 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 387
Registered: July 2009
Senior Member
Hi.

I guess it's a bug. If it works in SWT, it should work in RAP.
You could open a bugzilla report where this can be discussed.

Greetings,
Tim

Am 05.11.2013 11:54, schrieb Matthias Nick:
> Hi, I created a menuItem with an Acceleator
>
> fileSaveItem = new MenuItem(fileMenu, SWT.PUSH);
> fileSaveItem.setText("&Save\tF11");
> fileSaveItem.setAccelerator(SWT.F11);
>
>
> When I run the application I get
>
> java.lang.IllegalArgumentException: Empty key sequence definition found
> at
> org.eclipse.rap.rwt.internal.util.ActiveKeysUtil.translateKeySequence(ActiveKeysUtil.java:278)
>
> at
> org.eclipse.rap.rwt.internal.util.ActiveKeysUtil.translateKeySequences(ActiveKeysUtil.java:267)
>
> at
> org.eclipse.rap.rwt.internal.util.ActiveKeysUtil.renderActiveKeys(ActiveKeysUtil.java:131)
>
> at
> org.eclipse.swt.internal.widgets.displaykit.DisplayLCA.render(DisplayLCA.java:124)
>
> at
> org.eclipse.rap.rwt.internal.lifecycle.Render.execute(Render.java:29)
> at
> org.eclipse.rap.rwt.internal.lifecycle.PhaseExecutor.execute(PhaseExecutor.java:35)
>
> at
> org.eclipse.rap.rwt.internal.lifecycle.SimpleLifeCycle.execute(SimpleLifeCycle.java:51)
>
> at
> org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.runLifeCycle(LifeCycleServiceHandler.java:139)
>
> at
> org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.handlePostRequest(LifeCycleServiceHandler.java:125)
>
> at
> org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:76)
>
> at
> org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:67)
>
> at
> org.eclipse.rap.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:119)
>
> at
> org.eclipse.rap.rwt.engine.RWTServlet.handleRequest(RWTServlet.java:106)
> at org.eclipse.rap.rwt.engine.RWTServlet.doPost(RWTServlet.java:99)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
>
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
>
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
>
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>
> at org.eclipse.jetty.server.Server.handle(Server.java:368)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
>
> at
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
>
> at
> org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)
>
> at
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)
>
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
> at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> at
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
>
> at
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
>
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>
> at java.lang.Thread.run(Unknown Source)
>
>
>
> However, when I do :
> fileSaveItem = new MenuItem(fileMenu, SWT.PUSH);
> fileSaveItem.setText("&Save\tALT+T");
> fileSaveItem.setAccelerator(SWT.ALT + 'T');
>
> it works. Is this a bug or intended? (I use RAP 2.2)

--
Tim Buschtöns

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Accelerator problem [message #1172964 is a reply to message #1171856] Wed, 06 November 2013 07:34 Go to previous message
Matthias Nick is currently offline Matthias NickFriend
Messages: 188
Registered: August 2013
Senior Member
Hi Tim,
thanks for your answer, I opened bug 421128

Matthias
Previous Topic:e4 and RAP? Current status?
Next Topic:Mnemonic behavior
Goto Forum:
  


Current Time: Fri Nov 28 12:49:11 GMT 2014

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

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