ISWTObservableValue textValue = Forms.observe(text);
// NOTE this code only works if the LanguageExpressionBean is
// not
// replaced under our feet!
final LanguageExpressionBean expression = LanguageExpressionBean.bindToNodeProperty(node, id);
final String expressionPropertyName = "expression";
Forms.bindBeanProperty(bindingContext, mmng, expression, expressionPropertyName, isMandatory(expression, expressionPropertyName), expressionPropertyName, textValue, text);
String languageLabel = EditorMessages.propertiesLanguageTitle;
toolkit.createLabel(composite, languageLabel);
// toolkit.createSeparator(composite, SWT.SEPARATOR);
Combo combo = new Combo(composite, SWT.NONE | SWT.BORDER);
combo.setItems(new Languages().languageArray());
toolkit.adapt(combo, true, true);
ISWTObservableValue comboValue = WidgetProperties.selection().observe(combo);
Forms.bindBeanProperty(bindingContext, mmng, expression, "language", isMandatory(expression, "language"), languageLabel, comboValue, combo);
String language = expression.getLanguage();
if (language == null) {
language = CamelModelHelper.getDefaultLanguageName();
expression.setLanguage(language);
}
// now lets forward property events to the node
expression.addPropertyChangeListener(new PropertyChangeListener() {
/*
* (non-Javadoc)
*
* @see
* java.beans.PropertyChangeListener#propertyChange(java