ShowVisualBasicInteractiveCommandLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(ShowVisualBasicInteractiveRoutedCommand, (s, e) => mainToolWindowManager.Show(VisualBasicToolWindowContent.THE_GUID), (s, e) => e.CanExecute = true); cmds.Add(ShowVisualBasicInteractiveRoutedCommand, ModifierKeys.Control | ModifierKeys.Alt, Key.I); }
public void OnNewArgs(IAppCommandLineArgs args) { bool show = false; var loc = GetSearchLocation(args.SearchIn); var typ = GetSearchType(args.SearchFor); if (loc != null) { show = true; searchManager.Value.SearchLocation = loc.Value; } if (typ != null) { show = true; searchManager.Value.SearchType = typ.Value; } if (args.SearchText != null) { show = true; searchManager.Value.SearchText = args.SearchText; } if (show) { mainToolWindowManager.Show(SearchToolWindowContent.THE_GUID); } }
void TheDebugger_OnProcessStateChanged(object sender, DebuggerEventArgs e) { if (debuggerSettings.AutoOpenLocalsWindow && theDebugger.ProcessState == DebuggerProcessState.Starting) { mainToolWindowManager.Show(LocalsToolWindowContent.THE_GUID); } }
ToolWindowLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(ControlConstants.GUID_MAINWINDOW); cmds.Add(OpenToolWindow, new RelayCommand(a => mainToolWindowManager.Show(ToolWindowContent.THE_GUID))); cmds.Add(OpenToolWindow, ModifierKeys.Control | ModifierKeys.Alt, Key.Z); }
CallStackCommandLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(DebugRoutedCommands.ShowExceptions, new RelayCommand(a => mainToolWindowManager.Show(ExceptionsToolWindowContent.THE_GUID))); cmds.Add(DebugRoutedCommands.ShowExceptions, ModifierKeys.Control | ModifierKeys.Alt, Key.E); }
ShowFileTreeViewCommandLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { wpfCommandManager.GetCommands(ControlConstants.GUID_MAINWINDOW).Add( ShowFileTreeViewRoutedCommand, (s, e) => mainToolWindowManager.Show(FileTreeViewWindowContent.THE_GUID), (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Alt, Key.L); }
ShowOutputWindowCommandLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(ControlConstants.GUID_MAINWINDOW); cmds.Add(ShowOutputWindowRoutedCommand, (s, e) => mainToolWindowManager.Show(OutputToolWindowContent.THE_GUID), (s, e) => e.CanExecute = true); cmds.Add(ShowOutputWindowRoutedCommand, ModifierKeys.Alt, Key.D2); }
ShowCSharpInteractiveCommandLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(ShowCSharpInteractiveRoutedCommand, (s, e) => mainToolWindowManager.Show(CSharpToolWindowContent.THE_GUID), (s, e) => e.CanExecute = true); cmds.Add(ShowCSharpInteractiveRoutedCommand, ModifierKeys.Control | ModifierKeys.Alt, Key.N); }
public static void Analyze(IMainToolWindowManager mainToolWindowManager, Lazy <IAnalyzerManager> analyzerManager, ILanguage language, IMemberRef member) { var memberDef = ResolveReference(member); var type = memberDef as TypeDef; if (type != null) { mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID); analyzerManager.Value.Add(new TypeNode(type)); } var field = memberDef as FieldDef; if (field != null) { mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID); analyzerManager.Value.Add(new FieldNode(field)); } var method = memberDef as MethodDef; if (method != null) { mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID); analyzerManager.Value.Add(new MethodNode(method)); } var propertyAnalyzer = PropertyNode.TryCreateAnalyzer(member, language); if (propertyAnalyzer != null) { mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID); analyzerManager.Value.Add(propertyAnalyzer); } var eventAnalyzer = EventNode.TryCreateAnalyzer(member, language); if (eventAnalyzer != null) { mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID); analyzerManager.Value.Add(eventAnalyzer); } }
MemoryContentCommandLoader(IWpfCommandManager wpfCommandManager, MemoryToolWindowContentCreator memoryToolWindowContentCreator, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); for (int i = 0; i < DebugRoutedCommands.ShowMemoryCommands.Length; i++) { var info = memoryToolWindowContentCreator.Contents[i]; cmds.Add(DebugRoutedCommands.ShowMemoryCommands[i], new RelayCommand(a => mainToolWindowManager.Show(info.Guid))); } for (int i = 0; i < DebugRoutedCommands.ShowMemoryCommands.Length && i < 10; i++) { var cmd = DebugRoutedCommands.ShowMemoryCommands[i]; if (i == 0) cmds.Add(cmd, ModifierKeys.Alt, Key.D6); cmds.Add(cmd, ModifierKeys.Control | ModifierKeys.Alt, Key.D0 + (i + 1) % 10); } }
BreakpointsCommandLoader(IWpfCommandManager wpfCommandManager, Lazy <BreakpointManager> breakpointManager, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(DebugRoutedCommands.DeleteAllBreakpoints, (s, e) => breakpointManager.Value.ClearAskUser(), (s, e) => e.CanExecute = breakpointManager.Value.CanClear, ModifierKeys.Control | ModifierKeys.Shift, Key.F9); cmds.Add(DebugRoutedCommands.ToggleBreakpoint, (s, e) => breakpointManager.Value.ToggleBreakpoint(), (s, e) => e.CanExecute = breakpointManager.Value.CanToggleBreakpoint, ModifierKeys.None, Key.F9); cmds.Add(DebugRoutedCommands.DisableBreakpoint, (s, e) => breakpointManager.Value.DisableBreakpoint(), (s, e) => e.CanExecute = breakpointManager.Value.CanDisableBreakpoint, ModifierKeys.Control, Key.F9); cmds.Add(DebugRoutedCommands.DisableAllBreakpoints, (s, e) => breakpointManager.Value.DisableAllBreakpoints(), (s, e) => e.CanExecute = breakpointManager.Value.CanDisableAllBreakpoints); cmds.Add(DebugRoutedCommands.EnableAllBreakpoints, (s, e) => breakpointManager.Value.EnableAllBreakpoints(), (s, e) => e.CanExecute = breakpointManager.Value.CanEnableAllBreakpoints); cmds.Add(DebugRoutedCommands.ShowBreakpoints, new RelayCommand(a => mainToolWindowManager.Show(BreakpointsToolWindowContent.THE_GUID))); cmds.Add(DebugRoutedCommands.ShowBreakpoints, ModifierKeys.Control | ModifierKeys.Alt, Key.B); cmds.Add(DebugRoutedCommands.ShowBreakpoints, ModifierKeys.Alt, Key.F9); }
public void OnNewArgs(IAppCommandLineArgs args) { foreach (var info in GetToolWindowInfos(args.HideToolWindow)) { mainToolWindowManager.Close(info.Guid); } foreach (var info in GetToolWindowInfos(args.ShowToolWindow)) { var content = mainToolWindowManager.Show(info.Guid, info.Location); Debug.Assert(content != null); if (content == null) { continue; } if (info.Location == null) { continue; } if (mainToolWindowManager.CanMove(content, info.Location.Value)) { mainToolWindowManager.Move(content, info.Location.Value); } } }
MemoryContentCommandLoader(IWpfCommandManager wpfCommandManager, MemoryToolWindowContentProvider memoryToolWindowContentProvider, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); for (int i = 0; i < DebugRoutedCommands.ShowMemoryCommands.Length; i++) { var info = memoryToolWindowContentProvider.Contents[i]; cmds.Add(DebugRoutedCommands.ShowMemoryCommands[i], new RelayCommand(a => mainToolWindowManager.Show(info.Guid))); } for (int i = 0; i < DebugRoutedCommands.ShowMemoryCommands.Length && i < 10; i++) { var cmd = DebugRoutedCommands.ShowMemoryCommands[i]; if (i == 0) { cmds.Add(cmd, ModifierKeys.Alt, Key.D6); } cmds.Add(cmd, ModifierKeys.Control | ModifierKeys.Shift, Key.D0 + (i + 1) % 10); } }
void Search(object sender, ExecutedRoutedEventArgs e) => mainToolWindowManager.Show(SearchToolWindowContent.THE_GUID);
public static void Analyze(IMainToolWindowManager mainToolWindowManager, Lazy<IAnalyzerManager> analyzerManager, ILanguage language, IMemberRef member) { var memberDef = ResolveReference(member); var type = memberDef as TypeDef; if (type != null) { mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID); analyzerManager.Value.Add(new TypeNode(type)); } var field = memberDef as FieldDef; if (field != null) { mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID); analyzerManager.Value.Add(new FieldNode(field)); } var method = memberDef as MethodDef; if (method != null) { mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID); analyzerManager.Value.Add(new MethodNode(method)); } var propertyAnalyzer = PropertyNode.TryCreateAnalyzer(member, language); if (propertyAnalyzer != null) { mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID); analyzerManager.Value.Add(propertyAnalyzer); } var eventAnalyzer = EventNode.TryCreateAnalyzer(member, language); if (eventAnalyzer != null) { mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID); analyzerManager.Value.Add(eventAnalyzer); } }
void ShowAnalyzerExecuted(object sender, ExecutedRoutedEventArgs e) => mainToolWindowManager.Show(AnalyzerToolWindowContent.THE_GUID);
ShowFileTreeViewCommandLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW).Add( ShowFileTreeViewRoutedCommand, (s, e) => mainToolWindowManager.Show(FileTreeViewWindowContent.THE_GUID), (s, e) => e.CanExecute = true, ModifierKeys.Control | ModifierKeys.Alt, Key.L); }
ToolWindowLoader(IWpfCommandManager wpfCommandManager, IMainToolWindowManager mainToolWindowManager) { var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_MAINWINDOW); cmds.Add(OpenToolWindow, new RelayCommand(a => mainToolWindowManager.Show(ToolWindowContent.THE_GUID))); cmds.Add(OpenToolWindow, ModifierKeys.Control | ModifierKeys.Alt, Key.Z); }
void ShowInMemoryWindow(MemoryToolWindowContent mc, ulong addr, ulong size) { MakeSureAddressCanBeShown(mc, addr, size); mainToolWindowManager.Show(mc); mc.DnHexBox.SelectAndMoveCaret(addr, size); }