@@ -363,7 +363,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
363363
364364 const auto & entryVM = make<ProfileEntryViewModel>(profileEntry);
365365 CurrentView ().Append (entryVM);
366- _PrintAll ();
367366 return entryVM;
368367 }
369368 return nullptr ;
@@ -374,8 +373,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
374373 Model::SeparatorEntry separatorEntry;
375374 const auto & entryVM = make<SeparatorEntryViewModel>(separatorEntry);
376375 CurrentView ().Append (entryVM);
377-
378- _PrintAll ();
379376 return entryVM;
380377 }
381378
@@ -390,8 +387,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
390387 // Reset state after adding the entry
391388 AddFolderName ({});
392389 _folderTreeCache = nullptr ;
393-
394- _PrintAll ();
395390 return entryVM;
396391 }
397392
@@ -410,7 +405,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
410405 ProfileMatcherSource ({});
411406 ProfileMatcherCommandline ({});
412407
413- _PrintAll ();
414408 return entryVM;
415409 }
416410
@@ -422,7 +416,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
422416
423417 _NotifyChanges (L" IsRemainingProfilesEntryMissing" );
424418
425- _PrintAll ();
426419 return entryVM;
427420 }
428421
@@ -496,134 +489,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
496489 return _folderEntry.Icon ();
497490 }
498491
499- void NewTabMenuViewModel::_PrintAll ()
500- {
501- #ifdef _DEBUG
502- OutputDebugString (L" ---Model:---\n " );
503- _PrintModel (_Settings.GlobalSettings ().NewTabMenu ());
504- OutputDebugString (L" \n " );
505- OutputDebugString (L" ---VM:---\n " );
506- _PrintVM (_rootEntries);
507- OutputDebugString (L" \n " );
508- #endif
509- }
510-
511- #ifdef _DEBUG
512- void NewTabMenuViewModel::_PrintModel (Windows::Foundation::Collections::IVector<Model::NewTabMenuEntry> list, std::wstring prefix)
513- {
514- if (!list)
515- {
516- return ;
517- }
518-
519- for (auto && e : list)
520- {
521- _PrintModel (e, prefix);
522- }
523- }
524-
525- void NewTabMenuViewModel::_PrintModel (const Model::NewTabMenuEntry& e, std::wstring prefix)
526- {
527- switch (e.Type ())
528- {
529- case NewTabMenuEntryType::Profile:
530- {
531- const auto & pe = e.as <Model::ProfileEntry>();
532- OutputDebugString (fmt::format (L" {}Profile: {}\n " , prefix, pe.Profile ().Name ()).c_str ());
533- break ;
534- }
535- case NewTabMenuEntryType::Action:
536- {
537- const auto & actionEntry = e.as <Model::ActionEntry>();
538- OutputDebugString (fmt::format (L" {}Action: {}\n " , prefix, actionEntry.ActionId ()).c_str ());
539- break ;
540- }
541- case NewTabMenuEntryType::Separator:
542- {
543- OutputDebugString (fmt::format (L" {}Separator\n " , prefix).c_str ());
544- break ;
545- }
546- case NewTabMenuEntryType::Folder:
547- {
548- const auto & fe = e.as <Model::FolderEntry>();
549- OutputDebugString (fmt::format (L" {}Folder: {}\n " , prefix, fe.Name ()).c_str ());
550- _PrintModel (fe.RawEntries (), prefix + L" " );
551- break ;
552- }
553- case NewTabMenuEntryType::MatchProfiles:
554- {
555- const auto & matchProfilesEntry = e.as <Model::MatchProfilesEntry>();
556- OutputDebugString (fmt::format (L" {}MatchProfiles: {}\n " , prefix, matchProfilesEntry.Name ()).c_str ());
557- break ;
558- }
559- case NewTabMenuEntryType::RemainingProfiles:
560- {
561- OutputDebugString (fmt::format (L" {}RemainingProfiles\n " , prefix).c_str ());
562- break ;
563- }
564- default :
565- break ;
566- }
567- }
568-
569- void NewTabMenuViewModel::_PrintVM (Windows::Foundation::Collections::IVector<Editor::NewTabMenuEntryViewModel> list, std::wstring prefix)
570- {
571- if (!list)
572- {
573- return ;
574- }
575-
576- for (auto && e : list)
577- {
578- _PrintVM (e, prefix);
579- }
580- }
581-
582- void NewTabMenuViewModel::_PrintVM (const Editor::NewTabMenuEntryViewModel& e, std::wstring prefix)
583- {
584- switch (e.Type ())
585- {
586- case NewTabMenuEntryType::Profile:
587- {
588- const auto & pe = e.as <Editor::ProfileEntryViewModel>();
589- OutputDebugString (fmt::format (L" {}Profile: {}\n " , prefix, pe.ProfileEntry ().Profile ().Name ()).c_str ());
590- break ;
591- }
592- case NewTabMenuEntryType::Action:
593- {
594- const auto & actionEntry = e.as <Editor::ActionEntryViewModel>();
595- OutputDebugString (fmt::format (L" {}Action: {}\n " , prefix, actionEntry.ActionEntry ().ActionId ()).c_str ());
596- break ;
597- }
598- case NewTabMenuEntryType::Separator:
599- {
600- OutputDebugString (fmt::format (L" {}Separator\n " , prefix).c_str ());
601- break ;
602- }
603- case NewTabMenuEntryType::Folder:
604- {
605- const auto & fe = e.as <Editor::FolderEntryViewModel>();
606- OutputDebugString (fmt::format (L" {}Folder: {}\n " , prefix, fe.Name ()).c_str ());
607- _PrintVM (fe.Entries (), prefix + L" " );
608- break ;
609- }
610- case NewTabMenuEntryType::MatchProfiles:
611- {
612- const auto & matchProfilesEntry = e.as <Editor::MatchProfilesEntryViewModel>();
613- OutputDebugString (fmt::format (L" {}MatchProfiles: {}\n " , prefix, matchProfilesEntry.DisplayText ()).c_str ());
614- break ;
615- }
616- case NewTabMenuEntryType::RemainingProfiles:
617- {
618- OutputDebugString (fmt::format (L" {}RemainingProfiles\n " , prefix).c_str ());
619- break ;
620- }
621- default :
622- break ;
623- }
624- }
625- #endif
626-
627492 NewTabMenuEntryViewModel::NewTabMenuEntryViewModel (const NewTabMenuEntryType type) noexcept :
628493 _Type{ type }
629494 {
0 commit comments