/** * Sets the message and image to the given status. * <code>null</code> is a valid argument and will set the empty text and no image */ public void setErrorStatus(IStatus status) { if (status != null && !status.isOK()) { String message= status.getMessage(); if (message != null && message.length() > 0) { setText(message); setImage(findImage(status)); setBackground(JFaceColors.getErrorBackground(getDisplay())); return; } } setText(""); //$NON-NLS-1$ setImage(null); setBackground(fNormalMsgAreaBackground); } }
/** * Sets the message and image to the given status. * <code>null</code> is a valid argument and will set the empty text and no image * * @param status the status */ public void setErrorStatus(IStatus status) { if (status != null && !status.isOK()) { String message= status.getMessage(); if (message != null && message.length() > 0) { setText(message); setImage(findImage(status)); setBackground(JFaceColors.getErrorBackground(getDisplay())); return; } } setText(""); //$NON-NLS-1$ setImage(null); setBackground(fNormalMsgAreaBackground); } }
/** * Sets the message and image to the given status. * * @param status * IStatus or <code>null</code>. <code>null</code> will * set the empty text and no image. */ public void setErrorStatus(IStatus status) { if (status != null && !status.isOK()) { String message = status.getMessage(); if (message != null && message.length() > 0) { setText(message); // unqualified call of setImage is too ambiguous for // Foundation 1.0 compiler // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=140576 MessageLine.this.setImage(findImage(status)); setBackground(JFaceColors.getErrorBackground(getDisplay())); return; } } setText(""); //$NON-NLS-1$ // unqualified call of setImage is too ambiguous for Foundation 1.0 // compiler // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=140576 MessageLine.this.setImage(null); setBackground(fNormalMsgAreaBackground); } }
messageText.setText(newMessage); if (showingError) setMessageColors(JFaceColors.getErrorBackground(messageComposite.getDisplay())); else { lastMessageText = newMessage;
messageText.setText(newMessage); if (showingError) setMessageColors(JFaceColors.getErrorBackground(messageComposite.getDisplay())); else { lastMessageText = newMessage;
fMessageLabel.setBackground(JFaceColors.getErrorBackground(fMessageLabel.getDisplay())); fMessageLabel.setImage(fErrorMsgImage); fTitleImage.setImage(null);
fMessageLabel.setBackground(JFaceColors.getErrorBackground(fMessageLabel.getDisplay())); fMessageLabel.setImage(fErrorMsgImage); fTitleImage.setImage(null);