| 569 | #endif |
| 570 | |
| 571 | void FFlowAssetEditor::OnLogTokenClicked(const TSharedRef<IMessageToken>& Token) const |
| 572 | { |
| 573 | if (Token->GetType() == EMessageToken::Object) |
| 574 | { |
| 575 | const TSharedRef<FUObjectToken> ObjectToken = StaticCastSharedRef<FUObjectToken>(Token); |
| 576 | if (const UObject* Object = ObjectToken->GetObject().Get()) |
| 577 | { |
| 578 | if (Object->IsAsset()) |
| 579 | { |
| 580 | GEditor->GetEditorSubsystem<UAssetEditorSubsystem>()->OpenEditorForAsset(const_cast<UObject*>(Object)); |
| 581 | } |
| 582 | else |
| 583 | { |
| 584 | UE_LOG(LogFlowEditor, Warning, TEXT("Unknown type of hyperlinked object (%s), cannot focus it"), *GetNameSafe(Object)); |
| 585 | } |
| 586 | } |
| 587 | } |
| 588 | else if (Token->GetType() == EMessageToken::EdGraph && GraphEditor.IsValid()) |
| 589 | { |
| 590 | const TSharedRef<FFlowGraphToken> EdGraphToken = StaticCastSharedRef<FFlowGraphToken>(Token); |
| 591 | |
| 592 | if (const UEdGraphPin* GraphPin = EdGraphToken->GetPin()) |
| 593 | { |
| 594 | if (!GraphPin->IsPendingKill()) |
| 595 | { |
| 596 | GraphEditor->JumpToPin(GraphPin); |
| 597 | } |
| 598 | } |
| 599 | else if (const UEdGraphNode* GraphNode = EdGraphToken->GetGraphNode()) |
| 600 | { |
| 601 | GraphEditor->JumpToNode(GraphNode, true); |
| 602 | } |
| 603 | } |
| 604 | } |
| 605 | |
| 606 | void FFlowAssetEditor::JumpToNode(const UEdGraphNode* Node) const |
| 607 | { |
nothing calls this directly
no test coverage detected