mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 07:35:24 +02:00
Add tracing for SSH downloads/uploads/streams
This commit is contained in:
parent
11d34bf0e6
commit
3eae75442c
1 changed files with 12 additions and 0 deletions
|
@ -677,8 +677,12 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
//String desc = ((op==SftpProgressMonitor.PUT)?
|
||||
// "Uploading " : "Downloading ")+srcFile;
|
||||
String desc = srcFile;
|
||||
if (Activator.isTracingOn()) {
|
||||
Activator.trace("Sftp-monitor: "+max+", "+desc); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
//TODO avoid cast from long to int
|
||||
fMonitor.beginTask(desc, (int)max);
|
||||
|
||||
}
|
||||
public boolean count(long count){
|
||||
fWorkToDate += count;
|
||||
|
@ -690,11 +694,19 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
workToDateKB, fMaxWorkKB, workPercent
|
||||
});
|
||||
|
||||
if (Activator.isTracingOn()) {
|
||||
System.out.print('#');
|
||||
}
|
||||
fMonitor.subTask(subDesc);
|
||||
fMonitor.worked((int)count);
|
||||
return !(fMonitor.isCanceled());
|
||||
}
|
||||
public void end(){
|
||||
if (Activator.isTracingOn()) {
|
||||
System.out.println();
|
||||
System.out.println("Sftp-monitor <--"); //$NON-NLS-1$
|
||||
System.out.flush();
|
||||
}
|
||||
fMonitor.done();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue