| Summary: | [refactoring] Must RefactoringWizardOpenOperation use a workspace lock? | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Troy Bishop <tjbishop> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | arvera, deepakazad, markus.kell.r, remy.suen |
| Version: | 3.6 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
|
Description
Troy Bishop
> Must RefactoringWizardOpenOperation use a workspace lock? Unfortunately yes, mainly because we don't know what resources participants are going to touch and because the workspace does not allow to enlarge an initially taken rule later (this prevents deadlocks). *** This bug has been marked as a duplicate of bug 239404 *** Is there a possibility that the code can be reworked so that participants can tell you ahead of time (before you do any locking) if they require a higher kind of lock and then apply multi-lock during the operation. Everything is possible, but this comes with a high cost. Up to now, refactoring always ran with the workspace lock. If we relax that, many more issues can show up, so this would need quite some testing and review of the whole refactoring implementation to find loopholes (e.g. if you delete a file with a special encoding, you also get a change in a .settings/*.prefs file, so do we need a rule for that?). A further complication is that participants are only loaded lazily based on the selected element, so it is not easy to know about the right lock when we start the refactoring. And if we don't hold a large enough lock at the time the refactoring and the processors are initialized, there's a new opportunity for race conditions if the workspace is being modified concurrently. Troy/Angel: If you need this in a product, please file an IES request. 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. |