Пример #1
0
        static bool TextEditor_IsVisible(TextViewContext context)
        {
            ModuleDef module;

            return(context.TextView != null &&
                   (module = GoToEntryPointCommand.GetModule()) != null &&
                   module.GlobalType != null &&
                   module.GlobalType.FindStaticConstructor() != null);
        }
Пример #2
0
 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());
     }
 }