Community
Participate
Working Groups
Branch "branch_20091215_bug236169", but soon in HEAD (bug 298923). User should be informed that project from a patch is not accessible (doesn't exist, is closed, etc). Current implementation in the branch will not display the project. This may be acceptable when applying a patch for a single project (user will get a suspicious message saying the patch contains no changes), but for multiple projects this may result in omitting part of the patch without noticing it.
(In reply to comment #0) > Current implementation in the branch will not display the project. This does no longer apply to the code in HEAD. If a project to-be-patched exists in the workspace but is closed the sync view will display the project as conflict. We can open the project, the synchronization will refresh and when all hunks are matched the conflict indicator will disappear. However, we are still missing an information that the conflict is caused by the project being closed. What is still true in comment 0 is that when the project does not exist in the workspace, it will not take part in the synchronization ie won't be displayed even as a conflicting change.
In addition to comment 1, when a project to-be-patched is closed when sync'ing with a patch it will be displayed as a conflicting change, but after switching models it will disappear. This inconsistency is caused by the fact that ApplyPatchSubscriber.roots() returns all projects from the patch (no matter if they are accessible or not) but ResourceModelContentProvider does not return resources from inaccessible projects[1][2]. This is not an issue when closing the project, because there are two types of events sent then: removal and change (the closed project is still considered as root[3]) and the diff tree is not refreshed (calling SynchronizationContentProvider.getElements(Object)) but redrawn only. I'm not sure how we should fix this. As the first step I would fix the inconsistency and ignore all projects that are not accessible. Having fixed that I would look for way to display closed/non-existent projects (decorated with a proper label). [1] ResourceModelContentProvider.isInScope(ISynchronizationScope, Object, Object) [2] SynchronizationContentProvider.getChildrenInContext(ISynchronizationContext, Object, Object[]) [3] SubscriberResourceCollector.processDelta(IResourceDelta, IResource[]) and SubscriberResourceCollector.isDescendantOfRoot(IResource, IResource[]) returning true
Created attachment 158578 [details] Fix v01 Fixed the inconsistency mentioned in comment 2.
Created attachment 158579 [details] mylyn/context/zip
We had an offline chat and agreed that the best approach for now would be to sustain conclusion from comment 2 i.e. never display projects that are not accessible, but at the same time use a dialog or status line to inform that some projects from the patch are missing. The next step would be to open a separate bug where we could discuss how inaccessible projects should be presented in the Sync view. I think it's ok to address this after 3.6 ships. Note, that when we decide to ignore inaccessible projects bug 301793 will become obsolete. Pawel, please take this over, revisit Fix v01 and add a dialog or status line message (whatever you decide) mentioned above.
Created attachment 160861 [details] Snap I've came up with adding a wizard page informing users that patch modifies non accessible projects. The page composes well into the current workflow and has additional advantage of allowing users to open closed projects.
Also "Select All" and "Deselect All" buttons will appear in the final cut.
Created attachment 161115 [details] Patch_v01
Patch_v01 in HEAD, marking as FIXED.
Verified using I20100310-1800.