Community
Participate
Working Groups
Hi all, here is a posting I wrote in newsgroup eclipse.platform.rcp, that describes the problem I' facing: " We added a custom exception handler to a RCP application. It is handling uncaught EventLoop Exceptions and those thrown within ISaveRunnables. I wondered if there is a way to intercept exceptions that are thrown within a Job, too? I've seen that org.eclipse.ui.internal.progress.ProgressManager holds an instance of ErrorNotificationManager that is responsible of displaying errors within Jobs to the user. For ISafeRunnables it is possible to set the runner by SafeRunnable.setRunner(ISaveRunnableRunner); Are there plans to provide such a similar possibility for the ProgressService in Eclipse. Something like IProgressService.setErrorNotifcationManager(IJobErrorNotificationManager) would be great ... " I've created a patch for org.eclipse.ui.workbench that introduces IJobErrorNotificationListener and IJobErrorInfo used by the implementation of IProgressService and its companions to display. I also added a method IProgressService: setJobErrorNotificationManager(IJobErrorNotificationManager jobErrorNotificationManager); The implementation - ProgressManager - uses the default implementation if none was set or it was set to null. I hope this will be taken into consideration Best regards Alexander Bieber
Created attachment 27983 [details] Patch: makes setting of custom JobErrorNotification possible
I agree. I like to fashion all windows displayed to the user as an RCP developer. Job exceptions are the ones that get away.
This has several API changes so we will not be able to do anything more for 3.2 as we are well past the API freeze. This patch is also out of date so I couldn't see what you were after. Could you attach either a new patch or the classes you have edited please?
Hi all, thanks for the update. What I intended was to provide the possibility for RCP applications to override the presentation of errors that rise when running Jobs. This lets developers provide a common UI for error reporting for their RCP application. The patch I posted basically added one funtionallity to IProgressService: /** * Sets the job error notification manager. * * @param jobErrorNotificationManager The manager to set or <code>null</code> to reset to the default manager * * @since 3.? */ public void setJobErrorNotificationManager(IJobErrorNotificationManager jobErrorNotificationManager); this should accept an implementation of IJobErrorNotificationManager containing methods like showErrorFor(Job job, String title, String msg); addError(IStatus status, Job job); the default implementation and setting was the existing (org.eclipse.ui.internal.progress.)ErrorNotificationManager. I can work on a patch against the current CVS version but this is likely to be outdated too when this bug is processed. I will attach the added/changed classes here for now ... Best regards
Created attachment 38254 [details] changed IProgressService changed IProgressService added: public void setJobErrorNotificationManager(IJobErrorNotificationManager jobErrorNotificationManager);
Created attachment 38255 [details] new IJobErrorNotificationManager new IJobErrorNotificationManager is the interface for error notification managers. Basicly it is extracted from the existing ErrorNotificationManager
Created attachment 38256 [details] new IJobErrorInfo new IJobErrorInfo abstracts ErrorInfo that is in an internal package and was used by ErrorNotificationManager. IJobErrorNotificationManager should be written against this interface.
Created attachment 38257 [details] changed ProgressManager changed ProgressManager now holds an instance of IJobErrorNotificationManager and acsesses it via a getter IJobErrorNotificationManager getErrorManager() that will create a default one if not set.
This is it. I also changed ErrorInfo.java ErrorNotificationManager.java FinishedJobs.java JobErrorDialog.java NewProgressViewer.java ProgressAnimationItem.java WorkbenchSiteProgressService.java but these changes I think will result when adding the interfaces. Best regards
Reopening for consideration post 3.2.
Any news on this issue? It is tagged 'helpwanted'. Should I do a new patch for the current cvs version? Can this still be included in 3.3 ? Regards, Alex
We are revisiting our error reporting in general in 3.3 and the progress error reporting is part of it. I am adding this as a prerequisite of the plan item to make sure we cover your cases adequately.
Thanks, Tod. I see there's a lot going on with similar topics. Please tell me if I can help on this one. Regards, Alex
BTW this changed significantly in 3.3. Szymon may have more insight
This now can be achieved by using the status handling facility. The facility is in Eclipse since 3.3.
Marking verified