static bool TextEditor_IsVisible(TextViewContext context) { ModuleDef module; return(context.TextView != null && (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()); } }