public static IStatus getStatus(OutputStream stream) { if (stream instanceof IStateful) return ((IStateful) stream).getStatus(); return Status.OK_STATUS; }
public static IStatus getStatus(OutputStream stream) { if (stream instanceof IStateful) return ((IStateful) stream).getStatus(); return Status.OK_STATUS; }
public static IStatus getStatus(OutputStream stream) { if (stream instanceof IStateful) return ((IStateful) stream).getStatus(); return Status.OK_STATUS; }
public static IStatus getStatus(OutputStream stream) { if (stream instanceof IStateful) return ((IStateful) stream).getStatus(); return Status.OK_STATUS; }
private IStatus transferSingle(IArtifactDescriptor destinationDescriptor, IArtifactDescriptor sourceDescriptor, IProgressMonitor monitor) { OutputStream destination; try { destination = target.getOutputStream(destinationDescriptor); } catch (ProvisionException e) { return e.getStatus(); } IStatus status = null; // Do the actual transfer try { status = getArtifact(sourceDescriptor, destination, monitor); if (destination instanceof IStateful && status != null && !status.isOK()) { IStatus destStatus = ((IStateful) destination).getStatus(); IStatus root = extractRootCause(status); Throwable e = root != null ? root.getException() : null; ((IStateful) destination).setStatus(new MultiStatus(Activator.ID, status.getCode(), new IStatus[] {status, destStatus}, status.getMessage(), e)); } } finally { try { destination.close(); } catch (IOException e) { if (status != null && status.getSeverity() == IStatus.ERROR && status.getCode() == IArtifactRepository.CODE_RETRY) return new MultiStatus(Activator.ID, status.getCode(), new IStatus[] {status}, NLS.bind(Messages.error_closing_stream, getArtifactKey(), target.getLocation()), e); return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.error_closing_stream, getArtifactKey(), target.getLocation()), e); } } return status; }
status = getArtifact(sourceDescriptor, destination, monitor); if (destination instanceof IStateful && status != null && !status.isOK()) { IStatus destStatus = ((IStateful) destination).getStatus(); IStatus root = extractRootCause(status); Throwable e = root != null ? root.getException() : null;
status = getArtifact(sourceDescriptor, destination, monitor); if (destination instanceof IStateful && status != null && !status.isOK()) { IStatus destStatus = ((IStateful) destination).getStatus(); IStatus root = extractRootCause(status); Throwable e = root != null ? root.getException() : null;
status = getArtifact(sourceDescriptor, destination, monitor); if (destination instanceof IStateful && status != null && !status.isOK()) { IStatus destStatus = ((IStateful) destination).getStatus(); IStatus root = extractRootCause(status); Throwable e = root != null ? root.getException() : null;