From 74f4fdba69d830a7754c1a42949d950a8217affd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ku=C4=8Dera?= Date: Sat, 11 Oct 2025 10:14:55 +0100 Subject: [PATCH] fixing whitespace --- ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs | 3 +-- ILSpy/AssemblyTree/AssemblyTreeModel.cs | 14 +++++++------- ILSpy/Controls/MainToolBar.xaml.cs | 4 ++-- ILSpy/Metadata/MetadataTreeNode.cs | 2 +- ILSpy/NavigationState.cs | 6 ++---- ILSpy/TreeNodes/FieldTreeNode.cs | 2 +- ILSpy/TreeNodes/ReferenceFolderTreeNode.cs | 2 +- 7 files changed, 15 insertions(+), 18 deletions(-) diff --git a/ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs b/ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs index 7a735070c..412d4f522 100644 --- a/ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs +++ b/ICSharpCode.ILSpyX/TreeView/SharpTreeNode.cs @@ -126,8 +126,7 @@ namespace ICSharpCode.ILSpyX.TreeView get { return null; } } - public virtual object? NavigationText - { + public virtual object? NavigationText { get { return Text; } } diff --git a/ILSpy/AssemblyTree/AssemblyTreeModel.cs b/ILSpy/AssemblyTree/AssemblyTreeModel.cs index 8a0a390ed..d34d6a991 100644 --- a/ILSpy/AssemblyTree/AssemblyTreeModel.cs +++ b/ILSpy/AssemblyTree/AssemblyTreeModel.cs @@ -857,10 +857,10 @@ namespace ICSharpCode.ILSpy.AssemblyTree { try { - TabPageModel tabPage = DockWorkspace.ActiveTabPage; - var currentState = tabPage.GetState(); - if (currentState != null) - history.UpdateCurrent(new NavigationState(tabPage, currentState)); + TabPageModel tabPage = DockWorkspace.ActiveTabPage; + var currentState = tabPage.GetState(); + if (currentState != null) + history.UpdateCurrent(new NavigationState(tabPage, currentState)); NavigationState newState; do @@ -868,8 +868,8 @@ namespace ICSharpCode.ILSpy.AssemblyTree newState = forward ? history.GoForward() : history.GoBack(); } while (newState != null && toState != null && toState != newState); - if (newState == null) - return; + if (newState == null) + return; navigatingToState = newState; @@ -893,7 +893,7 @@ namespace ICSharpCode.ILSpy.AssemblyTree } } - public NavigationState[] GetNavigateHistory(bool forward) => forward ? history.ForwardList : history.BackList; + public NavigationState[] GetNavigateHistory(bool forward) => forward ? history.ForwardList : history.BackList; public bool CanNavigateBack => history.CanNavigateBack; diff --git a/ILSpy/Controls/MainToolBar.xaml.cs b/ILSpy/Controls/MainToolBar.xaml.cs index 52f66a0df..877796e96 100644 --- a/ILSpy/Controls/MainToolBar.xaml.cs +++ b/ILSpy/Controls/MainToolBar.xaml.cs @@ -117,7 +117,7 @@ namespace ICSharpCode.ILSpy.Controls var dropDownPanel = new StackPanel { Orientation = Orientation.Horizontal }; - var contextMenu = new ContextMenu { + var contextMenu = new ContextMenu { PlacementTarget = dropDownPanel, Tag = command }; @@ -144,7 +144,7 @@ namespace ICSharpCode.ILSpy.Controls BindingOperations.SetBinding(dropDownToggle, ToggleButton.IsCheckedProperty, new Binding(nameof(contextMenu.IsOpen)) { Source = contextMenu }); - BindingOperations.SetBinding(dropDownToggle, IsEnabledProperty, + BindingOperations.SetBinding(dropDownToggle, IsEnabledProperty, new Binding(nameof(IsEnabled)) { Source = toolbarItem }); dropDownPanel.Children.Add(toolbarItem); diff --git a/ILSpy/Metadata/MetadataTreeNode.cs b/ILSpy/Metadata/MetadataTreeNode.cs index ac386c943..a56856254 100644 --- a/ILSpy/Metadata/MetadataTreeNode.cs +++ b/ILSpy/Metadata/MetadataTreeNode.cs @@ -46,7 +46,7 @@ namespace ICSharpCode.ILSpy.Metadata public override object Text => title; public override object NavigationText => metadataFile.Name + " " + Text; - + public override object Icon => Images.Metadata; public override bool View(TabPageModel tabPage) diff --git a/ILSpy/NavigationState.cs b/ILSpy/NavigationState.cs index dbd5545e2..7e7151fa0 100644 --- a/ILSpy/NavigationState.cs +++ b/ILSpy/NavigationState.cs @@ -64,10 +64,8 @@ namespace ICSharpCode.ILSpy return this.ViewState.Equals(other.ViewState); } - public object NavigationText - { - get - { + public object NavigationText { + get { if (this.treeNodes.Count == 1) return this.treeNodes.First(); diff --git a/ILSpy/TreeNodes/FieldTreeNode.cs b/ILSpy/TreeNodes/FieldTreeNode.cs index 1cf4b17b2..5bf508aaf 100644 --- a/ILSpy/TreeNodes/FieldTreeNode.cs +++ b/ILSpy/TreeNodes/FieldTreeNode.cs @@ -41,7 +41,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Text => GetText(GetFieldDefinition(), Language) + GetSuffixString(FieldDefinition); - public override object NavigationText => GetText(GetFieldDefinition(), Language, includeDeclaringTypeName: true); + public override object NavigationText => GetText(GetFieldDefinition(), Language, includeDeclaringTypeName: true); private IField GetFieldDefinition() { diff --git a/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs b/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs index 2503c6ad3..b449801a6 100644 --- a/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs +++ b/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs @@ -45,7 +45,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Text => Resources.References; public override object NavigationText => module.Name + " " + Text; - + public override object Icon => Images.ReferenceFolder; protected override void LoadChildren()