Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 299024 - [Linked Resources] Can't do SHALLOW move for a container containing links to non-existing locations
Summary: [Linked Resources] Can't do SHALLOW move for a container containing links to ...
Status: RESOLVED DUPLICATE of bug 298870
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Szymon Brandys CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-07 05:54 EST by Szymon Brandys CLA
Modified: 2010-01-26 11:46 EST (History)
2 users (show)

See Also:


Attachments
Test v01 (1.75 KB, patch)
2010-01-07 06:02 EST, Szymon Brandys CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Szymon Brandys CLA 2010-01-07 05:54:25 EST
Build id: I20091217-0819

Steps:
I'll attach a test illustrating the issue.
Comment 1 Szymon Brandys CLA 2010-01-07 06:02:08 EST
Created attachment 155484 [details]
Test v01
Comment 2 Serge Beauchamp CLA 2010-01-08 05:40:49 EST
According to my tracing, this occurs because of the following line in ResourceTree.standardMoveFolder():

			if (!force && !isSynchronized(source, IResource.DEPTH_INFINITE)) {
				message = NLS.bind(Messages.localstore_resourceIsOutOfSync, source.getFullPath());
				IStatus status = new ResourceStatus(IStatus.ERROR, source.getFullPath(), message);
				failed(status);


The isSynchronized() is always false because the synchronizeExistence() is always false for that tree.

It seems like we should be able to move linked resources that have broken location, but I'm not sure of why this restriction exists to begin with.

Maybe we should check if the resource is linked before considering it as 'not synchronized', but it seems it would have un-suspected repercussions.
Comment 3 Szymon Brandys CLA 2010-01-08 06:16:45 EST
Thanks Serge. I'm on it already. I think that we should be less restrictive while checking isSynchronized() for SHALLOW move or copy. Links pointing to non-exisitng locations should be treated as synced then.
Comment 4 Serge Beauchamp CLA 2010-01-26 11:31:34 EST
set target
Comment 5 Szymon Brandys CLA 2010-01-26 11:46:57 EST
It's a duplicate. I think I raised it twice accidentally.

*** This bug has been marked as a duplicate of bug 298870 ***