[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Closing a view from its tab

I am trying to find out what event is fired when a view is closed from its tab using the x next to the view's name. My view extends ViewPart which in-turn extends WorkbenchPart so I tried to use a PartListener to listen for when the part is closed but that does not work none of the events are fired.


public class ViewName extends ViewPart implements IPartListener{

   public ViewName(){

}


public void partActivated(IWorkbenchPart part) {
// TODO Auto-generated method stub
}


public void partBroughtToTop(IWorkbenchPart part) {
// TODO Auto-generated method stub
}


public void partClosed(IWorkbenchPart part) {
// TODO Auto-generated method stub
final Session session = Session.getInstance(); session.closeConnection();
}


public void partDeactivated(IWorkbenchPart part) {
// TODO Auto-generated method stub
}


public void partOpened(IWorkbenchPart part) {
// TODO Auto-generated method stub
} }