public void RunConflictingKeyBindingStateCheck(IEnumerable <KeyInput> neededInputs, Action <ConflictingKeyBindingState, CommandKeyBindingSnapshot> onComplete) { if (_snapshot != null) { onComplete(_state, _snapshot); return; } var util = new KeyBindingUtil(_dte); var set = new HashSet <KeyInput>(neededInputs); _snapshot = util.CreateCommandKeyBindingSnapshot(set); ConflictingKeyBindingState = _snapshot.Conflicting.Any() ? ConflictingKeyBindingState.FoundConflicts : ConflictingKeyBindingState.ConflictsIgnoredOrResolved; }
public void ShowDialog(IVimBuffer buffer) { try { var util = new KeyBindingUtil(_dte); var snapshot = util.CreateCommandKeyBindingSnapshot(buffer); new UI.ConflictingKeyBindingDialog(snapshot).ShowDialog(); } catch (Exception) { // When dogfooding VsVim there is a bug in Visual Studio which causes the // VsVim DLL to be loaded twice (once for VsVim and once for the Settings // and associated designers). This causes WPF to error when loading the dialog // resources and an unhandled exception occurs. VsShellUtilities.ShowMessageBox( _serviceProvider, "Error displaying options page", "Error", OLEMSGICON.OLEMSGICON_WARNING, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST); } }
public void ShowDialog(IVimBuffer buffer) { try { var util = new KeyBindingUtil(_dte); var snapshot = util.CreateCommandKeyBindingSnapshot(buffer); new UI.ConflictingKeyBindingDialog(snapshot).ShowDialog(); } catch (Exception) { // When dogfooding VsVim there is a bug in Visual Studio which causes the // VsVim DLL to be loaded twice (once for VsVim and once for the Settings // and associated designers). This causes WPF to error when loading the dialog // resources and an unhandled exception occurs. VsShellUtilities.ShowMessageBox( _serviceProvider, "Error displaying options page", "Error", OLEMSGICON.OLEMSGICON_WARNING, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST); } }
internal void RunConflictingKeyBindingStateCheck(IEnumerable<KeyInput> neededInputs, Action<ConflictingKeyBindingState, CommandKeyBindingSnapshot> onComplete) { if (_snapshot != null) { onComplete(_state, _snapshot); return; } var util = new KeyBindingUtil(_dte, GetOrCreateImportantScopeSet()); var set = new HashSet<KeyInput>(neededInputs); _snapshot = util.CreateCommandKeyBindingSnapshot(set); ConflictingKeyBindingState = _snapshot.Conflicting.Any() ? ConflictingKeyBindingState.FoundConflicts : ConflictingKeyBindingState.ConflictsIgnoredOrResolved; }
internal CommandKeyBindingSnapshot CreateCommandKeyBindingSnapshot(IVimBuffer vimBuffer) { var util = new KeyBindingUtil(_dte, GetOrCreateImportantScopeSet()); return util.CreateCommandKeyBindingSnapshot(vimBuffer); }
public void RunConflictingKeyBindingStateCheck(IEnumerable<KeyInput> neededInputs, Action<ConflictingKeyBindingState, CommandKeyBindingSnapshot> onComplete) { if (_snapshot != null) { onComplete(_state, _snapshot); return; } var util = new KeyBindingUtil(_dte); var set = new HashSet<KeyInput>(neededInputs); _snapshot = util.CreateCommandKeyBindingSnapshot(set); if (_snapshot.Conflicting.Any()) { ConflictingKeyBindingState = ConflictingKeyBindingState.FoundConflicts; } else { ConflictingKeyBindingState = ConflictingKeyBindingState.ConflictsIgnoredOrResolved; } }
public void ShowDialog(IVimBuffer buffer) { var util = new KeyBindingUtil(_dte); var snapshot = util.CreateCommandKeyBindingSnapshot(buffer); UI.ConflictingKeyBindingDialog.DoShow(snapshot); }