}
return returnCode[0];
}
};
ImportOperation op = new ImportOperation(target.getFullPath(), stores[0].getParent(),
FileStoreStructureProvider.INSTANCE, query, Arrays.asList(stores));
op.setContext(messageShell);
op.setCreateContainerStructure(false);
try {
op.run(monitor);
} catch (InterruptedException e) {
return;
} catch (InvocationTargetException e) {
if (e.getTargetException() instanceof CoreException) {
displayError(((CoreException) e.getTargetException()).getStatus());
} else {
display(e);
}
return;
}
// Special case since ImportOperation doesn't throw a CoreException on
// failure.
IStatus status = op.getStatus();
if (!status.isOK()) {
if (errorStatus == null) {
errorStatus = new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.ERROR, getProblemsMessage(), null);
}
errorStatus.merge(status);