Skip to main content



      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 11:05 Go to next message
Eclipse UserFriend
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 12:52 Go to previous message
Eclipse UserFriend
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 Jul 04 19:34:34 EDT 2025

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

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

Back to the top