|
Lines 77-91
Link Here
|
| 77 |
} |
77 |
} |
| 78 |
}); |
78 |
}); |
| 79 |
fEmptyExpression = new ControlDecoration(expression, SWT.LEFT | SWT.CENTER); |
79 |
fEmptyExpression = new ControlDecoration(expression, SWT.LEFT | SWT.CENTER); |
| 80 |
fEmptyExpression.setDescriptionText("Enter an expression to position rendering"); |
80 |
fEmptyExpression.setDescriptionText(Messages.getString("GoToAddressBarWidget.EnterExpressionMessage")); //$NON-NLS-1$ |
| 81 |
FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault() |
81 |
FieldDecoration fieldDec = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED); |
| 82 |
.getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED); |
82 |
fEmptyExpression.setImage(fieldDec.getImage()); |
| 83 |
fEmptyExpression.setImage(fieldDecoration.getImage()); |
|
|
| 84 |
|
83 |
|
| 85 |
fWrongExpression = new ControlDecoration(expression, SWT.LEFT | SWT.TOP); |
84 |
fWrongExpression = new ControlDecoration(expression, SWT.LEFT | SWT.TOP); |
| 86 |
fieldDecoration = FieldDecorationRegistry.getDefault() |
85 |
fieldDec = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR); |
| 87 |
.getFieldDecoration(FieldDecorationRegistry.DEC_ERROR); |
86 |
fWrongExpression.setImage(fieldDec.getImage()); |
| 88 |
fWrongExpression.setImage(fieldDecoration.getImage()); |
|
|
| 89 |
fWrongExpression.hide(); |
87 |
fWrongExpression.hide(); |
| 90 |
|
88 |
|
| 91 |
// leave enough room for decorators |
89 |
// leave enough room for decorators |
|
Lines 96-102
Link Here
|
| 96 |
} |
94 |
} |
| 97 |
|
95 |
|
| 98 |
protected void updateButtons() { |
96 |
protected void updateButtons() { |
| 99 |
boolean empty = fExpression.getText().trim().length() == 0; |
97 |
boolean empty = getExpressionText().length() == 0; |
| 100 |
|
98 |
|
| 101 |
fOKNewTabButton.setEnabled(!empty); |
99 |
fOKNewTabButton.setEnabled(!empty); |
| 102 |
fOKButton.setEnabled(!empty); |
100 |
fOKButton.setEnabled(!empty); |