Bug 574587 - Cleanup does not work with Aliased Files
Summary: Cleanup does not work with Aliased Files
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.20   Edit
Hardware: All Windows All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2021-07-01 06:13 EDT by Jörg Kubitz CLA
Modified: 2023-06-27 07:09 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Kubitz CLA 2021-07-01 06:13:25 EDT
Reproduce example: 
 * refactor the whole Working Set(!) of JDT (4.20) with "use try-with-resource" at once.
 => org.eclipse.jdt.internal.compiler.util.Util.writeToDisk makes a problem

There are two possible errors
a) press "Next" to get a cleanup-preview, then finish => file is distorted (cleanup applied twice?)
b) or press "Finish" without a preview => Exception:

---
Exception occurred while changing '/org.eclipse.jdt.core.ecj.validation/compiler/org/eclipse/jdt/internal/compiler/util/Util.java'.
  File is not synchronized with the local file system: file:/C:/Users/JKubitz/git/eclipse.jdt.core/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java
---

Background: That Util.java exists twice in the JDT Working set because it is mirrored with an alias in the project org.eclipse.jdt.core.ecj.validation/compiler 

Expected: Each *file* should be refactored only once.
Comment 1 Eclipse Genie CLA 2023-06-27 07:09:59 EDT
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.

If you have further information on the current state of the bug, please add it. 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.