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 67482 Details for
Bug 186727
[ErrorHandling] NullPointerException when trying to show a Status with OK severity
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]
Fix 01
186727.txt (text/plain), 3.49 KB, created by
Szymon Brandys
on 2007-05-16 14:55:26 EDT
(
hide
)
Description:
Fix 01
Filename:
MIME Type:
Creator:
Szymon Brandys
Created:
2007-05-16 14:55:26 EDT
Size:
3.49 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/statushandlers/StatusNotificationManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/StatusNotificationManager.java,v >retrieving revision 1.7 >diff -u -r1.7 StatusNotificationManager.java >--- Eclipse UI/org/eclipse/ui/internal/statushandlers/StatusNotificationManager.java 24 Apr 2007 11:58:27 -0000 1.7 >+++ Eclipse UI/org/eclipse/ui/internal/statushandlers/StatusNotificationManager.java 16 May 2007 18:54:53 -0000 >@@ -90,7 +90,7 @@ > final StatusInfo statusInfo = new StatusInfo(statusAdapter); > > if (!PlatformUI.isWorkbenchRunning()) { >- // we are shuttting down, so just log >+ // we are shutting down, so just log > WorkbenchPlugin.log(statusInfo.getStatus().getStatus()); > return; > } >@@ -127,9 +127,8 @@ > Display.getDefault().asyncExec(new Runnable() { > public void run() { > dialog = new StatusDialog(ProgressManagerUtil >- .getDefaultParent(), statusInfo, IStatus.OK >- | IStatus.INFO | IStatus.WARNING >- | IStatus.ERROR, modal); >+ .getDefaultParent(), statusInfo, IStatus.INFO >+ | IStatus.WARNING | IStatus.ERROR, modal); > dialog.open(); > dialog.getShell().addDisposeListener(disposeListener); > } >@@ -157,8 +156,8 @@ > dialog.getShell().removeDisposeListener(disposeListener); > dialog.close(); > dialog = new StatusDialog(ProgressManagerUtil.getDefaultParent(), >- statusInfo, IStatus.OK | IStatus.INFO | IStatus.WARNING >- | IStatus.ERROR, modal); >+ statusInfo, IStatus.INFO | IStatus.WARNING | IStatus.ERROR, >+ modal); > > dialog.open(); > dialog.getShell().addDisposeListener(disposeListener); >Index: Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchErrorHandler.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchErrorHandler.java,v >retrieving revision 1.12 >diff -u -r1.12 WorkbenchErrorHandler.java >--- Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchErrorHandler.java 11 May 2007 04:37:41 -0000 1.12 >+++ Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchErrorHandler.java 16 May 2007 18:54:53 -0000 >@@ -11,6 +11,8 @@ > > package org.eclipse.ui.statushandlers; > >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; > import org.eclipse.ui.application.WorkbenchAdvisor; > import org.eclipse.ui.internal.WorkbenchPlugin; > import org.eclipse.ui.internal.statushandlers.StatusNotificationManager; >@@ -33,6 +35,17 @@ > public void handle(final StatusAdapter statusAdapter, int style) { > if (((style & StatusManager.SHOW) == StatusManager.SHOW) > || ((style & StatusManager.BLOCK) == StatusManager.BLOCK)) { >+ >+ // INFO status is set in the adapter when the passed adapter has OK >+ // or CANCEL status >+ if (statusAdapter.getStatus().getSeverity() == IStatus.OK >+ || statusAdapter.getStatus().getSeverity() == IStatus.CANCEL) { >+ IStatus status = statusAdapter.getStatus(); >+ statusAdapter.setStatus(new Status(IStatus.INFO, status >+ .getPlugin(), status.getMessage(), status >+ .getException())); >+ } >+ > boolean modal = ((style & StatusManager.BLOCK) == StatusManager.BLOCK); > StatusNotificationManager.getInstance().addError(statusAdapter, > modal);
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 186727
:
66998
| 67482 |
67484