public void Update()
        {
            Logger.AddInfo("UpdateCommand. Start");

            ThemeProvider.Instance.ThemeName = dte.GetVSTheme(CalcVsTheme);
            Solution = dte.BuildTree();
            if (string.IsNullOrEmpty(Solution.Path))
            {
                CanTotalMerge = false;
                Logger.AddInfo("UpdateCommand. End - cant merge since solution is empty or not under vss");
                return;
            }

            //since grid bugs we must initialize startup collection
            SelectedItems = new ObservableCollection <ProjectItemBase>();
            var source = GetFlatItemsSource().Where(item => item.IsCheckOut).ToList();

            Source = source;

            PortOptions = new PortOptionsViewModel(Solution, Options);
            if (!PortOptions.IsAttached)
            {
                Logger.AddInfo("UpdateCommand. End - cant merge since port is not initialized");
                CanTotalMerge = false;
                return;
            }
            MasterBranch             = FindMasterBranch(PortOptions);
            CanTotalMerge            = MasterBranch != null;
            PortOptions.MasterBranch = MasterBranch;

            currentBranchLocker.DoIfNotLocked(() => CurrentBranch = Options.Branches.LastOrDefault(item => item != MasterBranch));
            MergeProgress = 0;

            Logger.AddInfo("UpdateCommand. End - successful initialized");
        }
        bool InitializeConnection()
        {
            ThemeProvider.Instance.ThemeName = dte.GetVSTheme(CalcVsTheme);
            Solution = dte.BuildTree();
            if (string.IsNullOrEmpty(Solution.Path))
            {
                CanTotalMerge = false;
                Logger.AddInfo("UpdateCommand. End - cant merge since solution is empty or not under vss");
                return(false);
            }
            //since grid bugs we must initialize startup collection

            PortOptions = new PortOptionsViewModel(Solution, Options);
            return(true);
        }
 public SolitionEnumeratorHelper(IDteWrapper dte)
 {
     this.dte = dte;
     solution = dte.BuildTree();
 }