Skip to content

Commit

Permalink
Added option to copy code instance name
Browse files Browse the repository at this point in the history
fixes #1385
  • Loading branch information
vchelaru committed Apr 2, 2024
1 parent 6c076e6 commit a9d6f90
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions FRBDK/Glue/Glue/FormHelpers/RightClickHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,8 @@ private static void PopulateRightClickMenuItemsShared(ITreeNode targetNode, Menu
Add(L.Texts.FolderAdd, () => RightClickHelper.AddFolderClick(targetNode), image: FolderImage);
AddSeparator();
Add(L.Texts.ViewInExplorer, () => RightClickHelper.ViewInExplorerClick(targetNode));
AddEvent(L.Texts.CopyPathClipboard, (_, _) => HandleCopyToClipboardClick(targetNode));
Add(L.Texts.CopyPathClipboard, () => HandleCopyToClipboardClick(targetNode));

AddSeparator();
if (targetNode.IsFolderInFilesContainerNode())
{
Expand Down Expand Up @@ -833,11 +834,18 @@ private static void PopulateRightClickMenuItemsShared(ITreeNode targetNode, Menu
Add(L.Texts.ViewInExplorer, () => RightClickHelper.ViewInExplorerClick(targetNode));
Add(L.Texts.Open, () => HandleOpen(targetNode));
AddItem(mFindAllReferences);
AddEvent(L.Texts.CopyPathClipboard, (_,_) => HandleCopyToClipboardClick(targetNode));
Add(L.Texts.CopyPathClipboard, () => HandleCopyToClipboardClick(targetNode));
var rfs = targetNode.Tag as ReferencedFileSave;
var name = rfs.GetInstanceName();
Add($"Copy Code Instance Name ({name})", () =>
{
Clipboard.SetText(name);


});
AddSeparator();

AddItem(mCreateZipPackage);
var rfs = (ReferencedFileSave)targetNode.Tag;

AddSeparator();

Expand Down Expand Up @@ -917,7 +925,7 @@ private static void PopulateRightClickMenuItemsShared(ITreeNode targetNode, Menu
{
Add("View code folder", () => ViewCodeFolderInExplorerClick(targetNode));
}
AddEvent(L.Texts.CopyPathClipboard, (_, _) => HandleCopyToClipboardClick(targetNode));
Add(L.Texts.CopyPathClipboard, () => HandleCopyToClipboardClick(targetNode));

AddSeparator();

Expand Down

0 comments on commit a9d6f90

Please sign in to comment.