Status Handlers for RAP [message #1044918] |
Fri, 19 April 2013 13:58 |
S. Schulz Messages: 72 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 |
S. Schulz Messages: 72 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
}
|
|
|
Powered by
FUDForum. Page generated in 0.03425 seconds