{
try
{
LoggerChannel logger =View.getPluginInterface().getLogger().getTimeStampedChannel("AZCVSUpdater");
UpdateManager um = View.getPluginInterface().getUpdateManager();
UpdateInstaller updateInstaller = um.createInstaller();
File from = new File (complete_file_from);
if(!from.isFile())
{
StatusBoxUtils.mainStatusAdd(" Could not update because " + from.getName() + " is not a real file",2);
}
//System.out.println("AZCVSUpdater: One File Restart/Exit Action");
//System.out.println("From: " + from.getPath() + " To: " + complete_file_to);
//updateInstaller.addResource("azcvsupdater_restart_stream" , new FileInputStream (from));
updateInstaller.addMoveAction(complete_file_from , complete_file_to);
//System.out.println("AZCVSUpdater: Sleeping for 5 seconds to ensure all has completed, because Tim says my plugin is lazy ;)");
logger.log("Sleeping for 5 seconds to ensure all has completed");
Thread.sleep(5000);
um.applyUpdates(restart);
logger.log("Still here.. even after um.applyUpdates :*(");
}
catch (Exception e)
{
StatusBoxUtils.mainStatusAdd(" Major Error Inserting/Restarting please report to omschaub@users.sourceforge.net",2);