Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Widget disposed error in Progress monitor
Widget disposed error in Progress monitor [message #329770] Thu, 03 July 2008 12:36
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

Hi
I am using a progress monitor for download process. Got error attached with the error.txt file. I m very less know to what might have happened to the code.
Here is the place where that is thrown:


final File targetRootLocation =
getTargetRootLocation(wizardData).toFile();

final ProgressMonitorDialog dialogExpand =
new ProgressMonitorDialog(
Workbench.getInstance().getActiveWorkbenchWindow().getShell( ));

dialogExpand.setCancelable(true);
dialogExpand.setOpenOnRun(true);

IRunnableWithProgress runnableWithProgressExpand =
new IRunnableWithProgress() {
public void run(final IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException {
monitor.beginTask(
"Unpacking artifacts...",
rows.size());

for (RowData data : rows) {
String artifactDescriptor =
data.getValue("artifactDescriptor");

DefaultArtifactInfo info =
new DefaultArtifactInfo(artifactDescriptor);
File fileToExtract = getArtifactFileToUnpack(info);

try {
if (monitor.isCanceled()) {
monitor.done();

return;
}

monitor.setTaskName("Unpacking "
+ artifactDescriptor);
downloader.unpack(targetRootLocation, fileToExtract);
monitor.worked(1);
} catch (MavenCGException exception) {
MessageDialog dialog =
new MessageDialog(
workbench.getActiveWorkbenchWindow()
.getShell(),
"Error importing project(s)",
null,
exception.getCause().getMessage(),
MessageDialog.ERROR,
new String[] {IDialogConstants.OK_LABEL},
IDialogConstants.CLOSE_ID);

dialog.create();
dialog.open();
}
}

monitor.done();
}
};

try {
dialogExpand.run(true, true, runnableWithProgressExpand);
} catch (InvocationTargetException e1) {
Logger.log(e1);
displayError(
workbench,
e1.getMessage(),
Phase.UNPACK);
} catch (InterruptedException e1) {
Logger.log(e1);
displayError(
workbench,
e1.getMessage(),
Phase.UNPACK);
} finally {
if (dialogExpand != null) {
dialogExpand.close();
}
}


Please let me know if somebody can give any clue on how to fix such a problem.
Previous Topic:Projects Conflicting with Custom Editor
Next Topic:right align status in statusdialog
Goto Forum:
  


Current Time: Thu Dec 26 14:55:15 GMT 2024

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

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

Back to the top