mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
Apply patch from 134349 - Add method that vendors can call to create a backup of ".cdtbuild" file.
This commit is contained in:
parent
102b8bcb67
commit
f4e3af2a4e
1 changed files with 19 additions and 0 deletions
|
@ -133,6 +133,25 @@ public class UpdateManagedProjectManager {
|
||||||
IFile dstFile = destFolder.getFile(new Path(settingsFile.getName()+suffix));
|
IFile dstFile = destFolder.getFile(new Path(settingsFile.getName()+suffix));
|
||||||
mngr.backupFile(settingsFile, dstFile, monitor, project, fBackupFileOverwriteQuery);
|
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)
|
/* (non-Javadoc)
|
||||||
* Create a back-up file
|
* Create a back-up file
|
||||||
|
|
Loading…
Add table
Reference in a new issue