|
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 fieldDecoration = FieldDecorationRegistry.getDefault() |
| 82 |
.getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED); |
82 |
.getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED); |
| 83 |
fEmptyExpression.setImage(fieldDecoration.getImage()); |
83 |
fEmptyExpression.setImage(fieldDecoration.getImage()); |
| 84 |
|
84 |
|
| 85 |
fWrongExpression = new ControlDecoration(expression, SWT.LEFT | SWT.TOP); |
85 |
fWrongExpression = new ControlDecoration(expression, SWT.LEFT | SWT.TOP); |
| 86 |
fieldDecoration = FieldDecorationRegistry.getDefault() |
86 |
FieldDecoration errFieldDecoration = FieldDecorationRegistry.getDefault() |
| 87 |
.getFieldDecoration(FieldDecorationRegistry.DEC_ERROR); |
87 |
.getFieldDecoration(FieldDecorationRegistry.DEC_ERROR); |
| 88 |
fWrongExpression.setImage(fieldDecoration.getImage()); |
88 |
fWrongExpression.setImage(errFieldDecoration.getImage()); |
| 89 |
fWrongExpression.hide(); |
89 |
fWrongExpression.hide(); |
| 90 |
|
90 |
|
| 91 |
// leave enough room for decorators |
91 |
// leave enough room for decorators |
|
Lines 96-102
Link Here
|
| 96 |
} |
96 |
} |
| 97 |
|
97 |
|
| 98 |
protected void updateButtons() { |
98 |
protected void updateButtons() { |
| 99 |
boolean empty = fExpression.getText().trim().length() == 0; |
99 |
boolean empty = getExpressionText().length() == 0; |
| 100 |
|
100 |
|
| 101 |
fOKNewTabButton.setEnabled(!empty); |
101 |
fOKNewTabButton.setEnabled(!empty); |
| 102 |
fOKButton.setEnabled(!empty); |
102 |
fOKButton.setEnabled(!empty); |