mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-09 10:05:24 +02:00
[cleanup] format
This commit is contained in:
parent
b154ebe580
commit
cc3a724d41
1 changed files with 105 additions and 108 deletions
|
@ -53,10 +53,7 @@ import org.eclipse.ui.PlatformUI;
|
|||
* Setting an error message hides a currently displayed message until
|
||||
* <code>clearErrorMessage</code> is called.
|
||||
*/
|
||||
public class SystemMessageLine
|
||||
extends Composite
|
||||
implements ISystemMessageLine
|
||||
{
|
||||
public class SystemMessageLine extends Composite implements ISystemMessageLine {
|
||||
|
||||
private Button moreButton;
|
||||
private Label image;
|
||||
|
@ -103,8 +100,7 @@ public class SystemMessageLine
|
|||
* @param symbolicName the name of the color in the current theme's color registry.
|
||||
* @return an SWT Color or null.
|
||||
*/
|
||||
private Color getColor(String symbolicName)
|
||||
{
|
||||
private Color getColor(String symbolicName) {
|
||||
ColorRegistry registry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
|
||||
Color result = registry.get(symbolicName);
|
||||
return result;
|
||||
|
@ -237,7 +233,8 @@ public class SystemMessageLine
|
|||
case SystemMessage.WARNING:
|
||||
result = WARNING;
|
||||
break;
|
||||
default: result = NONE;
|
||||
default:
|
||||
result = NONE;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -278,10 +275,10 @@ public class SystemMessageLine
|
|||
Object[] data = null;
|
||||
if (text2 == null) {
|
||||
id = isError() ? ISystemMessages.MSG_GENERIC_E : ISystemMessages.MSG_GENERIC_I;
|
||||
data = new Object[] {text1};
|
||||
data = new Object[] { text1 };
|
||||
} else {
|
||||
id = isError() ? ISystemMessages.MSG_GENERIC_E_HELP : ISystemMessages.MSG_GENERIC_I_HELP;
|
||||
data = new Object[] {text1, text2};
|
||||
data = new Object[] { text1, text2 };
|
||||
}
|
||||
SystemMessage result = RSEUIPlugin.getPluginMessage(id, data);
|
||||
return result;
|
||||
|
@ -340,8 +337,7 @@ public class SystemMessageLine
|
|||
/**
|
||||
* Creates a new message line as a child of the given parent.
|
||||
*/
|
||||
public SystemMessageLine(Composite parent)
|
||||
{
|
||||
public SystemMessageLine(Composite parent) {
|
||||
super(parent, SWT.NONE);
|
||||
GridLayout layout = new GridLayout();
|
||||
layout.numColumns = 3;
|
||||
|
@ -384,6 +380,7 @@ public class SystemMessageLine
|
|||
public void getName(AccessibleEvent e) {
|
||||
getHelp(e);
|
||||
}
|
||||
|
||||
public void getHelp(AccessibleEvent e) {
|
||||
e.result = moreButton.getToolTipText();
|
||||
}
|
||||
|
@ -392,6 +389,7 @@ public class SystemMessageLine
|
|||
addControlListener(new ControlListener() {
|
||||
public void controlMoved(ControlEvent e) {
|
||||
}
|
||||
|
||||
public void controlResized(ControlEvent e) {
|
||||
adjustText();
|
||||
layout();
|
||||
|
@ -476,8 +474,7 @@ public class SystemMessageLine
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.ui.messages.ISystemMessageLine#setErrorMessage(java.lang.Throwable)
|
||||
*/
|
||||
public void setErrorMessage(Throwable throwable)
|
||||
{
|
||||
public void setErrorMessage(Throwable throwable) {
|
||||
SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
|
||||
message.makeSubstitution(throwable);
|
||||
setErrorMessage(message);
|
||||
|
|
Loading…
Add table
Reference in a new issue