mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 15:15:25 +02:00
[235221] Files truncated on exit of Eclipse
This commit is contained in:
parent
6d197b078f
commit
2a033854aa
1 changed files with 37 additions and 0 deletions
|
@ -67,6 +67,7 @@ import org.eclipse.rse.ui.SystemBasePlugin;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.IWorkbenchWindow;
|
||||
import org.eclipse.ui.progress.UIJob;
|
||||
import org.eclipse.ui.progress.WorkbenchJob;
|
||||
|
||||
/**
|
||||
* This class manages listening for resource changes within our temp file project
|
||||
|
@ -229,6 +230,42 @@ public abstract class SystemTempFileListener implements IResourceChangeListener
|
|||
}
|
||||
}
|
||||
|
||||
/***
|
||||
* @deprecated don't use this class, it's only here because to remove it would be
|
||||
* an API change, and we can't do that until 3.0. Instead of using this,
|
||||
* SynchResourcesJob should be used.
|
||||
*/
|
||||
public class RefreshResourcesUIJob extends WorkbenchJob
|
||||
{
|
||||
public RefreshResourcesUIJob()
|
||||
{
|
||||
super(FileResources.RSEOperation_message);
|
||||
}
|
||||
|
||||
public IStatus runInUIThread(IProgressMonitor monitor)
|
||||
{
|
||||
_isSynching = true;
|
||||
try {
|
||||
IFile[] filesToSync;
|
||||
synchronized(_changedResources) {
|
||||
filesToSync = (IFile[])_changedResources.toArray(new IFile[_changedResources.size()]);
|
||||
_changedResources.clear();
|
||||
}
|
||||
monitor.beginTask(FileResources.MSG_SYNCHRONIZE_PROGRESS, IProgressMonitor.UNKNOWN);
|
||||
setName(FileResources.MSG_SYNCHRONIZE_PROGRESS);
|
||||
for (int i = 0; i < filesToSync.length; i++)
|
||||
{
|
||||
synchronizeTempWithRemote(filesToSync[i], monitor);
|
||||
}
|
||||
} finally {
|
||||
_isSynching = false;
|
||||
monitor.done();
|
||||
}
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Used for doing the upload from a job
|
||||
|
|
Loading…
Add table
Reference in a new issue