Source:
public DefaultWidgetDescription create(EClass domainClass, EStructuralFeature eStructuralFeature) { TextDescription description = PropertiesFactory.eINSTANCE.createTextDescription(); description.setName(MessageFormat.format(Messages.DefaultMonolineTextDescriptionFactory_name, domainClass.getEPackage().getName(), domainClass.getName(), eStructuralFeature.getName())); description.setIsEnabledExpression("aql:self.eClass().getEStructuralFeature('" + eStructuralFeature.getName() + "').changeable"); description.setHelpExpression("aql:input.emfEditServices(self).getDescription(self.eClass().getEStructuralFeature('" + eStructuralFeature.getName() + "')"); description.setLabelExpression("aql:input.emfEditServices(self).getText(self.eClass().getEStructuralFeature('" + eStructuralFeature.getName() + "') + ':'"); description.setValueExpression("aql:self." + eStructuralFeature.getName()); InitialOperation initialOperation = ToolFactory.eINSTANCE.createInitialOperation(); SetValue setValue = ToolFactory.eINSTANCE.createSetValue(); setValue.setFeatureName(eStructuralFeature.getName()); setValue.setValueExpression("var:newValue"); initialOperation.setFirstModelOperations(setValue); description.setInitialOperation(initialOperation); if (eStructuralFeature.getLowerBound() == 1) { TextWidgetConditionalStyle conditionalStyle = PropertiesFactory.eINSTANCE.createTextWidgetConditionalStyle(); conditionalStyle.setPreconditionExpression("aql:self.eClass().getEStructuralFeature('" + eStructuralFeature.getName() + "').lowerBound = 1"); TextWidgetStyle widgetStyle = PropertiesFactory.eINSTANCE.createTextWidgetStyle(); widgetStyle.getLabelFontFormat().add(FontFormat.BOLD_LITERAL); conditionalStyle.setStyle(widgetStyle); description.getConditionalStyles().add(conditionalStyle); } String label = MessageFormat.format(Messages.DefaultMonolineTextDescriptionFactory_widgetLabel, eStructuralFeature.eClass().getName(), eStructuralFeature.getName()); return new DefaultWidgetDescription(label, description); }

Target:
public DefaultWidgetDescription create(EClass domainClass, EStructuralFeature eStructuralFeature) { TextDescription description = PropertiesFactory.eINSTANCE.createTextDescription(); description.setName(MessageFormat.format(Messages.DefaultMonolineTextDescriptionFactory_name, domainClass.getEPackage().getName(), domainClass.getName(), eStructuralFeature.getName())); description.setIsEnabledExpression("aql:self.eClass().getEStructuralFeature('" + eStructuralFeature.getName() + "').changeable"); description.setHelpExpression("aql:input.emfEditServices(self).getDescription(self.eClass().getEStructuralFeature('" + eStructuralFeature.getName() + "'))"); description.setLabelExpression("aql:input.emfEditServices(self).getText(self.eClass().getEStructuralFeature('" + eStructuralFeature.getName() + "')) + ':'"); description.setValueExpression("aql:self." + eStructuralFeature.getName()); InitialOperation initialOperation = ToolFactory.eINSTANCE.createInitialOperation(); SetValue setValue = ToolFactory.eINSTANCE.createSetValue(); setValue.setFeatureName(eStructuralFeature.getName()); setValue.setValueExpression("var:newValue"); initialOperation.setFirstModelOperations(setValue); description.setInitialOperation(initialOperation); if (eStructuralFeature.getLowerBound() == 1) { TextWidgetConditionalStyle conditionalStyle = PropertiesFactory.eINSTANCE.createTextWidgetConditionalStyle(); conditionalStyle.setPreconditionExpression("aql:self.eClass().getEStructuralFeature('" + eStructuralFeature.getName() + "').lowerBound = 1"); TextWidgetStyle widgetStyle = PropertiesFactory.eINSTANCE.createTextWidgetStyle(); widgetStyle.getLabelFontFormat().add(FontFormat.BOLD_LITERAL); conditionalStyle.setStyle(widgetStyle); description.getConditionalStyles().add(conditionalStyle); } String label = MessageFormat.format(Messages.DefaultMonolineTextDescriptionFactory_widgetLabel, eStructuralFeature.eClass().getName(), eStructuralFeature.getName()); return new DefaultWidgetDescription(label, description); }