| Summary: | Cannot remove link to removed target file | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | feet29749 |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, Olivier_Thomann, satyam.kandula, srikanth_sankaran |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | stalebug | ||
|
Description
feet29749
I tried this with 3.7M6 (I20110310-1119) and can't reproduce. I mean, after deleting the (original) java file from the referenced project, I am able to delete the link from the corresponding referencing project. Another observation I made is, there is only a warning sign (along with the error message, of course) when the original file is deleted. Can you please check with the latest build? Closing the bug. Should it occur even with the latest build, please reopen. I am able to reproduce the problem with I20110421-1800 I get the following error in my error log: ########### !SUBENTRY 1 org.eclipse.jdt.core 4 969 2011-04-25 16:30:51.117 !MESSAGE File not found: C:\Work\wokspaces\testworkspace\Project1\src\pkg\Test1.java. !STACK 1 org.eclipse.core.runtime.CoreException: File not found: C:\Work\wokspaces\testworkspace\Project1\src\pkg\Test1.java. at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55) at org.eclipse.core.internal.filesystem.local.LocalFile.openInputStream(LocalFile.java:371) at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:773) at org.eclipse.core.internal.resources.File.getContents(File.java:289) at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1186) at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1160) at org.eclipse.jdt.internal.core.CompilationUnit.openBuffer(CompilationUnit.java:1154) at org.eclipse.jdt.internal.core.CompilationUnit.buildStructure(CompilationUnit.java:116) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:258) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:518) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:255) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:241) at org.eclipse.jdt.internal.core.JavaElement.getChildren(JavaElement.java:196) at org.eclipse.jdt.internal.core.JavaElement.getChildrenOfType(JavaElement.java:210) at org.eclipse.jdt.internal.core.CompilationUnit.getTypes(CompilationUnit.java:920) at org.eclipse.jdt.internal.corext.refactoring.reorg.JavaDeleteProcessor.willHaveAllTopLevelTypesDeleted(JavaDeleteProcessor.java:815) at org.eclipse.jdt.internal.corext.refactoring.reorg.JavaDeleteProcessor.getCusToEmpty(JavaDeleteProcessor.java:807) at org.eclipse.jdt.internal.corext.refactoring.reorg.JavaDeleteProcessor.addEmptyCusToDelete(JavaDeleteProcessor.java:798) at org.eclipse.jdt.internal.corext.refactoring.reorg.JavaDeleteProcessor.recalculateElementsToDelete(JavaDeleteProcessor.java:362) at org.eclipse.jdt.internal.corext.refactoring.reorg.JavaDeleteProcessor.checkFinalConditions(JavaDeleteProcessor.java:263) at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:224) at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:85) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121) at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:209) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2310) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: java.io.FileNotFoundException: C:\Work\wokspaces\testworkspace\Project1\src\pkg\Test1.java (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at org.eclipse.core.internal.filesystem.local.LocalFile.openInputStream(LocalFile.java:362) ############# Under investigation. Target will be set when the problem is identified. Considering this for M4. Since Jay had to go on unavoidable unplanned time off for several days, this is not ready: retargetting to 3.8 M5. Looks like we can't have a complete fix in JDT/Core for this. The fix has to go to JDT/UI. In my investigation I found that the fix may have to be made to JavaDeleteProcessor and probably to DeleteModifications. It makes sense we let the Core code to throw the exception in case the linked resource is not available and let the UI handle the exception. Moving to UI for further investigation. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |