PageRenderTime 141ms CodeModel.GetById 60ms app.highlight 2ms RepoModel.GetById 78ms app.codeStats 0ms

/src/org/bitbucket/connectors/jetbrains/ProjectUtil.java

https://bitbucket.org/atlassian/jetbrains-bitbucket-connector/
Java | 24 lines | 15 code | 4 blank | 5 comment | 1 complexity | 03d92596055108b746ea9b0bfdd5684b MD5 | raw file
 1package org.bitbucket.connectors.jetbrains;
 2
 3import com.intellij.openapi.project.Project;
 4import com.intellij.openapi.roots.ProjectRootManager;
 5import com.intellij.openapi.vfs.VirtualFile;
 6
 7import java.util.ArrayList;
 8import java.util.List;
 9
10/**
11 * User: leha2000
12 * Date: Oct 18, 2011
13 * Time: 10:19:57 AM
14 */
15public class ProjectUtil {
16
17    public static List<VirtualFile> getSourceFolders(Project project, VirtualFile root) {
18        List<VirtualFile> result = new ArrayList<VirtualFile>();
19        for (VirtualFile src: ProjectRootManager.getInstance(project).getContentSourceRoots()) {
20            result.add(src);
21        }
22        return result;
23    }
24}