Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » Close part programmatically
Close part programmatically [message #995244] Sat, 29 December 2012 09:07 Go to next message
Eclipse UserFriend
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 messageGo to next message
Eclipse UserFriend
Nevermind...
partService.hidePart(part, true);

does it.

thanks Frank
Re: Close part programmatically [message #1743931 is a reply to message #995249] Tue, 20 September 2016 13:48 Go to previous message
Eclipse UserFriend
Thanks Frank. You saved my day!!!
Previous Topic:Hide Min/Maw buttons
Next Topic:multiple instances of an eclipse 4 application project
Goto Forum:
  


Current Time: Tue Jul 22 21:18:14 EDT 2025

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

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

Back to the top