this.userObject = node.getUserObject();
this.tree = tree;
this.editorComponent = null;
if (userObject instanceof ValueGem) {
ValueGem valueGem = (ValueGem)userObject;
Gem connectedGem = valueGem.getOutputPart().getConnectedGem();
int connectedInputNum = valueGem.isConnected() ? valueGem.getOutputPart().getConnection().getDestination().getInputNum() : -1;
QualifiedName entityName = null;
if (connectedGem instanceof FunctionalAgentGem) {
entityName = ((FunctionalAgentGem)connectedGem).getName();
}
ValueEditorDirector ved = tableTopExplorer.getValueEditorDirector();
ValueEditor valueEditor = ved.getRootValueEditor(
tableTopExplorer.getValueEditorHierarchyManager(),
valueGem.getValueNode(),
entityName,
connectedInputNum,
connectedGem == null ? null : tableTopExplorer.getMetadataRunner(connectedGem));
setupEditorComponentForValueGem(valueEditor, valueGem);
setupValueEditor(node, valueEditor);