| Summary: | [JFace] Usage of System.err in JFace | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Kim Horne <eclipse> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | minor | ||
| Priority: | P5 | CC: | bokowski |
| Version: | 3.1 | ||
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | stalebug | ||
|
Description
Kim Horne
There is a logging adapter in Jface - ILogger, and it is set up by the workbench in JFaceUtil. I will check for the usage of System.err and make sure that those uses are converted to the correct mechanism. After looking at this more closely, I'm not sure there's anything that should be done. The platform log API only supports logging status objects. JFace (not including text) has only two uses of System.err. 1. Window.configureShell() uses it to report disposed shell images. This usage is similar to other areas of platform and JDT UI that use System.err to report such conditions. 2. ModalContext uses it to report any throwable encountered while running a new modal context thread, in addition to reporting the stack trace of the thread that created the thread. This seems fairly specific, and we'd lose the calling stack trace info if we wrap only the original throwable in a status object. Per bug #49497, it appears that the pre-existing uses of Platform.log were converted to the new ILogger mechanism, but no attempt was made to get rid of any System.err refs. I'm inclined to leave these uses as is. System.err is used in quite a few plug-ins, although I noticed that use of System.out vs. System.err is inconsistent for tracing and debug info. Thoughts? I added another use of System.err() in ModalContextThread.block(). This usage and the usage in Window.configureShell() could be fixed by wrapping the exception in an error status and using the logger.
Boris - There is still one use where I'm not sure what to do. The code is in
public static void run(IRunnableWithProgress operation, boolean fork,
IProgressMonitor monitor, Display display)
From what I understand, I can't just wrap it up in an InvocationTargetException or else I'll only get the stack trace for the target exception when the status is logged. Since we want to print both, then I'm not sure how to achieve this with the logger.
moving non-API affecting bugs to M6 for investigation. removing milestone, this is low prio This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |