Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Status Handlers for RAP
Status Handlers for RAP [message #1044918] Fri, 19 April 2013 13:58 Go to next message
S. SchulzFriend
Messages: 71
Registered: September 2011
Member
Hi guys!

Short question: I'm single sourcing an application and want to use the extension point org.eclipse.ui.statusHandlers. It's registered like this:

   
  <extension point="org.eclipse.ui.statusHandlers"> 
      <statusHandler
            class="our.company.statushandler.DefaultStatusHandler"
            id="our.company.statushandler"/>
      <statusHandlerProductBinding
            handlerId="our.company.statushandler"
            productId="???">
      </statusHandlerProductBinding>
   </extension>


Now where do I get the product ID from? In RCP there is an actual product file somewhere with an ID, in RAP there isn't. I already tried the application ID, branding ID, plug-in IDs, URL of the entry point, and some various concatenations of these...

Thanks for the help,

S. Schulz
Re: Status Handlers for RAP [message #1049128 is a reply to message #1044918] Thu, 25 April 2013 12:03 Go to previous message
S. SchulzFriend
Messages: 71
Registered: September 2011
Member
That's one of the moments I'm tempted to say "Noone uses RAP professional applications", but that's when people find their reply buttons. Evidently you can use RAP in production without using any of the stuff that makes it great, like single-sourcing with RCP.

A way (as far as I can tell the only one) to make status handler work in RAP is to extend org.eclipse.ui.application.WorkbenchAdvisor like this:

public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {

	private AbstractStatusHandler workbenchErrorHandler;

	@Override
	public synchronized AbstractStatusHandler getWorkbenchErrorHandler() {
		if (this.workbenchErrorHandler == null) {
			this.workbenchErrorHandler = new MyCustomStatusHandler();
		}
		return this.workbenchErrorHandler;
	}

	// other stuff 
}
Previous Topic:[2.1] How to get IP from client?
Next Topic:Virgo + RAP + OSGi: Extension Points and Fancy Theme
Goto Forum:
  


Current Time: Fri Nov 28 06:10:42 GMT 2014

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

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