Comment text doesn't update

Hello! I’m trying to create a plugin and recently I created comment, but the text doesn’t update in it. I didn’t find any documentation or my mistake.

USTRUCT()
struct FLogSystemComment_SchemaAction : public FEdGraphSchemaAction
{
	GENERATED_USTRUCT_BODY();

	FLogSystemComment_SchemaAction() : FEdGraphSchemaAction() {}

	FLogSystemComment_SchemaAction(FText InNodeCategory, FText InMenuDesc, FText InToolTip, int32 InGrouping)
		: FEdGraphSchemaAction(InNodeCategory, InMenuDesc, InToolTip, InGrouping) {}

	//~ Begin FEdGraphSchemaAction Interface
	UEdGraphNode* PerformAction(UEdGraph* ParentGraph, UEdGraphPin* FromPin, const FVector2D Location, bool bSelectNewNode = true) override;
	//~ End FEdGraphSchemaAction Interface
};


UEdGraphNode* FLogSystemComment_SchemaAction::PerformAction(UEdGraph* ParentGraph, UEdGraphPin* FromPin, const FVector2D Location, bool bSelectNewNode/= true/)
{
UEdGraphNode_Comment* const CommentTemplate = NewObject<UEdGraphNode_Comment>();
FVector2D SpawnLocation = Location;
FSlateRect Bounds;

	TSharedPtr<SGraphEditor> GraphEditorPtr = SGraphEditor::FindGraphEditorForGraph(ParentGraph);
	if (GraphEditorPtr.IsValid() && GraphEditorPtr->GetBoundsForSelectedNodes(/*out*/ Bounds, 50.0f))
	{
		CommentTemplate->SetBounds(Bounds);
		SpawnLocation.X = CommentTemplate->NodePosX;
		SpawnLocation.Y = CommentTemplate->NodePosY;
	}
	UEdGraphNode* const NewNode = FEdGraphSchemaAction_NewNode::SpawnNodeFromTemplate<UEdGraphNode_Comment>(ParentGraph, CommentTemplate, SpawnLocation, bSelectNewNode);
	return NewNode;
}

void ULogSystem_GraphSchema::GetGraphContextActions(FGraphContextMenuBuilder& ContextMenuBuilder) const
{
	ULogSystem_General* Graph = CastChecked<ULogSystem_General>(ContextMenuBuilder.CurrentGraph->GetOuter());
//	GetCommentAction(ContextMenuBuilder, ContextMenuBuilder.CurrentGraph);
	if (Graph->NodeType == nullptr)
	{
		return;
	}

	const bool bNoParent = (ContextMenuBuilder.FromPin == NULL);

	 FText MenuDescription = LOCTEXT("AddCommentAction", "Add Comment...");
	 FText ToolTip = LOCTEXT("CreateCommentToolTip", "Creates a comment.");
	constexpr int32 Grouping = 1;
	TSharedPtr<FLogSystemComment_SchemaAction> NewAction(new FLogSystemComment_SchemaAction(LOCTEXT("GraphAction", "Graph"), MenuDescription, ToolTip, Grouping));
	ContextMenuBuilder.AddAction(NewAction);
}

void FLogSystem_AssetEditor::CreateCommandList()
{
	if (GraphEditorCommands.IsValid())
	{
		return;
	}
	GraphEditorCommands = MakeShareable(new FUICommandList);
GraphEditorCommands->MapAction(FGraphEditorCommands::Get().CreateComment, FExecuteAction::CreateLambda([this]
	{	
		FLogSystemComment_SchemaAction CommentAction;
		TSharedPtr<SGraphEditor> CurrentGraphEditor = GetCurrGraphEditor();
		CommentAction.PerformAction(LogSystemAsset->EdGraph, nullptr, CurrentGraphEditor->GetPasteLocation());
	})
	);

Hey! It seems like you’re using Generic Graph, and I’ve been down this rabbit hole too.
F*** this was a difficult one. So, we’re missing a delegate call in CreateViewportWidget() method of FAssetEditor_GenericGraph.

The line you’re looking for is:

	SGraphEditor::FGraphEditorEvents InEvents;
	InEvents.OnSelectionChanged = SGraphEditor::FOnSelectionChanged::CreateSP(this, &FAssetEditor_KittenGraph::OnSelectedNodesChanged);
	InEvents.OnNodeDoubleClicked = FSingleNodeEvent::CreateSP(this, &FAssetEditor_KittenGraph::OnNodeDoubleClicked);
	InEvents.OnTextCommitted = FOnNodeTextCommitted::CreateSP(this, &FAssetEditor_KittenGraph::OnNodeTitleCommitted); // This line! <3

Which calls on this:

void FAssetEditor_GenericGraph::OnNodeTitleCommitted(const FText& NewText, ETextCommit::Type CommitInfo, UEdGraphNode* NodeBeingChanged)
{
	if (NodeBeingChanged)
	{
		NodeBeingChanged->Modify();
		NodeBeingChanged->OnRenameNode(NewText.ToString());
	}
}

And then calls OnRenameNode on the Node itself within the base EdGraphNode class.
Hope this helps! <3