Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326645 - Riena on RAP: ModuleView needs double click to activate SubModule
Summary: Riena on RAP: ModuleView needs double click to activate SubModule
Status: RESOLVED FIXED
Alias: None
Product: Riena
Classification: RT
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.0.0.M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-30 04:25 EDT by Jürgen Becker CLA
Modified: 2010-10-29 06:22 EDT (History)
1 user (show)

See Also:


Attachments
riena.navigation.ui.swt patch to decrease delay (1.20 KB, patch)
2010-09-30 04:25 EDT, Jürgen Becker CLA
steffen.kriese: iplog+
Details | Diff
Fixes the double click bug in the navigation tree (workspace patch) (11.05 KB, patch)
2010-10-11 06:08 EDT, Jürgen Becker CLA
steffen.kriese: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jürgen Becker CLA 2010-09-30 04:25:01 EDT
Created attachment 179933 [details]
riena.navigation.ui.swt patch to decrease delay

The class ModuleNavigationListener.NodeSwitcher delays the activation of SubModules to prevent UI flicker if somebody clicks very fast on different nodes in the navigation tree.
The delay is performed on a thread, which after the delay calls display.asyncExec(...) to activate the selected SubModule. "display.asyncExec(Runnable...)" under RAP adds the Runnable to a queue and it is executed later on on the UIThread. The problem now is, during the delay the ongoing web request finishes and the UIThread goes to sleep. Only after the next request (second mouse click) comes in, the Runnable is executed on the now active UIThread.

One solution would be to use the RAP polling for UI updates (UICallBackServiceHandler.activateUICallBacksFor(id)". This is not possible because we cannot access the RAP classes from Riena.

A workaround which works pretty well is to decrease the delay from 300ms to 50ms when running with RAP.(see patch) Maybe somebody has an even better solution?
Comment 1 Steffen Kriese CLA 2010-09-30 05:03:49 EDT
Patch applied, thanks Jürgen. 
This is a first shot to improve Riena on RAP, maybe we will find a more sophisticated solution later.
Comment 2 Jürgen Becker CLA 2010-10-11 06:06:25 EDT
The previous patch did not work all the time - the new one should.
We now use the RAP UICallBackServiceHandler to make sure all updates are delivered to the browser.

To make this work we need to us a special ModuleNavigationListener (and NodeSwitcher) for RAP. The platform specific ModuleNavigationListener ist created via SWTFacade.
Comment 3 Jürgen Becker CLA 2010-10-11 06:08:47 EDT
Created attachment 180587 [details]
Fixes the double click bug in the navigation tree (workspace patch)
Comment 4 Steffen Kriese CLA 2010-10-12 03:40:39 EDT
Looks great!
Patch applied, thanks Jürgen