diff --git a/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs b/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs index 941f2728c..b0ea7e1bd 100644 --- a/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs +++ b/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; +using System.Reactive; using System.Reflection; using System.Text; using Artemis.Core; @@ -33,12 +34,20 @@ public abstract class DataModelVisualizationViewModel : ReactiveObject, IDisposa DataModelPath = dataModelPath; IsMatchingFilteredTypes = true; + CopyPath = ReactiveCommand.CreateFromTask(async () => + { + if (Avalonia.Application.Current?.Clipboard != null && Path != null) + await Avalonia.Application.Current.Clipboard.SetTextAsync(Path); + }); + if (parent == null) IsRootViewModel = true; else PropertyDescription = DataModelPath?.GetPropertyDescription() ?? DataModel?.DataModelDescription; } + public ReactiveCommand CopyPath { get; } + /// /// Gets a boolean indicating whether this view model is at the root of the data model /// diff --git a/src/Artemis.UI/Screens/Debugger/Tabs/DataModel/DataModelDebugView.axaml b/src/Artemis.UI/Screens/Debugger/Tabs/DataModel/DataModelDebugView.axaml index 772ffadee..af2ac0660 100644 --- a/src/Artemis.UI/Screens/Debugger/Tabs/DataModel/DataModelDebugView.axaml +++ b/src/Artemis.UI/Screens/Debugger/Tabs/DataModel/DataModelDebugView.axaml @@ -4,6 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:dataModel="clr-namespace:Artemis.UI.Shared.DataModelVisualization.Shared;assembly=Artemis.UI.Shared" xmlns:converters="clr-namespace:Artemis.UI.Shared.Converters;assembly=Artemis.UI.Shared" + xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="Artemis.UI.Screens.Debugger.DataModel.DataModelDebugView"> @@ -24,6 +25,17 @@ @@ -59,7 +71,6 @@ - [