private void generateSource() {
String gemName = ((JTextField)gemNameField.getEditor().getEditorComponent()).getText();
String genComment = GeneratorMessages.getString("ETGF_CALDeclComment") + gemName + "\n";
StringBuilder source = new StringBuilder(genComment);
Scope visibility = (publicButton.getModel().isSelected()) ? Scope.PUBLIC : Scope.PRIVATE;
boolean eqInstanceOnly = (derivedInstancesField.getSelectedItem() == DerivedInstancesOption.EQ_ONLY_DERIVED_INSTANCES_OPTION);
DefaultListModel enumListModel = ((DefaultListModel)enumListControl.getModel());
String[] enumValues = new String[enumListModel.getSize()];
for (int i = 0, n = enumListModel.getSize(); i < n; i++) {