-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CM-39043 - Add back to home, expand all, and collapse all toolbar act…
…ions (#22)
- Loading branch information
Showing
22 changed files
with
195 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/extension/Cycode.VisualStudio.Extension.14.0-16.0/source.extension.vsixmanifest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/extension/Cycode.VisualStudio.Extension.17.0/source.extension.vsixmanifest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/extension/Cycode.VisualStudio.Extension.Shared/Commands/BackToHomeScreenCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Cycode.VisualStudio.Extension.Shared.DTO; | ||
using Cycode.VisualStudio.Extension.Shared.Services; | ||
|
||
namespace Cycode.VisualStudio.Extension.Shared; | ||
|
||
[Command(PackageIds.BackToHomeScreenCommand)] | ||
internal sealed class BackToHomeScreenCommand : BaseCommand<BackToHomeScreenCommand> { | ||
protected override void Execute(object sender, EventArgs e) { | ||
IToolWindowMessengerService toolWindowMessengerService = | ||
ServiceLocator.GetService<IToolWindowMessengerService>(); | ||
toolWindowMessengerService.Send(new MessageEventArgs(MessengerCommand.BackToHomeScreen)); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/extension/Cycode.VisualStudio.Extension.Shared/Commands/TreeViewCollapseAllCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Cycode.VisualStudio.Extension.Shared.DTO; | ||
using Cycode.VisualStudio.Extension.Shared.Services; | ||
|
||
namespace Cycode.VisualStudio.Extension.Shared; | ||
|
||
[Command(PackageIds.TreeViewCollapseAllCommand)] | ||
internal sealed class TreeViewCollapseAllCommand : BaseCommand<TreeViewCollapseAllCommand> { | ||
protected override void Execute(object sender, EventArgs e) { | ||
IToolWindowMessengerService toolWindowMessengerService = | ||
ServiceLocator.GetService<IToolWindowMessengerService>(); | ||
toolWindowMessengerService.Send(new MessageEventArgs(MessengerCommand.TreeViewCollapseAll)); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/extension/Cycode.VisualStudio.Extension.Shared/Commands/TreeViewExpandAllCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Cycode.VisualStudio.Extension.Shared.DTO; | ||
using Cycode.VisualStudio.Extension.Shared.Services; | ||
|
||
namespace Cycode.VisualStudio.Extension.Shared; | ||
|
||
[Command(PackageIds.TreeViewExpandAllCommand)] | ||
internal sealed class TreeViewExpandAllCommand : BaseCommand<TreeViewExpandAllCommand> { | ||
protected override void Execute(object sender, EventArgs e) { | ||
IToolWindowMessengerService toolWindowMessengerService = | ||
ServiceLocator.GetService<IToolWindowMessengerService>(); | ||
toolWindowMessengerService.Send(new MessageEventArgs(MessengerCommand.TreeViewExpandAll)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 10 additions & 1 deletion
11
src/extension/Cycode.VisualStudio.Extension.Shared/Components/TreeView/Nodes/BaseNode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
using System.Collections.ObjectModel; | ||
using System.Windows; | ||
|
||
namespace Cycode.VisualStudio.Extension.Shared.Components.TreeView.Nodes; | ||
|
||
public class BaseNode { | ||
public class BaseNode : DependencyObject { | ||
public string Title { get; set; } | ||
public string Summary { get; set; } | ||
public string Icon { get; set; } | ||
public ObservableCollection<BaseNode> Items { get; set; } = []; | ||
|
||
public static readonly DependencyProperty IsExpandedProperty = DependencyProperty.Register( | ||
nameof(IsExpanded), typeof(bool), typeof(BaseNode), new PropertyMetadata(false)); | ||
|
||
public bool IsExpanded { | ||
get { return (bool)GetValue(IsExpandedProperty); } | ||
set { SetValue(IsExpandedProperty, value); } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+246 Bytes
...on/Cycode.VisualStudio.Extension.Shared/Resources/KnownMonikers/CollapseAll.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+263 Bytes
...sion/Cycode.VisualStudio.Extension.Shared/Resources/KnownMonikers/ExpandAll.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+212 Bytes
...nsion/Cycode.VisualStudio.Extension.Shared/Resources/KnownMonikers/Previous.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.