}
}
static Collection<IGeoResource> toResources( IProgressMonitor monitor, Object object, Class<?> callingClass ) {
// create a wizard that does not add to map. We will add all resources at once.
MapImport mapImport = new MapImport(){
@Override
protected WorkflowWizard createWorkflowWizard( Workflow workflow,
java.util.Map<Class< ? extends State>, WorkflowWizardPageProvider> map ) {
return new MapImportWizard(workflow, map){
@Override
protected boolean performFinish( IProgressMonitor monitor ) {
return true;
}
};
}
};
if (mapImport.run(monitor, object)) {
ResourceSelectionState state = mapImport.getDialog().getWorkflowWizard().getWorkflow()
.getState(ResourceSelectionState.class);
Set<IGeoResource> keySet = state.getResources().keySet();
ProjectUIPlugin.trace(Trace.DND, callingClass,