Ejemplo n.º 1
0
        private void ProcessSomeMembers()
        {
            Begin();
            var p = RefactoringUtil.GetNewProgram(_tb);

            if (p == null)
            {
                NotifyStatusbar(DeadAnnotationStatus.NoProgram);
                Finish();
                return;
            }
            UpdateFilename(p.FullName);
            var notProcessedMembers = new List <MemberDecl>();
            var tld = RefactoringUtil.GetTld(p);

            _changesSinceLastSuccessfulRun.ForEach(i => {
                MemberDecl md;
                RefactoringUtil.GetMemberFromPosition(tld, i, out md);
                if (md != null && !notProcessedMembers.Contains(md))
                {
                    notProcessedMembers.Add(md);
                }
            });
            if (tld == null || notProcessedMembers.Count == 0)
            {
                NotifyStatusbar(DeadAnnotationStatus.NoChanges);
                Finish();
                return;
            }
            _thread = new Thread(ProcessSomeMembersThreaded);
            _thread.Start(new ThreadParams {
                P = p, M = notProcessedMembers, S = Snapshot, Stop = _currentStopper
            });
        }
Ejemplo n.º 2
0
        private void ProcessProgram()
        {
            Begin();
            var prog = RefactoringUtil.GetNewProgram(_tb);

            if (prog == null)
            {
                NotifyStatusbar(DeadAnnotationStatus.NoProgram);
                Finish();
                return;
            }
            UpdateFilename(prog.FullName);
            _thread = new Thread(ProcessProgramThreaded);
            _thread.Start(new ThreadParams {
                P = prog, S = Snapshot, Stop = _currentStopper
            });
        }