Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 158578 Details for
Bug 300215
[Sync View][Apply Patch] Inform when project from patch is not accessible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix v01
clipboard.txt (text/plain), 2.78 KB, created by
Tomasz Zarna
on 2010-02-09 07:01:17 EST
(
hide
)
Description:
Fix v01
Filename:
MIME Type:
Creator:
Tomasz Zarna
Created:
2010-02-09 07:01:17 EST
Size:
2.78 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.team.ui >Index: src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriber.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriber.java,v >retrieving revision 1.2 >diff -u -r1.2 ApplyPatchSubscriber.java >--- src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriber.java 26 Jan 2010 12:35:04 -0000 1.2 >+++ src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriber.java 9 Feb 2010 11:53:54 -0000 >@@ -66,9 +66,7 @@ > > public SyncInfo getSyncInfo(IResource resource) throws TeamException { > if (!isSupervised(resource)) return null; >- // XXX: doing this here is highly inefficient! >- // getPatcher().refresh(); >- // a little bit better but still called gazzilon times >+ // a little bit better than refreshing whole patch but still called too many times > refresh(new IResource[] { resource }, IResource.DEPTH_ZERO, null); > try { > FilePatch2 diff = (FilePatch2) PatchModelProvider.getPatchObject(resource, getPatcher()); >@@ -91,21 +89,28 @@ > } > > public IResource[] members(IResource resource) throws TeamException { >+ //XXX: what if there is an addition in the patch that needs to add 3 subfolders? > try { > if(resource.getType() == IResource.FILE) > // file has no IResource members > return new IResource[0]; > IContainer container = (IContainer) resource; >- >+ > // workspace container members >- List existingChildren = new ArrayList(Arrays.asList(container.members())); >+ List existingChildren = new ArrayList(); >+ >+ if (container.isAccessible()) >+ existingChildren.addAll(Arrays.asList(container.members())); > > // patch members, subscriber location > FilePatch2[] diffs = getPatcher().getDiffs(); > for (int i = 0; i < diffs.length; i++) { > IResource file = PatchModelProvider.getFile(diffs[i], getPatcher()); >- if (!container.exists(file.getProjectRelativePath())) { >- existingChildren.add(file); >+ if (container.getFullPath().isPrefixOf(file.getFullPath())) { >+ // XXX: check segments >+ if (!container.exists(file.getProjectRelativePath())) { >+ existingChildren.add(file); >+ } > } > } > return (IResource[]) existingChildren.toArray(new IResource[existingChildren.size()]); >@@ -136,7 +141,8 @@ > // return array of projects from the patch > DiffProject diffProject = ((PatchProjectDiffNode)children[i]).getDiffProject(); > IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(diffProject.getName()); >- roots.add(project); >+ if (project.isAccessible()) >+ roots.add(project); > } > } else { > roots.add(getPatcher().getTarget());
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 300215
:
158578
|
158579
|
160861
|
161115