Community
Participate
Working Groups
While I am testing search features today, I found something that might be generic to all of our tree models in *explorer and *renderer. Let me take search result as example. In search result page, you can navigate/iterate all the files/matches by previous/next action. When your "next" action will hit a match that is not expanded, you will have to wait until its parentModel.getChildren() is done. In the replace preview page, although not implemented yet, you will see the similar thing. The common thing is that they are all tree model and they have a "cursor" pointing to the "current" node. The prev/next action should just re-point the cursor in the same way. I think we need a tree model iterator hooked up to a render that needs such navigation. In the model iterator we may want to have options like, iterate only leaf nodes(matches) or all nodes(files and matches). We will also allow some callbacks to be passed in, such as "check if a node is valid to be iterated"(stale file). I will generalize this in a separate js file and use it in result and preview page. We will see how generic it will go.
Fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=db950cccefec9c55a1793ef7ae2c003946fea385. The search explorer now consumes this iterator. I think file explorer can also use it for general purpose.