Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328677 - Deleting a server does not close its editor
Summary: Deleting a server does not close its editor
Status: CLOSED DUPLICATE of bug 240167
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: wst.server (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Angel Vera CLA
QA Contact: Angel Vera CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-26 04:29 EDT by Rob Stryker CLA
Modified: 2010-10-28 10:39 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***