DESCRIPTION

AdaptableFileTreeIterator: handling of nested / closed projects

In case of nested projects AdaptableFileTreeIterator finds
more than one container for a given file. The old implementation just
took the first found container. This could cause problems if the
container is not accessible (project closed). The new implementation
does the following:
1. Non accessible containers are excluded
2. The remaining containers checked for the containing projects:
The container contained in the innermost  project is chosen.

Bug: 328489
Change-Id: Iac58c50914e9b9fcafba9f0e0fc4d08a33455ccd
Signed-off-by: Marlie Beasley xxx@xxx.xxx

COMMENTS

author: Carlie Harper
date: 2010-10-29 12:32:05.000000000

Patch Set 1: I would prefer that you didn't submit this; IP review completed

Why do you need this logic about the innermost project? For the first time you hit an open project with the Iterator (in this case you have just one project as container in the array) you return a ContainerTreeIterator. The method createSubtreeIterator is overwritten on ContainerTreeIterator, therefore you will never get into the situation that you have more than one projects as container.

I wonder if we should take into accont only shared projects, but I'm not sure whether that makes a difference.

What about adding a test case?

-------------------------------------
author: Marlie Beasley
date: 2010-11-11 14:22:50.000000000

Patch Set 1: I would prefer that you didn't submit this

In case of nested projects you can get two containers for the a given folder:

Project1 [not shared]
    Project2 [shared]
        
You start with an AdaptableFileTreeIterator and hit the first folder in a shared project: the folder of project2. For this folder 2 containers exist, one belonging to project 1 and one belonging to project2.
I will drop the "innermost" logic and add a check if the container is shared with Git.

-------------------------------------
