Skip to main content



      Home
Home » Newcomers » Newcomers » Job can run in background - option
Job can run in background - option [message #118605] Mon, 21 November 2005 03:56
Eclipse UserFriend
Originally posted by: dheepuks.yahoo.co.in

Hi ,

i have written a code in such a way that some methods are called
inside a progress monitor. it monitors the process but it just displays
the progressbar and user is not given a chance to do other process. i need
my job to run in as a background process without disturbing the current
thread process.

Thanks in advance,

Note:

final IRunnableWithProgress op = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException
{
try {
// task is started
monitor.beginTask("ExecutingOperation"), 100);
for (int total = 0; total < 100 && !monitor.isCanceled(); total += 50) {
Thread.sleep(50);
monitor.worked(50);
}
executeMethod1();
executeMethod2();
} } catch (Throwable e) {
e.printStackTrace();
}
monitor.done();
}
};
try {
new ProgressMonitorDialog(null).run(false, false, op);
}
catch (InterruptedException e) {
System.out.println(e);
}
catch (InvocationTargetException e) {
return;
}
}


Task #1 : i need run in background,cancel,details option in a dialog box.

so please answer me with relevant code for the above said aspect.

Thanks,
Dheepu
Previous Topic:Scripting Languages with Code Assist? Refactoring features?
Next Topic:auto generated file
Goto Forum:
  


Current Time: Sat May 10 20:54:36 EDT 2025

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

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

Back to the top