DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page Eclipse RCP: user Job doesn't show the progress dialog
Notices
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Mar 2009
Location: Belgium
Unhappy Eclipse RCP: user Job doesn't show the progress dialog - 10-14-2010, 05:37 AM

When I try to use just a Thread.sleep, the progress dialog shows. If I call the actual long running operation, the progress dialog either doesn't show, either shows after a few seconds, at the end of the long running operation.
I really have no idea where this behavior is coming from. Could anyone please help me?

Code:
Job job = new Job("Cancelling edition") {

            @Override
            public IStatus run(IProgressMonitor monitor) {
                monitor.beginTask("Cancelling edition...",
                        IProgressMonitor.UNKNOWN);
                IStatus status = Status.OK_STATUS;

                try {
                        protocol.cancelEdition();                    
                } catch (Exception e) {
                    status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, "",
                            e);
                    Status failStatus = new Status(IStatus.ERROR,
                            Activator.PLUGIN_ID, "", e);
                    StatusManager.getManager().handle(failStatus,
                            StatusManager.LOG);
                } finally {
                    monitor.done();
                }
                return status;
            }
        };
        job.setUser(true);
        job.schedule();
Alexandra.


Alexandra
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Nov 2009
Default 11-04-2010, 09:08 AM

Use the StatusManager.BLOCK style in addition to the StatusManager.LOG style when handling the Status.

Code:
StatusManager.getManager().handle(failStatus, StatusManager.BLOCK | StatusManager.LOG);
Reply With Quote
  (#3 (permalink)) Old
Banned
 
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Nov 2010
Default 11-18-2010, 07:25 PM

the progress dialog either doesn't show, either shows after a few seconds,





herve leger
herve leger dress
herve leger dress
Reply With Quote
Reply

Tags
eclipse, jobs, problem, rcp

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem cancelling the Progress Monitor Dialog rockyraj4you Eclipse 0 09-09-2010 06:24 AM
org.eclipse.swt.widgets.Dialog close event ReyMae Eclipse 9 04-13-2009 04:02 AM
eclipse autocomplete doesn't show all objectd emaayan Eclipse 3 03-11-2009 09:57 AM
Marker doesn't show up. kaprasanna Eclipse 0 07-22-2008 07:31 AM
Eclipse RCP: Creating a job with progress monitor does not work bs2007 Eclipse 0 05-19-2008 08:42 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com