Replacement for FileUtil.visitFilesRecursively in Demetra

I've used FileUtil.visitFilesRecursively in 5.1 but i can't find a similar API in Demetra.

Any clues ?

7 comments

I wouldn't worry too much about it and just copy&paste the code from 5.1. I guess it has been removed because plugins should usually make use of IDEA's VirtualFile abstraction layer - although this seems to be missing some convenient traversing utility as well.

Sascha

0

I guess i can do that, just doesn't feel correct.
I'll create an issue for such an API to be created.

Thanks.

0

Check out the new AnalysisScope stuff. It probably does what you want.

--Dave Griffith

0

I don't think so. It only provides a way to look for a given VirtualFile.
I need filesystem traversing. It would have to be something like:

AnalysisScope.accept(PsiFileVisitor visitor)

0

It does. Or to be more precise, it implements

AnalysisScope.accept(PsiElementVisitor visitor)

which is vastly more powerful.

--Dave Griffith

0

You're right, it does. I wasn't looking at the big picture.

Still, it doesn't work the way i would like it to. I need the stop signals in order to optimize the execution time, FileUtil.FileVisitor provided that.

I've implemented the visitFilesRecursively on my project and it works fine now, i guess i can live with this.

0

Please sign in to leave a comment.