Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » Separate part focus and activation during keyboard navigation
Separate part focus and activation during keyboard navigation [message #1852708] Wed, 01 June 2022 14:44 Go to next message
Eclipse UserFriend
I am able press tab on the keyboard and acquire focus on a part tab. When using the keyboard to get to the part, a little gray box appears around it. I can use the left and right arrow keys to switch between parts.

I am wondering if it is possible to separate the focus and activation of the parts. In this case, using the left and right arrow keys would move the box to indicate whatever part is being selected. What I would like to happen is that the selected part does not get activated simply by being selected, but that the user must press enter before the part gets activated and gets displayed.

Is this possible? If so, how would this be done?

index.php/fa/42144/0/
Re: Separate part focus and activation during keyboard navigation [message #1852714 is a reply to message #1852708] Thu, 02 June 2022 02:28 Go to previous message
Eclipse UserFriend
I don't have the answer for you right away. But, to validate that it would be possible, you should:


  1. Check if the SWT widget supports this behavior. That is, validate that the CTabfolder supports this, e.g., take one of these examples https://www.eclipse.org/swt/snippets/#ctabfolder; If it doesn't support it, you could request this feature on the SWT widget https://github.com/eclipse-platform/eclipse.platform.swt
  2. If the SWT widget supports this behavior and your Eclipse E4 RCP doesn't: This is most likely the result of the RenderingEngine. E4 supports customizing the rendering engine, even for specific parts. The default renderer for the MPartStack is https://github.com/eclipse-platform/eclipse.platform.ui/blob/master/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java which extends https://github.com/eclipse-platform/eclipse.platform.ui/blob/master/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/LazyStackRenderer.java the method showTab() makes that the tab contents shows up. You would want to look into the handling of the event UIEvents.ElementContainer.TOPIC_SELECTEDELEMENT, which is registered in the init section. But, without digging through the source, I am not sure how you can distinguish between the selection and the activation of the tab in E4.
Previous Topic:Different behavior for changes of "active selection"
Next Topic:issue with rendering of ToolItem on Mac silicon
Goto Forum:
  


Current Time: Tue Jul 15 04:57:58 EDT 2025

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

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

Back to the top