Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328677

Summary: Deleting a server does not close its editor
Product: [WebTools] WTP ServerTools Reporter: Rob Stryker <stryker>
Component: wst.serverAssignee: Angel Vera <arvera>
Status: CLOSED DUPLICATE QA Contact: Angel Vera <arvera>
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: 3.2.3   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Rob Stryker CLA 2010-10-26 04:29:14 EDT
ServerEditor has a lifecycle listener which is set to respond to serverRemoved() events, however this listener checks oldServer.equals(server).

Unfortunately, it seems changes to Base class now check whether the deleted server is a working copy and if that's the same as the editor version. This is a bad check for this particular listener.

By definition, all servers in the server editor are working copies. And also by definition, all servers sitting in the Servers view are *not* working copies. So, by deleting a server from the servers view, the lifecycle listener gets a non-wc version, and checks if it's .equals() a server editor working copy. This always returns false, and the editor never closes.
Comment 1 Rob Stryker CLA 2010-10-26 04:30:04 EDT
I believe this is a regression. The code clearly makes an attempt to close the editors of a server that is deleted and I am sure this worked at some time in the past.
Comment 2 Angel Vera CLA 2010-10-28 10:39:17 EDT

*** This bug has been marked as a duplicate of bug 240167 ***