Lines 11-27
Link Here
|
11 |
*******************************************************************************/ |
11 |
*******************************************************************************/ |
12 |
package org.eclipse.core.internal.resources; |
12 |
package org.eclipse.core.internal.resources; |
13 |
|
13 |
|
14 |
import org.eclipse.core.runtime.OperationCanceledException; |
|
|
15 |
|
16 |
import org.eclipse.core.filesystem.IFileStore; |
17 |
|
18 |
import org.eclipse.core.filesystem.EFS; |
19 |
|
20 |
import java.net.URI; |
21 |
|
22 |
import java.io.*; |
14 |
import java.io.*; |
|
|
15 |
import java.net.URI; |
23 |
import java.util.*; |
16 |
import java.util.*; |
24 |
import java.util.zip.*; |
17 |
import java.util.zip.*; |
|
|
18 |
import org.eclipse.core.filesystem.EFS; |
19 |
import org.eclipse.core.filesystem.IFileStore; |
25 |
import org.eclipse.core.internal.events.*; |
20 |
import org.eclipse.core.internal.events.*; |
26 |
import org.eclipse.core.internal.localstore.*; |
21 |
import org.eclipse.core.internal.localstore.*; |
27 |
import org.eclipse.core.internal.utils.*; |
22 |
import org.eclipse.core.internal.utils.*; |
Lines 725-736
Link Here
|
725 |
* and <code>false</code> if the refresh snapshot was not found or could not be opened. |
720 |
* and <code>false</code> if the refresh snapshot was not found or could not be opened. |
726 |
* @exception CoreException if an error occurred reading the snapshot file. |
721 |
* @exception CoreException if an error occurred reading the snapshot file. |
727 |
*/ |
722 |
*/ |
728 |
protected boolean restoreFromRefreshSnapshot(Project project, |
723 |
protected boolean restoreFromRefreshSnapshot(Project project, URI snapshotLocation, |
729 |
IProgressMonitor monitor) throws CoreException { |
724 |
IProgressMonitor monitor) throws CoreException { |
730 |
boolean status = true; |
725 |
boolean status = true; |
731 |
IPath snapshotPath = workspace.getMetaArea().getRefreshLocationFor(project); |
726 |
//IPath snapshotPath = workspace.getMetaArea().getRefreshLocationFor(project); |
732 |
java.io.File snapshotFile = snapshotPath.toFile(); |
727 |
//java.io.File snapshotFile = snapshotPath.toFile(); |
733 |
if (!snapshotFile.exists()) |
728 |
if (snapshotLocation==null) { |
|
|
729 |
return false; |
730 |
} |
731 |
java.io.File snapshotFile = EFS.getStore(snapshotLocation).toLocalFile(EFS.NONE, null); |
732 |
if (snapshotFile==null || !snapshotFile.exists()) |
734 |
return false; |
733 |
return false; |
735 |
if (Policy.DEBUG_RESTORE) |
734 |
if (Policy.DEBUG_RESTORE) |
736 |
System.out.println("Restore project " + project.getFullPath() + ": starting..."); //$NON-NLS-1$ //$NON-NLS-2$ |
735 |
System.out.println("Restore project " + project.getFullPath() + ": starting..."); //$NON-NLS-1$ //$NON-NLS-2$ |