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 14: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 14: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: Sat Oct 25 23:36:00 GMT 2014

Powered by FUDForum. Page generated in 0.10713 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software