void OpenInNotepad() { NotepadPlusPlus.Get().MatchSome(npp => { npp.Open(Path); }); }
internal static void Open(TextLocation location) { NotepadPlusPlus.Get().Match( _ => _.Open(location), () => Process.Start("notepad.exe", location.FileName.Quote()) ); }
internal static void Open(LPath textFile) { NotepadPlusPlus.Get().Match( _ => _.Open(textFile), () => Process.Start("notepad.exe", textFile) ); }
IResult ToResult(string file) { return(new SimpleAction(file, new[] { file.RelativeTo(this.directory) }.Join(" "), () => { NotepadPlusPlus.Get().Open(file); }).ToResult()); }
IResult ToResult(string file, string text, IEnumerable <Match> m) { return(new SimpleAction(file, new[] { file.RelativeTo(this.directory) }.Concat(TextContext(text, m)).Join(" "), () => { NotepadPlusPlus.Get().Open(file); }).ToResult()); }
public void Execute() { NotepadPlusPlus.Get().ValueOr(() => null).Open(TextLocation); }