Community
Participate
Working Groups
Build id: N20090219-2000 1. Check out org.eclipse.jface from CVS. 2. Download attachment 126351 [details]. 3. Bring up the context menu on org.eclipse.jface > Team > Apply Patch... 4. Browse to the file and select it. 5. Click 'Next'. 6. Exceptions are logged. One for every file that will be created, should be four in this case. org.eclipse.core.internal.resources.ResourceException: Resource '/org.eclipse.jface/src/org/eclipse/jface/viewers/ITokenContentProvider.java' does not exist. at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:319) at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:196) at org.eclipse.core.internal.resources.File.getContents(File.java:296) at org.eclipse.core.internal.resources.File.getContents(File.java:287) at org.eclipse.compare.internal.patch.Utilities.createReader(Utilities.java:64) at org.eclipse.compare.internal.patch.Utilities$1.createReader(Utilities.java:50) at org.eclipse.compare.internal.core.patch.LineReader.load(LineReader.java:37) at org.eclipse.compare.internal.core.patch.FileDiffResult.isEmpty(FileDiffResult.java:147) at org.eclipse.compare.internal.core.patch.FileDiffResult.refresh(FileDiffResult.java:77) at org.eclipse.compare.internal.patch.WorkspaceFileDiffResult.refresh(WorkspaceFileDiffResult.java:54) at org.eclipse.compare.internal.patch.Patcher.refresh(Patcher.java:603) at org.eclipse.compare.internal.patch.Patcher.refresh(Patcher.java:596) at org.eclipse.compare.internal.patch.PatchCompareEditorInput.buildTree(PatchCompareEditorInput.java:196) at org.eclipse.compare.internal.patch.PreviewPatchPage2$13.run(PreviewPatchPage2.java:388) at org.eclipse.compare.internal.patch.PreviewPatchPage2.rebuildTree(PreviewPatchPage2.java:396) at org.eclipse.compare.internal.patch.PreviewPatchPage2.setVisible(PreviewPatchPage2.java:351) at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1161)
Created attachment 126391 [details] Sample patch to reproduce the problem You don't even need to use attachment 126351 [details] if you don't want to. Any patch that creates a file will do. Here's one anyone can use, just change the #P header to some other project that exists in your workspace. Of course, for this to work, you can't have an a.txt file in the project's root folder. ;) Or change that too if you wish. :D
*** Bug 265831 has been marked as a duplicate of this bug. ***
This error was introduced with the fix for bug 263943 which made compare.core independent of core.resource. This is because method: protected boolean targetExists(IStorage storage) { IFile file= (IFile)storage; return file != null && file.isAccessible(); } was changed to: protected boolean targetExists(ReaderCreator content) { return content != null; } So, since we don't use IFile any more we can't determine whether passed content corresponds to a file that doesn't exist.
Created attachment 126540 [details] Patch_v01
Created attachment 127145 [details] Patch_v02 As Szymon suggested I removed ReaderCreator.contentExists() method and changed ReaderCreator.createReader() to return null in case underlying resource is a file that cannot be accessed. This simplified the fix.
Created attachment 127158 [details] Patch_v03 One more change to _v02.
Created attachment 127160 [details] Patch_v04 After a discussion with Pawel, I changed the patch a bit.
Released to HEAD.
*** Bug 266724 has been marked as a duplicate of this bug. ***