static bool TextEditor_IsVisible(TextViewContext context)
        {
            ModuleDef module;

            return(context.TextView != null &&
                   (module = GoToEntryPointCommand.GetModule()) != null &&
                   module.GlobalType != null &&
                   module.GlobalType.FindStaticConstructor() != null);
        }
Exemple #2
0
        static bool TextEditor_IsVisible(ContextMenuEntryContext context)
        {
            ModuleDef module;

            return(context.Element is DecompilerTextView &&
                   (module = GoToEntryPointCommand.GetModule()) != null &&
                   module.GlobalType != null &&
                   module.GlobalType.FindStaticConstructor() != null);
        }
 public void Execute(TextViewContext context)
 {
     if (TreeView_IsVisible(context))
     {
         MainWindow.Instance.JumpToReference(ILSpyTreeNode.GetModule(context.SelectedTreeNodes).GlobalType.FindStaticConstructor());
     }
     else if (TextEditor_IsVisible(context))
     {
         MainWindow.Instance.JumpToReference(GoToEntryPointCommand.GetModule().GlobalType.FindStaticConstructor());
     }
 }