* @see org.openquark.gems.client.valueentry.ValueEditor#setInitialValue()
*/
@Override
public void setInitialValue() {
DataConstructorValueNode valueNode = getDataConstructorValueNode();
TypeExpr valueNodeTypeExpr = valueNode.getTypeExpr();
QualifiedName typeConstructorName = valueNode.getTypeExpr().rootTypeConsApp().getName();
DataConstructor[] dataConsList = valueEditorManager.getPerspective().getDataConstructorsForType(typeConstructorName);
DataConstructor currentDataCons = valueNode.getDataConstructor();
ValueEditorListener childListener = new ChildValueEditorListener();
KeyAdapter editorPanelKeyListener = new EditorPanelKeyListener();
boolean haveAddedPanel = false;
FontMetrics fontMetrics = getFontMetrics(getFont().deriveFont(Font.BOLD));
ScopedEntityNamingPolicy namingPolicy = new UnqualifiedUnlessAmbiguous(valueEditorManager.getPerspective().getWorkingModuleTypeInfo());
// Remove components in case this is called twice.
contentPanel.removeAll();
// Create an editor panel for each supported data constructor.
for (final DataConstructor dataCons : dataConsList) {
DataConstructorValueNode newValueNode = null;
if (currentDataCons.getName().equals(dataCons.getName())) {
// If this is the current data constructor, just transmute the value node.
newValueNode = (DataConstructorValueNode) valueNode.transmuteValueNode(valueEditorManager.getValueNodeBuilderHelper(),