IRunnableWithProgress refresh problem [message #666411] |
Wed, 20 April 2011 11:18 |
Stefan Ruzitschka Messages: 16 Registered: December 2010 |
Junior Member |
|
|
Hi @all,
I have a problem with RAP and the IRunnableWithProgress. When the runnable is finished, the GUI doesn't refresh automatically.
This part is the runnable:
final IRunnableWithProgress runnable = new IRunnableWithProgress()
{
@Override
public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
{
// Do something
monitor.beginTask("Progress is running...", IProgressMonitor.UNKNOWN);
monitor.done();
}
};
This part is the service call:
final IProgressService service = (IProgressService) PlatformUI.getWorkbench().getService(IProgressService.class);
service.run(true, false, runnable);
After runnable is finished a dialog with a notification pops up. It's a "MessageDialog.openInformation" - method call.
The run method does an action, that last for 10 - 60 seconds, so the user have to wait this time. After this action is finished the GUI doesn't update automatically.
The user has to move the dialog to refresh the GUI and make the dialog disappear.
Anyone an idea or a suggestion to update the view automatically?
Greetings
Stefan R.
[Updated on: Wed, 20 April 2011 11:22] Report message to a moderator
|
|
|
Re: IRunnableWithProgress refresh problem [message #666480 is a reply to message #666411] |
Wed, 20 April 2011 14:27 |
Rüdiger Herrmann Messages: 335 Registered: July 2009 |
Senior Member |
|
|
Stefan,
looks like you ran into this bug
315418: Progress Dialog will not automatically close during UICallback
https://bugs.eclipse.org/bugs/show_bug.cgi?id=315418
It was fixed in 1.4 M3. What version of RAP are you running?
- Rüdiger
On 20.04.2011 13:18, Stefan R. wrote:
> Hi @all,
>
> I have a problem with RAP and the IRunnableWithProgress. When the
> runnable is finished, the GUI doesn't refresh automatically.
>
> This part is the runnable:
>
> final IRunnableWithProgress runnable = new IRunnableWithProgress()
> {
> @Override
> public void run(final IProgressMonitor monitor) throws
> InvocationTargetException, InterruptedException
> {
> // Do something
>
> monitor.beginTask("Progress is running...", IProgressMonitor.UNKNOWN);
>
> monitor.done();
> }
> };
>
>
> This part is the service call:
>
> final IProgressService service = (IProgressService)
> PlatformUI.getWorkbench().getService(IProgressService.class) ;
> service.run(true, false, runnable);
>
>
> After runnable is finished a dialog with a notification pops up. It's a
> "MessageDialog.openInformation" - method call.
>
> The run method does an action, that last for 10 - 60 seconds, so the
> user have to wait this time. After this action is finished the GUI
> doesn't update automatically.
> The user has to move the dialog to refresh the GUI and make the dialog
> disappear.
>
> Anyone an idea or a suggestion?
>
> Greetings
> Stefan R.
>
>
>
|
|
|
|
|
|
|
Re: IRunnableWithProgress refresh problem [message #666627 is a reply to message #666620] |
Thu, 21 April 2011 11:24 |
Ivan Furnadjiev Messages: 2427 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Stefan,
as Rüdiger said, the fix is included in the 1.3.2 service release. In
RAP download page [1], follow "RAP Runtime" -> "latest release" links to
update your target platform either from p2 repository or zipped version.
[1] http://eclipse.org/rap/downloads
HTH,
Ivan
On 4/21/2011 1:51 PM, Stefan R. wrote:
> Hey,
>
> in the case of the bug I had to patch the RAP 1.3 jar files in my
> targetplatform. I checked out the rap projects from the CVS with the
> 1.3 maintenance branch.
> How can I build the patched jars?
> I got some errors while running the "RAP Releng" - Launch Configuration:
>
>
> !SESSION 2011-04-21 12:10:42.566
> -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.6.0_21
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
> Framework arguments: -application org.eclipse.ant.ui.antRunner
> -buildfile
> C:\opt\eclipse\plugins\org.eclipse.pde.build_3.4.0.v20080604 \scripts\build.xml
> Command-line arguments: -application org.eclipse.ant.ui.antRunner
> -data C:\opt\workspace/../runtime-New_configuration -dev
> file:C:/opt/workspace/.metadata/.plugins/org.eclipse.pde.cor e/RAP
> Releng/dev.properties -os win32 -ws win32 -arch x86 -buildfile
> C:\opt\eclipse\plugins\org.eclipse.pde.build_3.4.0.v20080604 \scripts\build.xml
>
> !ENTRY org.eclipse.equinox.simpleconfigurator 4 0 2011-04-21 12:10:42.956
> !MESSAGE !STACK 0
> org.osgi.framework.BundleException: Exception in
> org.eclipse.equinox.internal.simpleconfigurator.Activator.st art() of
> bundle org.eclipse.equinox.simpleconfigurator.
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:806)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:755)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:370)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:374)
> at
> org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1067)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:561)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:546)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:459)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:243)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:440)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:227)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:337)
> Caused by: java.lang.IllegalStateException: The System Bundle was
> updated. The framework must be restarted to finalize the configuration
> change
> at
> org.eclipse.equinox.internal.simpleconfigurator.ConfigApplie r.install(ConfigApplier.java:71)
> at
> org.eclipse.equinox.internal.simpleconfigurator.SimpleConfig uratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:12 9)
> at
> org.eclipse.equinox.internal.simpleconfigurator.SimpleConfig uratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:14 3)
> at
> org.eclipse.equinox.internal.simpleconfigurator.Activator.st art(Activator.java:48)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1 .run(BundleContextImpl.java:783)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:774)
> ... 11 more
> Root exception:
> java.lang.IllegalStateException: The System Bundle was updated. The
> framework must be restarted to finalize the configuration change
> at
> org.eclipse.equinox.internal.simpleconfigurator.ConfigApplie r.install(ConfigApplier.java:71)
> at
> org.eclipse.equinox.internal.simpleconfigurator.SimpleConfig uratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:12 9)
> at
> org.eclipse.equinox.internal.simpleconfigurator.SimpleConfig uratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:14 3)
> at
> org.eclipse.equinox.internal.simpleconfigurator.Activator.st art(Activator.java:48)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1 .run(BundleContextImpl.java:783)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:774)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:755)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:370)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:374)
> at
> org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1067)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:561)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:546)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:459)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:243)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:440)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:227)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:337)
>
> !ENTRY org.eclipse.osgi 4 0 2011-04-21 12:10:42.956
> !MESSAGE Bundle
> org.eclipse.equinox.simpleconfigurator_1.0.200.v20100503 [1] is not
> active.
>
> !ENTRY org.eclipse.osgi 4 0 2011-04-21 12:10:42.956
> !MESSAGE Application error
> !STACK 1
> java.lang.IllegalStateException: Unable to acquire application
> service. Ensure that the org.eclipse.core.runtime bundle is resolved
> and started (see config.ini).
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:74)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
>
>
> Any suggestions to fix the problem? Or is there any tutorial out there
> "how to build the rap projects from the CVS"?
>
> Greetings
> Stefan
|
|
|
|
Re: IRunnableWithProgress refresh problem [message #666632 is a reply to message #666628] |
Thu, 21 April 2011 11:57 |
Benjamin Wolff Messages: 136 Registered: July 2009 |
Senior Member |
|
|
Hm, there's actually no magic involved :). Although it can be quite confusing when start with it.
You replace the jars in your targetplatform with the new ones, or better, set up a new targetplatform with the new rap bundles and your individual bundles, if there are any.
To use the CVS version you simply check out the RAP bundles in your workspace. In the launch-configurations of your application you can configure which bundles should be used (target/workspace).
To build a deployable war file you can stick to your prefered build procedure. When using for example the feature-based build (rap.demo.feature), the webappbuilder automatically picks the RAP bundles with the latest version, e.g. the bundles from you workspace if you have checked them out from CVS.
Maybe this helps a bit for your understanding :).
HTH,
Ben
Am 21.04.2011 13:43, schrieb Stefan R.:
> Hey Ivan,
> well that helped a lot, but I try to understand the whole RAP thing. So I want to build it from the CVS. Maybe in the future there is a better docu, how to build the whole stuff.
>
> So maybe I take the thing as it is and be lucky ^^
>
> Stefan
|
|
|
Re: IRunnableWithProgress refresh problem [message #666926 is a reply to message #666632] |
Sun, 24 April 2011 17:20 |
Rüdiger Herrmann Messages: 335 Registered: July 2009 |
Senior Member |
|
|
Stefan,
in addition to what Ben already mentioned, there are some hints on the
RAP hompe page [1] that may also help.
Plus, make sure that you understand how plug-in/bundle development of
Eclipse projects in Eclipse works in general [2].
If you still prefer ready-made builds, you may also try that latest
milstone of the 1.4 development stream [3].
HTH
Rüdiger
[1] http://eclipse.org/rap/source
[2] http://wiki.eclipse.org/CVS_Howto
[3] http://eclipse.org/rap/downloads/ -> select latest stable build
On 21.04.2011 13:57, Benjamin Wolff wrote:
> Hm, there's actually no magic involved :). Although it can be quite confusing when start with it.
> You replace the jars in your targetplatform with the new ones, or better, set up a new targetplatform with the new rap bundles and your individual bundles, if there are any.
> To use the CVS version you simply check out the RAP bundles in your workspace. In the launch-configurations of your application you can configure which bundles should be used (target/workspace).
> To build a deployable war file you can stick to your prefered build procedure. When using for example the feature-based build (rap.demo.feature), the webappbuilder automatically picks the RAP bundles with the latest version, e.g. the bundles from you workspace if you have checked them out from CVS.
>
> Maybe this helps a bit for your understanding :).
>
> HTH,
> Ben
>
> Am 21.04.2011 13:43, schrieb Stefan R.:
>> Hey Ivan,
>> well that helped a lot, but I try to understand the whole RAP thing. So I want to build it from the CVS. Maybe in the future there is a better docu, how to build the whole stuff.
>>
>> So maybe I take the thing as it is and be lucky ^^
>>
>> Stefan
|
|
|
Powered by
FUDForum. Page generated in 0.05926 seconds