1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

Bugzilla 312098 : [Memory Browser] do not create a rendering automatically when Memory Browser is opened. Additional cleanup per John Cortell suggestions/issues.

Randy
This commit is contained in:
Randy Rohrbach 2010-06-01 22:31:57 +00:00
parent 11a26ae0a2
commit 8def1f711a
2 changed files with 7 additions and 8 deletions

View file

@ -77,15 +77,13 @@ public class GoToAddressBarWidget {
}
});
fEmptyExpression = new ControlDecoration(expression, SWT.LEFT | SWT.CENTER);
fEmptyExpression.setDescriptionText("Enter an expression to position rendering");
FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault()
.getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED);
fEmptyExpression.setImage(fieldDecoration.getImage());
fEmptyExpression.setDescriptionText(Messages.getString("GoToAddressBarWidget.EnterExpressionMessage")); //$NON-NLS-1$
FieldDecoration fieldDec = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED);
fEmptyExpression.setImage(fieldDec.getImage());
fWrongExpression = new ControlDecoration(expression, SWT.LEFT | SWT.TOP);
fieldDecoration = FieldDecorationRegistry.getDefault()
.getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
fWrongExpression.setImage(fieldDecoration.getImage());
fieldDec = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
fWrongExpression.setImage(fieldDec.getImage());
fWrongExpression.hide();
// leave enough room for decorators
@ -96,7 +94,7 @@ public class GoToAddressBarWidget {
}
protected void updateButtons() {
boolean empty = fExpression.getText().trim().length() == 0;
boolean empty = getExpressionText().length() == 0;
fOKNewTabButton.setEnabled(!empty);
fOKButton.setEnabled(!empty);

View file

@ -9,6 +9,7 @@
# Ted R Williams (Wind River Systems, Inc.) - initial implementation
###############################################################################
GoToAddressBarWidget.EnterExpressionMessage=Enter an expression
GoToAddressBarWidget.Go=Go
GoToAddressBarWidget.Go=Go
GoToAddressBarWidget.NewTab=New Tab