1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

Apply patch from 134349 - Add method that vendors can call to create a backup of ".cdtbuild" file.

This commit is contained in:
Leo Treggiari 2006-04-01 03:09:53 +00:00
parent 102b8bcb67
commit f4e3af2a4e

View file

@ -134,6 +134,25 @@ public class UpdateManagedProjectManager {
mngr.backupFile(settingsFile, dstFile, monitor, project, fBackupFileOverwriteQuery);
}
/*
* Creates a back-up file. This method is useful for the vendor who wants
* to create a backup of '.cdtbuild' file before project conversion.
* @param settingsFile
* @param suffix
* @param monitor
* @param project
*/
public static void backupSettingsFile(IFile settingsFile, String suffix, IProgressMonitor monitor, IProject project){
UpdateManagedProjectManager mngr = getUpdateManager(project);
if(mngr == null || mngr.fIsInfoReadOnly)
return;
IContainer destFolder = project;
IFile dstFile = destFolder.getFile(new Path(settingsFile.getName()+suffix));
mngr.backupFile(settingsFile, dstFile, monitor, project, fBackupFileOverwriteQuery);
}
/* (non-Javadoc)
* Create a back-up file
*