PageRenderTime 39ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 1ms

/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
  1. package org.bitbucket.connectors.jetbrains;
  2. import com.intellij.openapi.project.Project;
  3. import com.intellij.openapi.roots.ProjectRootManager;
  4. import com.intellij.openapi.vfs.VirtualFile;
  5. import java.util.ArrayList;
  6. import java.util.List;
  7. /**
  8. * User: leha2000
  9. * Date: Oct 18, 2011
  10. * Time: 10:19:57 AM
  11. */
  12. public class ProjectUtil {
  13. public static List<VirtualFile> getSourceFolders(Project project, VirtualFile root) {
  14. List<VirtualFile> result = new ArrayList<VirtualFile>();
  15. for (VirtualFile src: ProjectRootManager.getInstance(project).getContentSourceRoots()) {
  16. result.add(src);
  17. }
  18. return result;
  19. }
  20. }