Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 107136

Summary: [JFace] Usage of System.err in JFace
Product: [Eclipse Project] Platform Reporter: Kim Horne <eclipse>
Component: UIAssignee: 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 CLA 2005-08-16 13:28:55 EDT
It would be nice if these calls could be replaced with calls to the core logging mechanism.  Relying on it 
directly isn't an option, so we might need to introduce a logging adapter in JFace that is set by 
Workbench...
Comment 1 Susan McCourt CLA 2005-08-16 13:55:02 EDT
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.
Comment 2 Susan McCourt CLA 2005-08-24 16:59:45 EDT
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?
Comment 3 Susan McCourt CLA 2005-12-02 13:42:29 EST
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.
Comment 4 Susan McCourt CLA 2006-02-02 13:36:48 EST
moving non-API affecting bugs to M6 for investigation.
Comment 5 Susan McCourt CLA 2006-03-28 12:10:14 EST
removing milestone, this is low prio
Comment 6 Susan McCourt CLA 2009-07-09 15:57:36 EDT
As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009
Comment 7 Eclipse Webmaster CLA 2019-09-06 15:36:18 EDT
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.
Comment 8 Eclipse Genie CLA 2022-01-24 13:41:33 EST
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.