Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 27983 Details for
Bug 111852
[Progress] [RCP] Job ErrorNotification enhancement (set custom manager)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch: makes setting of custom JobErrorNotification possible
Eclipse_Workbench_JobErrorNotification_Patch.txt (text/plain), 23.89 KB, created by
Alexander Bieber
on 2005-10-06 17:47:38 EDT
(
hide
)
Description:
Patch: makes setting of custom JobErrorNotification possible
Filename:
MIME Type:
Creator:
Alexander Bieber
Created:
2005-10-06 17:47:38 EDT
Size:
23.89 KB
patch
obsolete
>Index: Eclipse UI/org/eclipse/ui/internal/progress/ErrorInfo.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ErrorInfo.java,v >retrieving revision 1.8 >diff -u -r1.8 ErrorInfo.java >--- Eclipse UI/org/eclipse/ui/internal/progress/ErrorInfo.java 25 Feb 2005 20:52:21 -0000 1.8 >+++ Eclipse UI/org/eclipse/ui/internal/progress/ErrorInfo.java 6 Oct 2005 21:14:44 -0000 >@@ -17,11 +17,12 @@ > import org.eclipse.jface.resource.JFaceResources; > import org.eclipse.osgi.util.NLS; > import org.eclipse.swt.graphics.Image; >+import org.eclipse.ui.progress.IJobErrorInfo; > > /** > * ErrorInfo is the info that displays errors. > */ >-public class ErrorInfo extends JobTreeElement { >+public class ErrorInfo extends JobTreeElement implements IJobErrorInfo { > > private final IStatus errorStatus; > private final Job job; >@@ -81,11 +82,10 @@ > return false; > } > >- /** >- * Return the current status of the receiver. >- * @return IStatus >- */ >- IStatus getErrorStatus() { >+ /* (non-Javadoc) >+ * @see org.eclipse.ui.internal.progress.IJobErrorInfo#getErrorStatus() >+ */ >+ public IStatus getErrorStatus() { > return errorStatus; > } > >@@ -96,10 +96,9 @@ > return true; > } > >- /** >- * Return the job that generated the error. >- * @return the job that generated the error >- */ >+ /* (non-Javadoc) >+ * @see org.eclipse.ui.internal.progress.IJobErrorInfo#getJob() >+ */ > public Job getJob() { > return job; > } >Index: Eclipse UI/org/eclipse/ui/internal/progress/ErrorNotificationManager.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ErrorNotificationManager.java,v >retrieving revision 1.13 >diff -u -r1.13 ErrorNotificationManager.java >--- Eclipse UI/org/eclipse/ui/internal/progress/ErrorNotificationManager.java 5 Aug 2005 17:56:06 -0000 1.13 >+++ Eclipse UI/org/eclipse/ui/internal/progress/ErrorNotificationManager.java 6 Oct 2005 21:14:44 -0000 >@@ -30,6 +30,9 @@ > import org.eclipse.ui.internal.ExceptionHandler; > import org.eclipse.ui.internal.Workbench; > import org.eclipse.ui.internal.WorkbenchPlugin; >+import org.eclipse.ui.internal.util.BundleUtility; >+import org.eclipse.ui.progress.IJobErrorInfo; >+import org.eclipse.ui.progress.IJobErrorNotificationManager; > import org.eclipse.ui.progress.IProgressConstants; > import org.eclipse.ui.progress.WorkbenchJob; > >@@ -37,7 +40,7 @@ > * The ErrorNotificationManager is the class that manages the display of > * error information. > */ >-public class ErrorNotificationManager { >+public class ErrorNotificationManager implements IJobErrorNotificationManager { > > private static final String ERROR_JOB = "errorstate.gif"; //$NON-NLS-1$ > >@@ -51,15 +54,21 @@ > * Create a new instance of the receiver. > */ > public ErrorNotificationManager() { >- //No special initialization >+ try { >+ setUpImages(); >+ } catch (MalformedURLException e) { >+ ProgressManagerUtil.logException(e); >+ } > } > > /** > * Set up any images the error management needs. >- * @param iconsRoot > * @throws MalformedURLException > */ >- void setUpImages(URL iconsRoot) throws MalformedURLException { >+ void setUpImages() throws MalformedURLException { >+ URL iconsRoot = BundleUtility.find(PlatformUI.PLUGIN_ID, >+ ProgressManager.PROGRESS_FOLDER); >+ > JFaceResources.getImageRegistry().put(ERROR_JOB_KEY, > ImageDescriptor.createFromURL(new URL(iconsRoot, ERROR_JOB))); > } >@@ -69,7 +78,7 @@ > * @param status > * @param job > */ >- void addError(IStatus status, Job job) { >+ public void addError(IStatus status, Job job) { > > //Handle out of memory errors via the workbench > final Throwable exception = status.getException(); >@@ -85,7 +94,7 @@ > > return; > } >- ErrorInfo errorInfo = new ErrorInfo(status, job); >+ IJobErrorInfo errorInfo = new ErrorInfo(status, job); > showError(errorInfo); > } > >@@ -94,7 +103,7 @@ > * ensure that no errors are dropped. > * @param errorInfo the error to be displayed > */ >- private void showError(final ErrorInfo errorInfo) { >+ private void showError(final IJobErrorInfo errorInfo) { > > if (!PlatformUI.isWorkbenchRunning()) { > //We are shutdown so just log >@@ -129,11 +138,11 @@ > job.schedule(); > } > >- /** >- * Get the currently registered errors in the receiver. >- * @return Collection of ErrorInfo >+ /* >+ * (non-Javadoc) >+ * @see org.eclipse.ui.progress.IJobErrorNotificationManager#getErrors() > */ >- Collection getErrors() { >+ public Collection getErrors() { > return errors; > } > >@@ -145,7 +154,7 @@ > * @param errorInfo The info the dialog is being opened for. > * @return IStatus > */ >- private IStatus openErrorDialog(String title, String msg, final ErrorInfo errorInfo) { >+ private IStatus openErrorDialog(String title, String msg, final IJobErrorInfo errorInfo) { > IWorkbench workbench = PlatformUI.getWorkbench(); > > //Abort on shutdown >@@ -172,11 +181,11 @@ > * Remove all of the errors from the finished jobs > * @param errorsToRemove The ErrorInfos that will be deleted. > */ >- private void removeFromFinishedJobs(Collection errorsToRemove) { >+ public static void removeFromFinishedJobs(Collection errorsToRemove) { > Iterator errorIterator = errorsToRemove.iterator(); > Set errorStatuses = new HashSet(); > while(errorIterator.hasNext()){ >- ErrorInfo next = (ErrorInfo) errorIterator.next(); >+ IJobErrorInfo next = (IJobErrorInfo) errorIterator.next(); > errorStatuses.add(next.getErrorStatus()); > } > >@@ -188,33 +197,25 @@ > FinishedJobs.getInstance().remove(info); > } > } >- > } > > /** > * Clear all of the errors held onto by the receiver. > */ >- private void clearAllErrors() { >+ public void clearAllErrors() { > removeFromFinishedJobs(errors); > errors.clear(); > } > >- /** >- * Display the error for the given job and any other errors >- * that have been accumulated. This method must be invoked >- * from the UI thread. >- * @param job the job whose error should be displayed >- * @param title The title for the dialog >- * @param msg The message for the dialog. >- * @return <code>true</code> if the info for the job was found and the error >- * displayed and <code>false</code> otherwise. >- */ >+ /* (non-Javadoc) >+ * @see org.eclipse.ui.internal.progress.IJobErrorNotificationManager#showErrorFor(org.eclipse.core.runtime.jobs.Job, java.lang.String, java.lang.String) >+ */ > public boolean showErrorFor(Job job, String title, String msg) { > if (dialog != null) { > // The dialog is already open so the error is being displayed > return true; > } >- ErrorInfo info = getErrorInfo(job); >+ IJobErrorInfo info = getErrorInfo(job); > if (job == null) { > info = getMostRecentError(); > } else { >@@ -230,7 +231,7 @@ > /* > * Return the most recent error. > */ >- private ErrorInfo getMostRecentError() { >+ private IJobErrorInfo getMostRecentError() { > ErrorInfo mostRecentInfo = null; > for (Iterator iter = errors.iterator(); iter.hasNext();) { > ErrorInfo info = (ErrorInfo) iter.next(); >@@ -244,9 +245,9 @@ > /* > * Return the error info for the given job > */ >- private ErrorInfo getErrorInfo(Job job) { >+ private IJobErrorInfo getErrorInfo(Job job) { > for (Iterator iter = errors.iterator(); iter.hasNext();) { >- ErrorInfo info = (ErrorInfo) iter.next(); >+ IJobErrorInfo info = (IJobErrorInfo) iter.next(); > if (info.getJob() == job) { > return info; > } >@@ -254,20 +255,25 @@ > return null; > } > >- /** >- * Return whether the manager has errors to report. >- * @return whether the manager has errors to report >- */ >+ /* (non-Javadoc) >+ * @see org.eclipse.ui.internal.progress.IJobErrorNotificationManager#hasErrors() >+ */ > public boolean hasErrors() { > return !errors.isEmpty(); > } > > /** >- * The error dialog has been closed. Clear the list of errors and >- * the stored dialog. >- */ >+ * The error dialog has been closed. Clear the stored dialog. >+ */ > public void dialogClosed() { > dialog = null; > clearAllErrors(); > } >+ >+ /** >+ * @see IJobErrorNotificationManager#clearErrors() >+ */ >+ public void clearErrors() { >+ clearAllErrors(); >+ } > } >Index: Eclipse UI/org/eclipse/ui/internal/progress/JobErrorDialog.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobErrorDialog.java,v >retrieving revision 1.10 >diff -u -r1.10 JobErrorDialog.java >--- Eclipse UI/org/eclipse/ui/internal/progress/JobErrorDialog.java 22 Jun 2005 14:54:31 -0000 1.10 >+++ Eclipse UI/org/eclipse/ui/internal/progress/JobErrorDialog.java 6 Oct 2005 21:14:45 -0000 >@@ -45,6 +45,8 @@ > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.ui.internal.WorkbenchPlugin; >+import org.eclipse.ui.progress.IJobErrorInfo; >+import org.eclipse.ui.progress.IJobErrorNotificationManager; > import org.eclipse.ui.progress.IProgressConstants; > > /** >@@ -66,7 +68,7 @@ > private static final int GOTO_ACTION_ID = IDialogConstants.CLIENT_ID + 1; > > private TableViewer jobListViewer; >- private ErrorInfo selectedError; >+ private IJobErrorInfo selectedError; > > /** > * Create a new instance of the receiver. >@@ -76,7 +78,7 @@ > * @param errorInfo > * @param displayMask > */ >- public JobErrorDialog(Shell parentShell, String title, String msg, ErrorInfo errorInfo, int displayMask) { >+ public JobErrorDialog(Shell parentShell, String title, String msg, IJobErrorInfo errorInfo, int displayMask) { > super(parentShell, title == null ? errorInfo.getJob().getName() : title, msg, errorInfo.getErrorStatus(), displayMask); > setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS | SWT.RESIZE |SWT.MIN | getDefaultOrientation()); // Do not want this one to be modal > this.selectedError = errorInfo; >@@ -244,15 +246,15 @@ > /* > * Get the notificationManager that this is being created for. > */ >- private ErrorNotificationManager getManager() { >- return ProgressManager.getInstance().errorManager; >+ private IJobErrorNotificationManager getManager() { >+ return ProgressManager.getInstance().getErrorManager(); > } > > /** > * Return the selected error info. > * @return ErrorInfo > */ >- public ErrorInfo getSelectedError() { >+ public IJobErrorInfo getSelectedError() { > return selectedError; > } > >@@ -359,7 +361,7 @@ > * int) > */ > public Image getColumnImage(Object element, int columnIndex) { >- return getIcon(((ErrorInfo)element).getJob()); >+ return getIcon(((IJobErrorInfo)element).getJob()); > } > > /* >@@ -432,13 +434,13 @@ > * > * @return ErrorInfo or <code>null</code>. > */ >- private ErrorInfo getSingleSelection() { >+ private IJobErrorInfo getSingleSelection() { > ISelection rawSelection = jobListViewer.getSelection(); > if (rawSelection != null > && rawSelection instanceof IStructuredSelection) { > IStructuredSelection selection = (IStructuredSelection) rawSelection; > if (selection.size() == 1) >- return (ErrorInfo) selection.getFirstElement(); >+ return (IJobErrorInfo) selection.getFirstElement(); > } > return null; > } >@@ -448,7 +450,11 @@ > boolean result = super.close(); > ProgressManagerUtil.animateDown(shellPosition); > >- ProgressManager.getInstance().errorManager.dialogClosed(); >+ IJobErrorNotificationManager errorManager = ProgressManager.getInstance().getErrorManager(); >+ errorManager.clearAllErrors(); >+ if (errorManager instanceof ErrorNotificationManager) >+ ((ErrorNotificationManager)errorManager).dialogClosed(); >+ > return result; > } > >@@ -472,7 +478,7 @@ > * Update widget enablements and repopulate the list. > */ > void handleSelectionChange() { >- ErrorInfo newSelection = getSingleSelection(); >+ IJobErrorInfo newSelection = getSingleSelection(); > if (newSelection != null && newSelection != selectedError) { > selectedError = newSelection; > setStatus(selectedError.getErrorStatus()); >Index: Eclipse UI/org/eclipse/ui/internal/progress/NewProgressViewer.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/NewProgressViewer.java,v >retrieving revision 1.65 >diff -u -r1.65 NewProgressViewer.java >--- Eclipse UI/org/eclipse/ui/internal/progress/NewProgressViewer.java 16 Aug 2005 17:26:07 -0000 1.65 >+++ Eclipse UI/org/eclipse/ui/internal/progress/NewProgressViewer.java 6 Oct 2005 21:14:46 -0000 >@@ -69,6 +69,7 @@ > import org.eclipse.ui.internal.WorkbenchImages; > import org.eclipse.ui.internal.WorkbenchPlugin; > import org.eclipse.ui.internal.misc.Assert; >+import org.eclipse.ui.progress.IJobErrorNotificationManager; > import org.eclipse.ui.progress.IProgressConstants; > > /** >@@ -303,8 +304,8 @@ > /* > * Get the notificationManager that this is being created for. > */ >- private ErrorNotificationManager getManager() { >- return ProgressManager.getInstance().errorManager; >+ private IJobErrorNotificationManager getManager() { >+ return ProgressManager.getInstance().getErrorManager(); > } > public void run() { > String title = ProgressMessages.NewProgressView_errorDialogTitle; >Index: Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationItem.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationItem.java,v >retrieving revision 1.40 >diff -u -r1.40 ProgressAnimationItem.java >--- Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationItem.java 11 Mar 2005 21:10:17 -0000 1.40 >+++ Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationItem.java 6 Oct 2005 21:14:46 -0000 >@@ -38,6 +38,8 @@ > import org.eclipse.swt.widgets.ToolItem; > import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.internal.WorkbenchImages; >+import org.eclipse.ui.progress.IJobErrorInfo; >+import org.eclipse.ui.progress.IJobErrorNotificationManager; > import org.eclipse.ui.progress.IProgressConstants; > > /** >@@ -197,11 +199,11 @@ > > // If the error manager has errors, display the error indication > // just in case a previous job ended in error but wasn't kept >- ErrorNotificationManager errorNotificationManager = ProgressManager.getInstance().errorManager; >+ IJobErrorNotificationManager errorNotificationManager = ProgressManager.getInstance().getErrorManager(); > if (errorNotificationManager.hasErrors()) { > Collection errors = errorNotificationManager.getErrors(); > for (Iterator iter = errors.iterator(); iter.hasNext();) { >- ErrorInfo info = (ErrorInfo) iter.next(); >+ IJobErrorInfo info = (IJobErrorInfo) iter.next(); > initButton( > errorImage, > NLS.bind(ProgressMessages.ProgressAnimationItem_error, info.getJob().getName())); >@@ -342,7 +344,7 @@ > /* > * Get the notificationManager that this is being created for. > */ >- private ErrorNotificationManager getManager() { >- return ProgressManager.getInstance().errorManager; >+ private IJobErrorNotificationManager getManager() { >+ return ProgressManager.getInstance().getErrorManager(); > } > } >Index: Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java,v >retrieving revision 1.114 >diff -u -r1.114 ProgressManager.java >--- Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java 8 Sep 2005 20:58:04 -0000 1.114 >+++ Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java 6 Oct 2005 21:14:47 -0000 >@@ -62,6 +62,7 @@ > import org.eclipse.ui.internal.dialogs.WorkbenchDialogBlockedHandler; > import org.eclipse.ui.internal.misc.Policy; > import org.eclipse.ui.internal.util.BundleUtility; >+import org.eclipse.ui.progress.IJobErrorNotificationManager; > import org.eclipse.ui.progress.IProgressConstants; > import org.eclipse.ui.progress.IProgressService; > import org.eclipse.ui.progress.WorkbenchJob; >@@ -93,7 +94,7 @@ > > final Object listenersKey = new Object(); > >- final ErrorNotificationManager errorManager = new ErrorNotificationManager(); >+ private IJobErrorNotificationManager errorManager; > > IJobChangeListener changeListener; > >@@ -345,8 +346,6 @@ > setUpImage(iconsRoot, SLEEPING_JOB, SLEEPING_JOB_KEY); > setUpImage(iconsRoot, WAITING_JOB, WAITING_JOB_KEY); > setUpImage(iconsRoot, BLOCKED_JOB, BLOCKED_JOB_KEY); >- //Let the error manager set up its own icons >- errorManager.setUpImages(iconsRoot); > } catch (MalformedURLException e) { > ProgressManagerUtil.logException(e); > } >@@ -1244,4 +1243,27 @@ > updater.refreshAll(); > > } >+ >+ private IJobErrorNotificationManager createDefaultErrorNotificationManager() { >+ return new ErrorNotificationManager(); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.ui.progress.IProgressService#setJobErrorNotificationManager(org.eclipse.ui.progress.IJobErrorNotificationManager) >+ */ >+ public void setJobErrorNotificationManager(IJobErrorNotificationManager jobErrorNotificationManager) { >+ this.errorManager = jobErrorNotificationManager; >+ } >+ >+ /** >+ * Returns the current error notification manager >+ * @return The current error notification manager >+ */ >+ public IJobErrorNotificationManager getErrorManager() { >+ if (errorManager == null) >+ errorManager = createDefaultErrorNotificationManager(); >+ return errorManager; >+ } >+ >+ > } >Index: Eclipse UI/org/eclipse/ui/internal/progress/WorkbenchSiteProgressService.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/WorkbenchSiteProgressService.java,v >retrieving revision 1.29 >diff -u -r1.29 WorkbenchSiteProgressService.java >--- Eclipse UI/org/eclipse/ui/internal/progress/WorkbenchSiteProgressService.java 27 Apr 2005 18:57:37 -0000 1.29 >+++ Eclipse UI/org/eclipse/ui/internal/progress/WorkbenchSiteProgressService.java 6 Oct 2005 21:14:47 -0000 >@@ -37,6 +37,7 @@ > import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.internal.PartSite; > import org.eclipse.ui.part.WorkbenchPart; >+import org.eclipse.ui.progress.IJobErrorNotificationManager; > import org.eclipse.ui.progress.IProgressService; > import org.eclipse.ui.progress.IWorkbenchSiteProgressService; > import org.eclipse.ui.progress.WorkbenchJob; >@@ -350,4 +351,12 @@ > public Image getIconFor(Job job) { > return getWorkbenchProgressService().getIconFor(job); > } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.eclipse.ui.progress.IProgressService#setJobErrorNotificationManager(org.eclipse.ui.progress.IJobErrorNotificationManager) >+ */ >+ public void setJobErrorNotificationManager(IJobErrorNotificationManager jobErrorNotificationManager) { >+ getWorkbenchProgressService().setJobErrorNotificationManager(jobErrorNotificationManager); >+ } > } >Index: Eclipse UI/org/eclipse/ui/progress/IProgressService.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IProgressService.java,v >retrieving revision 1.27 >diff -u -r1.27 IProgressService.java >--- Eclipse UI/org/eclipse/ui/progress/IProgressService.java 21 Jul 2005 17:18:14 -0000 1.27 >+++ Eclipse UI/org/eclipse/ui/progress/IProgressService.java 6 Oct 2005 21:14:48 -0000 >@@ -135,4 +135,13 @@ > */ > public void showInDialog(Shell shell, Job job); > >+ /** >+ * Sets the job error notification manager. >+ * >+ * @param jobErrorNotificationManager The manager to set or <code>null</code> to reset to the default manager >+ * >+ * @since 3.2 >+ */ >+ public void setJobErrorNotificationManager(IJobErrorNotificationManager jobErrorNotificationManager); >+ > } >Index: Eclipse UI/org/eclipse/ui/progress/IJobErrorInfo.java >=================================================================== >RCS file: Eclipse UI/org/eclipse/ui/progress/IJobErrorInfo.java >diff -N Eclipse UI/org/eclipse/ui/progress/IJobErrorInfo.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ Eclipse UI/org/eclipse/ui/progress/IJobErrorInfo.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,29 @@ >+/* >+ * Created on Oct 6, 2005 >+ */ >+package org.eclipse.ui.progress; >+ >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.jobs.Job; >+ >+/** >+ * IJobErrorInfo is used to accumulate errors that occured during job execution >+ * within instances of {@link org.eclipse.ui.progress.IJobErrorNotificationManager} >+ * >+ * @since 3.2 >+ */ >+public interface IJobErrorInfo { >+ >+ /** >+ * Return the current status of the receiver. >+ * @return IStatus >+ */ >+ public abstract IStatus getErrorStatus(); >+ >+ /** >+ * Return the job that generated the error. >+ * @return the job that generated the error >+ */ >+ public abstract Job getJob(); >+ >+} >Index: Eclipse UI/org/eclipse/ui/progress/IJobErrorNotificationManager.java >=================================================================== >RCS file: Eclipse UI/org/eclipse/ui/progress/IJobErrorNotificationManager.java >diff -N Eclipse UI/org/eclipse/ui/progress/IJobErrorNotificationManager.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ Eclipse UI/org/eclipse/ui/progress/IJobErrorNotificationManager.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,55 @@ >+/* >+ * Created on Oct 6, 2005 >+ */ >+package org.eclipse.ui.progress; >+ >+import java.util.Collection; >+ >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.jobs.Job; >+ >+/** >+ * Instances of IJobErrorNotificationManager are responsible to manage the display of >+ * information on errors occured during job execution. >+ * >+ * @since 3.2 >+ */ >+public interface IJobErrorNotificationManager { >+ >+ /** >+ * Display the error for the given job and any other errors >+ * that have been accumulated. This method must be invoked >+ * from the UI thread. >+ * @param job the job whose error should be displayed >+ * @param title The title for the dialog >+ * @param msg The message for the dialog. >+ * @return <code>true</code> if the info for the job was found and the error >+ * displayed and <code>false</code> otherwise. >+ */ >+ public abstract boolean showErrorFor(Job job, String title, String msg); >+ >+ /** >+ * Return whether the manager has errors to report. >+ * @return whether the manager has errors to report >+ */ >+ public abstract boolean hasErrors(); >+ >+ /** >+ * Add a new error to the list for the supplied job. >+ * @param status The error status of the failed job. >+ * @param job The failed job. >+ */ >+ public void addError(IStatus status, Job job); >+ >+ /** >+ * Returns the list of accumulated errors >+ * @return A Collection of {@link IJobErrorInfo}. The list of errors accumulated. >+ */ >+ public Collection getErrors(); >+ >+ /** >+ * Clears the list of errors. >+ */ >+ public void clearAllErrors(); >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 111852
: 27983 |
38254
|
38255
|
38256
|
38257