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