| Summary: | Create New infector from within project fails for DEU_0 | ||
|---|---|---|---|
| Product: | [Technology] STEM | Reporter: | James Kaufman <jhkauf> |
| Component: | Analysis | Assignee: | Stefan Edlund <sedlund> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
|
Description
James Kaufman
Stefan,
Matt helped me investigate this.
The new infector creation actually succeeds - it just throws the exception above.
The problem is caused by
LocationPickerDialog.reinit() line 288
In the case of picking from keys inside the project, the reinit method tries to start
an IRunnableWithProgress
this makes the following code in the IsoKeyPicker unhappy
public void setISOKeys(final Object[] isoKeys) {
filteredList.setElements(isoKeys);
text.setText(""); <<<<<<<<<<<<<<<<<<<<< different thread??
} // setISOKeys
IF I comment out the IRunnableWithProgress code and just keep the logic in the LocationPickerDialog.reinit() method then
everything runs fine, but we won't have the progress monitor for really big graphs.
Not sure what the best solution is. I did not check in any changes but the following might be the fix.
public void reinit() {
if(selectGlobal)
isoKeyPicker0.setISOKeys(GeographicNames.getSubISOKeys(
GeographicMapper.EARTH_ALPHA3_ISO_KEY, -1));
else {
//IRunnableWithProgress getKeys = new IRunnableWithProgress() {
// public void run(IProgressMonitor progress) {
// progress.beginTask(Messages.getString("NLocPickerWiz.gettingLocations"), 100);
isoKeyPicker0.setISOKeys(LocationUtility.getKeys(project, 0, null).toArray());
// progress.worked(100);
// progress.done();
// }
//};
// IRunnableContext context = new ProgressMonitorDialog(shell);
// try {
// context.run(true, true, getKeys);
// } catch(Exception e) {
// Activator.logError(e.getMessage(), e);
// }
}
Good catch. I added a
this.getDisplay().syncExec(new Runnable() {
public void run() {
text.setText("");
}
});
around the setText method and I think that should fix it and still keep the progress bar for large projects.
Complete |