Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 438277

Summary: IllegalArgumentException when using CTRL + (ZoomIn) as key binding
Product: [RT] RAP Reporter: Nils <nsaalfeld>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.3   
Target Milestone: 3.0 M1   
Hardware: PC   
OS: Windows 8   
Whiteboard:
Attachments:
Description Flags
ScreenShot none

Description Nils CLA 2014-06-26 09:52:29 EDT
Created attachment 244551 [details]
ScreenShot

RAP loads default KeyCodes from Workbench.
ZoomIn (CTRL++) throw new IllegalArgumentException( "Unrecognized key: " + key )!

In ActiveKeysUtil.translateKeySequence(), keySequence.lastIndexOf( "+" ) caused the problem.

StackTrace:
-----------

java.lang.IllegalArgumentException: Unrecognized key: 
	at org.eclipse.rap.rwt.internal.util.ActiveKeysUtil.getKeyCode(ActiveKeysUtil.java:326)
	at org.eclipse.rap.rwt.internal.util.ActiveKeysUtil.translateKeySequence(ActiveKeysUtil.java:289)
	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:105)
	at org.eclipse.rap.rwt.internal.lifecycle.Render.execute(Render.java:30)
	at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle.continueLifeCycle(RWTLifeCycle.java:150)
	at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle.sleep(RWTLifeCycle.java:224)
	at org.eclipse.swt.widgets.Display.sleep(Display.java:1253)
	at org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.java:361)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2734)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2694)
	at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2530)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:701)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:684)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:157)
	at com.ratio.rcp.oposs.main.ApplicationImpl.createUI(ApplicationImpl.java:106)
	at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:172)
	at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:284)
	at java.lang.Thread.run(Thread.java:745)
	at org.eclipse.rap.rwt.internal.lifecycle.UIThread.run(UIThread.java:105)
Comment 1 Ivan Furnadjiev CLA 2014-07-18 05:05:59 EDT
Fixed in master with change https://git.eclipse.org/r/29907