* @param name Base name of converter from which converter-id and
* converter-class are formed.
* @return {@link ConverterType} instance.
*/
protected ConverterType createConverter(String name) {
ConverterType converterType = FacesConfigFactory.eINSTANCE.createConverterType();
//set converter-id
ConverterIdType converterIdType = FacesConfigFactory.eINSTANCE.createConverterIdType();
StringBuffer sb = new StringBuffer();
sb.append("javax.faces."); //$NON-NLS-1$
sb.append(name);
converterIdType.setTextContent(sb.toString());
converterType.setConverterId(converterIdType);
//set converter-class
ConverterClassType converterClassType = FacesConfigFactory.eINSTANCE.createConverterClassType();
sb = new StringBuffer();
sb.append("javax.faces.convert."); //$NON-NLS-1$
sb.append(name);
sb.append("Converter"); //$NON-NLS-1$
converterClassType.setTextContent(sb.toString());
converterType.setConverterClass(converterClassType);
return converterType;
}