Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 198495 Details for
Bug 350186
[KeyBindings] Mouse swipe left/right should do Back/Forward in navigation history
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Implementation
patch.txt (text/plain), 1.89 KB, created by
Markus Keller
on 2011-06-23 15:37:18 EDT
(
hide
)
Description:
Implementation
Filename:
MIME Type:
Creator:
Markus Keller
Created:
2011-06-23 15:37:18 EDT
Size:
1.89 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java,v >retrieving revision 1.36 >diff -u -r1.36 BindingService.java >--- Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java 5 May 2011 13:22:37 -0000 1.36 >+++ Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java 23 Jun 2011 19:29:30 -0000 >@@ -72,6 +72,8 @@ > > private Listener backForwardListener; > >+ private Listener swipeListener; >+ > /** > * Constructs a new instance of <code>BindingService</code> using a JFace > * binding manager. >@@ -147,6 +149,37 @@ > } > }; > display.addFilter(SWT.MouseDown, backForwardListener); >+ >+ // Hook up swipe left / right events >+ swipeListener = new Listener() { >+ public void handleEvent(Event event) { >+ String commandId; >+ if (event.xDirection < 0) { >+ commandId = IWorkbenchCommandConstants.NAVIGATE_BACKWARD_HISTORY; >+ } else if (event.xDirection > 0) { >+ commandId = IWorkbenchCommandConstants.NAVIGATE_FORWARD_HISTORY; >+ } else { >+ return; >+ } >+ >+ final IHandlerService handlerService = (IHandlerService) workbench >+ .getService(IHandlerService.class); >+ >+ try { >+ handlerService.executeCommand(commandId, event); >+ event.doit = false; >+ } catch (NotDefinedException e) { >+ // regular condition; do nothing >+ } catch (NotEnabledException e) { >+ // regular condition; do nothing >+ } catch (NotHandledException e) { >+ // regular condition; do nothing >+ } catch (ExecutionException ex) { >+ StatusUtil.handleStatus(ex, StatusManager.SHOW | StatusManager.LOG); >+ } >+ } >+ }; >+ display.addFilter(SWT.Gesture, swipeListener); > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 350186
:
198495
|
198510