Beispiel #1
0
        protected override void OnBeforeQueryStatus(object sender, EventArgs e)
        {
            if (sender is OleMenuCommand menuItem)
            {
                menuItem.Visible = false;

                var selectedItem = owner.DTE.SelectedItems.Item(1);
                menuItem.Visible = (ProjectItemForILSpy.Detect(owner, selectedItem) != null);
            }
        }
Beispiel #2
0
        protected override void OnExecute(object sender, EventArgs e)
        {
            if (owner.DTE.SelectedItems.Count != 1)
            {
                return;
            }
            var projectItemWrapper = ProjectItemForILSpy.Detect(owner, owner.DTE.SelectedItems.Item(1));

            if (projectItemWrapper != null)
            {
                OpenAssembliesInILSpy(projectItemWrapper.GetILSpyParameters(owner));
            }
        }