Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » UICallbackManager#releaseBlockedRequest in 1.5 requires manual trigger
UICallbackManager#releaseBlockedRequest in 1.5 requires manual trigger [message #802035] Sun, 19 February 2012 09:39 Go to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi all,

Our RAP unit tests depend so much on UICallbackManager#sendImmediately()
to send notification to client.

Since 1.5 it seems to be replaced by releaseBlockedRequest() but somehow
we have to trigger it manually to make it work (by clicking somewhere in
the browser, etc), otherwise our tests will be frozen. This of course
breaks our automate tests.


Any help would be greatly appreciated.


Thanks & Regards,

Setya
Re: UICallbackManager#releaseBlockedRequest in 1.5 requires manual trigger [message #802044 is a reply to message #802035] Sun, 19 February 2012 09:53 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi,

The problem is not in releaseBlockedRequest method but a call to
Display#sleep() afterwards which waits for events which I have to
trigger manually. I'm not sure why this works fine in < 1.5.

Please advice.


Regards,

Setya

> Hi all,
>
> Our RAP unit tests depend so much on UICallbackManager#sendImmediately()
> to send notification to client.
>
> Since 1.5 it seems to be replaced by releaseBlockedRequest() but somehow
> we have to trigger it manually to make it work (by clicking somewhere in
> the browser, etc), otherwise our tests will be frozen. This of course
> breaks our automate tests.
>
>
> Any help would be greatly appreciated.
>
>
> Thanks & Regards,
>
> Setya
Re: UICallbackManager#releaseBlockedRequest in 1.5 requires manual trigger [message #802744 is a reply to message #802044] Mon, 20 February 2012 11:39 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Setya,

the UICallBack system has been completely restructured in 1.5. There is
a wiki page that explains how it works. If this does not help, you'll
have to provide some more detail about your needs.

Regards, Ralf

[1] http://wiki.eclipse.org/RAP/UI_Callback

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: UICallbackManager#releaseBlockedRequest in 1.5 requires manual trigger [message #803213 is a reply to message #802744] Tue, 21 February 2012 03:33 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi Ralf,

Thank you for your response & link.

In our unit tests after we trigger some actions that update the UI we always call UICallManager#sendImmediately and Display#sleep to make sure the update visually reflected.

For example:
...
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
page.showView("someViewId");
UICallBackManager.getInstance().sendImmediately();
Display.getCurrent().sleep();
...

The above code works fine in 1.4 in that the view is visually displayed and we can move to the next execution.

Since 1.5 we have to replace the call UICallBackManager#sendImmediately by UICallBackManager#releaseBlockedRequest(). I've checked the source code and they do exactly the same.
...
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
page.showView("someViewId");
UICallBackManager.getInstance().releaseBlockedRequest();
Display.getCurrent().sleep();
...


In 1.5 the above snippet opens the view but the execution always stops at Display#sleep until I manually trigger it by clicking somewhere in the page.

Hope I make it clear this time.

Thanks & Regards,

Setya






Re: UICallbackManager#releaseBlockedRequest in 1.5 requires manual trigger [message #803216 is a reply to message #802744] Tue, 21 February 2012 03:33 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi Ralf,

Thank you for your response & link.

In our unit tests after we trigger some actions that update the UI we always call UICallManager#sendImmediately and Display#sleep to make sure the update visually reflected.

For example:

...
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
page.showView("someViewId");
UICallBackManager.getInstance().sendImmediately();
Display.getCurrent().sleep();
...

The above code works fine in 1.4 in that the view is visually displayed and we can move to the next execution.

Since 1.5 we have to replace the call UICallBackManager#sendImmediately by UICallBackManager#releaseBlockedRequest(). I've checked the source code and they do exactly the same.

...
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
page.showView("someViewId");
UICallBackManager.getInstance().releaseBlockedRequest();
Display.getCurrent().sleep();
...


In 1.5 the above snippet opens the view but the execution always stops at Display#sleep until I manually trigger it by clicking somewhere in the page.

Hope I make it clear this time.

Thanks & Regards,

Setya
Re: UICallbackManager#releaseBlockedRequest in 1.5 requires manual trigger [message #804165 is a reply to message #803213] Wed, 22 February 2012 09:19 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Setya,

I still don't understand your test setup and why you need to access
internal methods. From which thread do you trigger the UI changes?
Whatever you're doing, it would be preferable to try doing it using API
calls. Have you tried Display#wake() instead?

Regards, Ralf


--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: UICallbackManager#releaseBlockedRequest in 1.5 requires manual trigger [message #804434 is a reply to message #804165] Wed, 22 February 2012 16:11 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi Ralf,

> I still don't understand your test setup and why you need to access
> internal methods.

Since those methods are all I know that I can use to tell the client to
update UI.

> From which thread do you trigger the UI changes?

From main test thread.

> Whatever you're doing, it would be preferable to try doing it using API
> calls. Have you tried Display#wake() instead?

I tried Display#wake and while it made the test pass, the UI updates are
not visible.

Would you please give example to achieve the same as you suggested ?


Thanks & Regards,

Setya
Re: UICallbackManager#releaseBlockedRequest in 1.5 requires manual trigger [message #805339 is a reply to message #804434] Thu, 23 February 2012 16:44 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Setya,

to be able to help you I'd really have to understand your test setup.

Ralf

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: UICallbackManager#releaseBlockedRequest in 1.5 requires manual trigger [message #807552 is a reply to message #805339] Sun, 26 February 2012 17:24 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi Ralf,

You can take a look at the code in
org.eclipse.rap.junit.RAPTestCase#notifyClient. This class was created
by RAP Team to unit test RAP apps.


Thanks & Regards,

Setya
Re: UICallbackManager#releaseBlockedRequest in 1.5 requires manual trigger [message #808048 is a reply to message #807552] Mon, 27 February 2012 10:24 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Ok, you're using RAP Junit - this was the missing piece. Could you
please open a bug for the problem?

Thanks, Ralf

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: UICallbackManager#releaseBlockedRequest in 1.5 requires manual trigger [message #808889 is a reply to message #808048] Tue, 28 February 2012 09:00 Go to previous message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi,

Bug 372707 created.

Thanks & Regards,

Setya
Re: UICallbackManager#releaseBlockedRequest in 1.5 requires manual trigger [message #808894 is a reply to message #808048] Tue, 28 February 2012 09:00 Go to previous message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi,

Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=372707 created.

Thanks & Regards,

Setya
Previous Topic:Offline Cache?
Next Topic:Developing with RAP
Goto Forum:
  


Current Time: Fri Mar 29 13:56:58 GMT 2024

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

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

Back to the top