Bug 37297 - [Contributions] SubStatusLineManager.setVisible handles message image wrong
Summary: [Contributions] SubStatusLineManager.setVisible handles message image wrong
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1.1   Edit
Assignee: Simon Arsenault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-06 16:51 EDT by Richard Kulp CLA
Modified: 2003-06-03 12:07 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Kulp CLA 2003-05-06 16:51:39 EDT
public void setVisible(boolean visible) {
		super.setVisible(visible);
		if (visible) {
			getParentStatusLineManager().setErrorMessage(image, errorMessage);
			getParentStatusLineManager().setMessage(image, message);
		} else {
			getParentStatusLineManager().setMessage(null, (String) null);
			getParentStatusLineManager().setErrorMessage(null, null);
		}
	}

The problem is that even though there are separate text message and
errorMessage's stored, there is only one image stored. So what happens on "if
(visible)" is that the message image is sent into setErrorMessage. The problem
is that setErrorMessage() overrides setMessage() so that if there is no error
message text, but there was a message with an image, all that gets displayed is
the image with no text. This is because the errorMessageImage gets set to the
image, but the errorMessage text is null. Need to maintain a separate errorImage
too so that this will restore correctly.

Thanks,
Rich Kulp
Comment 1 Simon Arsenault CLA 2003-05-22 15:20:34 EDT
Code changed in HEAD stream. SubStatusLineManager now holds onto both message 
and error images.
Comment 2 Richard Kulp CLA 2003-05-22 15:34:03 EDT
I presume HEAD means 3.0 and not 2.1.1?
Comment 3 Simon Arsenault CLA 2003-06-03 10:11:58 EDT
Sorry for the delay in replying...I just got the e-mail notification (2 weeks 
later!)

Yes, HEAD stream means the 3.0 stream. If you want this included for 2.1.1, 
please let us know.
Comment 4 Richard Kulp CLA 2003-06-03 10:40:21 EDT
Hi.

If it is safe enough, this really should be in the 2.1.1 build. We have an
editor that extensively uses images in the status line and we are constantly
getting this error when switching between the editor and views. It is very
annoying. We will be going out on the 2.1.1 base.

Thanks, Rich Kulp
Comment 5 Simon Arsenault CLA 2003-06-03 12:06:25 EDT
Released into 2.1 maintenance stream as per Nick's approval. Just imported and 
released HEAD code changes done to SubStatusLineManager
Comment 6 Simon Arsenault CLA 2003-06-03 12:07:10 EDT
Just updated the target milestone field to track 2.1.1 bug fixes.