|
Lines 11-16
Link Here
|
| 11 |
*******************************************************************************/ |
11 |
*******************************************************************************/ |
| 12 |
package org.eclipse.core.internal.localstore; |
12 |
package org.eclipse.core.internal.localstore; |
| 13 |
|
13 |
|
|
|
14 |
import org.eclipse.core.resources.IResource; |
| 15 |
|
| 14 |
import java.net.URI; |
16 |
import java.net.URI; |
| 15 |
import java.util.LinkedList; |
17 |
import java.util.LinkedList; |
| 16 |
import org.eclipse.core.filesystem.EFS; |
18 |
import org.eclipse.core.filesystem.EFS; |
|
Lines 77-85
Link Here
|
| 77 |
((Folder) destination).create(IResource.VIRTUAL, true, null); |
79 |
((Folder) destination).create(IResource.VIRTUAL, true, null); |
| 78 |
return true; |
80 |
return true; |
| 79 |
} |
81 |
} |
| 80 |
if ((!isDeep || source.isUnderVirtual()) && source.isLinked()) { |
82 |
if ((!isDeep || source.isUnderVirtual()||(!source.getStore().fetchInfo().exists()&&source.getType()==IResource.FOLDER)) && source.isLinked()) { |
| 81 |
URI sourceLocationURI = getWorkspace().transferVariableDefinition(source, destination, source.getRawLocationURI()); |
83 |
URI sourceLocationURI = getWorkspace().transferVariableDefinition(source, destination, source.getRawLocationURI()); |
| 82 |
destination.createLink(sourceLocationURI, updateFlags & IResource.ALLOW_MISSING_LOCAL, null); |
84 |
destination.createLink(sourceLocationURI, updateFlags | IResource.ALLOW_MISSING_LOCAL, null); |
| 83 |
return false; |
85 |
return false; |
| 84 |
} |
86 |
} |
| 85 |
// update filters in project descriptions |
87 |
// update filters in project descriptions |
|
Lines 149-160
Link Here
|
| 149 |
/* virtual resources are always deemed as being synchronized */ |
151 |
/* virtual resources are always deemed as being synchronized */ |
| 150 |
if (node.getResource().isVirtual()) |
152 |
if (node.getResource().isVirtual()) |
| 151 |
return true; |
153 |
return true; |
|
|
154 |
/* linked resource resources when target is missing or it is not a deep copy are always deemed as being synchronized */ |
| 155 |
if ((!isDeep|| !node.existsInFileSystem())&&node.getResource().isLinked() ) |
| 156 |
return true; |
| 152 |
/* does the resource exist in workspace and file system? */ |
157 |
/* does the resource exist in workspace and file system? */ |
| 153 |
if (!node.existsInWorkspace() || !node.existsInFileSystem()) |
158 |
if (!node.existsInWorkspace() || !node.existsInFileSystem()) |
| 154 |
return false; |
159 |
return false; |
| 155 |
/* we don't care about folder last modified */ |
160 |
/* we don't care about folder last modified if it is not a deep copy */ |
| 156 |
if (node.isFolder() && node.getResource().getType() == IResource.FOLDER) |
161 |
if (node.isFolder() && node.getResource().getType() == IResource.FOLDER) |
| 157 |
return true; |
162 |
return !isDeep||node.getResource().isSynchronized(IResource.DEPTH_INFINITE); |
| 158 |
/* is lastModified different? */ |
163 |
/* is lastModified different? */ |
| 159 |
Resource target = (Resource) node.getResource(); |
164 |
Resource target = (Resource) node.getResource(); |
| 160 |
long lastModifed = target.getResourceInfo(false, false).getLocalSyncInfo(); |
165 |
long lastModifed = target.getResourceInfo(false, false).getLocalSyncInfo(); |