Bug 16226 - Renaming and recreating of elements
Summary: Renaming and recreating of elements
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dirk Baeumer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-17 06:04 EDT by Dirk Baeumer CLA
Modified: 2004-05-18 05:29 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Baeumer CLA 2002-05-17 06:04:35 EDT
Build 20020518

Scenario:

- create a WEB project (WSAD M5 driver)
- select the folder Web Content
- rename that folder to Web Content2

observe: during the rename WASD somehow recreates the old Web Content folder. 
As a result undoing the rename ends in an error dialog saying that the resource 
already exists.

There are several options to fix this:

- the undo manager also listens to resource deltas (currently only listens to
  Java Model deltas) to flush the undo stack in this case.

- we don't provide undo for renaming non Java resources. In this case we would
  use the Workbench actions instead of the Java actions.

Doesn't block us to start first test fix pass. But should be addressed in first 
fix pass.
Comment 1 Dirk Baeumer CLA 2002-05-28 08:38:24 EDT
Listening to resource deltas doesn't fix the problem since refactoring 
unregisters the listener during change execution. The problem is that WSAD 
changes the element tree in PRE or POST auto build and refactoring has no 
change to figure this out. 

Talking to Core how to solve the problem
Comment 2 Dirk Baeumer CLA 2002-06-07 10:22:18 EDT
Lowering priority since this will not be addressed in F3
Comment 3 Dirk Baeumer CLA 2004-05-18 05:29:30 EDT
There is now way how refactoring can detect this case and do the right thing. 
The refactoring still flags the undo as not processable which results in the 
fact that the refactoring can't be undo in this case.

Instead of recreating the element WSAD should now use the new refactoring 
participant architecture.