Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » close editor in it's init method
close editor in it's init method [message #634845] Sun, 24 October 2010 15:05 Go to next message
Sebastian  is currently offline Sebastian Friend
Messages: 22
Registered: September 2010
Junior Member
hey. i want to close an editor if any exceptions occur during initialization.

the call to page.closeEditor(this, false) throws exceptions though. is there another way to do this ?

thanks Smile
Re: close editor in it's init method [message #634854 is a reply to message #634845] Sun, 24 October 2010 16:52 Go to previous message
Devi Vara Prasad Bandaru is currently offline Devi Vara Prasad BandaruFriend
Messages: 100
Registered: March 2010
Location: Hyderabad
Senior Member

Run the code in aysnc thread this will make sure that close method is called after the editor initialization is completed.


Display.getDefault().asyncExec(new Runnable() {
		@Override
		public void run() {
			getSite().getPage().closeEditor(ShapesEditor.this, false); 
		}
	});




Previous Topic:Could not detect registered XULRunner to use
Next Topic:GEF AND EMF
Goto Forum:
  


Current Time: Fri Mar 29 14:49:59 GMT 2024

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

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

Back to the top