Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-111669: Move left/right and up/down action is incorrect

$
0
0
Reporter Olga Lobacheva (olka) Olga Lobacheva (olka)
Created Jun 17, 2009 1:46:17 PM
Updated Dec 27, 2011 4:30:15 PM
Resolved Dec 26, 2011 5:44:15 PM
Priority Major
Type Bug
Fix versions 6.1
State Won't fix
Assignee Slava Tutushkin (slava.tutushkin)
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build No Fixed in build
Invoke ctr-alt-shift to move up/down anonymous type property. Return statement was selected, when I move it down - it jump to next method invocation.
Looks buggy. In my opinion it should stay at its place.

 var unionDomain = elements
        .Select(elem =>
        {
          var elementDomain = elem.GetSearchDomain();
          if (IsUnnamed(elem))
            return new {Element = elem, Domain = searchDomain.Intersect(elementDomain)};

          var projectFiles = new HashSet<IProjectFile>();
          foreach (var name in CollectNames(new[] {elem}))
          {
            ICollection<IProjectFile> files;
            if (!nameToFiles.TryGetValue(name, out files))
            {
              files = wordIndex.GetFilesContainingWord(name);
              nameToFiles[name] = files;
            }
            projectFiles.AddRange(files);
          }
          return new
            {
              Element = elem, {HERE}
              Domain = searchDomain.Intersect(elementDomain).Intersect(factory.CreateSearchDomain(projectFiles))
            };
        })
        .Select(item =>
        {
          // TODO: avoid Enumeration of domain files...
          var domain = item.Domain;
          var element = item.Element;

          var gurus = searchGurus.Select(guru => new {Guru = guru, Id = guru.GetElementId(element)}).Where(guru => guru.Id != null).ToList();
          if (gurus.IsEmpty())
            return item;

          var filteredFiles = GetElementDomainFiles(domain).Where(file => gurus.All(guru => guru.Guru.CanContainReferences(file, guru.Id))).ToList();

          // Filtered files domain may be greater then source domain (file domain may specify psi element).
          var newDomain = domain.Intersect(factory.CreateSearchDomain(filteredFiles));
          return new { Element = element, Domain = newDomain };
        })
        .Aggregate(factory.EmptySearchDomain(), (domain, item) => domain.Union(item.Domain));

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>