Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Close part programmatically
Close part programmatically [message #995244] Sat, 29 December 2012 09:07 Go to next message
Frank Benoit is currently offline Frank Benoit
Messages: 47
Registered: July 2009
Member
When I click to close a part, the associated contribution object @PreDestroy is called.

To close a part programmatically I found:
part.getParent().getChildren().remove(part);


This closes the part, but the @PreDestroy in the contribution object is not called. It is then called on application close.

How to make this right?

thanks
Frank

Re: Close part programmatically [message #995249 is a reply to message #995244] Sat, 29 December 2012 09:20 Go to previous message
Frank Benoit is currently offline Frank Benoit
Messages: 47
Registered: July 2009
Member
Nevermind...
partService.hidePart(part, true);

does it.

thanks Frank
Previous Topic:Command selected state
Next Topic:E4 with Spring remoting integration problem
Goto Forum:
  


Current Time: Fri Aug 01 20:37:03 EDT 2014

Powered by FUDForum. Page generated in 0.03093 seconds