Package com.intellij.openapi.roots

Examples of com.intellij.openapi.roots.ProjectRootManager


    }
    return null;
  }

  private static boolean isFileFromErlangSdk(@NotNull Project project, @NotNull VirtualFile virtualFile) {
    ProjectRootManager projectRootManager = ProjectRootManager.getInstance(project);
    Sdk projectSdk = projectRootManager.getProjectSdk();
    if (projectSdk == null) return false;
    for (VirtualFile sdkSourceRoot : projectSdk.getRootProvider().getFiles(OrderRootType.SOURCES)) {
      if (virtualFile.getPath().startsWith(sdkSourceRoot.getPath())) return true;
    }
    return false;
View Full Code Here


                @Override
                public void run() {
                    try {
                        setProgressText(toolWindow, "plugin.status.in-progress.current");

                        final ProjectRootManager projectRootManager = ProjectRootManager.getInstance(project);
                        final VirtualFile[] sourceRoots = projectRootManager.getContentSourceRoots();

                        if (sourceRoots != null && sourceRoots.length > 0) {
                            ApplicationManager.getApplication().runReadAction(
                                    new ScanSourceRootsAction(project, sourceRoots, getSelectedOverride(toolWindow)));
                        }
View Full Code Here

                    = project.getComponent(CheckStylePlugin.class);
            if (checkStylePlugin == null) {
                throw new IllegalStateException("Couldn't get checkstyle plugin");
            }

            final ProjectRootManager projectRootManager
                    = ProjectRootManager.getInstance(project);
            final VirtualFile[] sourceRoots
                    = projectRootManager.getContentSourceRoots();

            // disable if no files are selected
            if (sourceRoots == null || sourceRoots.length == 0) {
                presentation.setEnabled(false);
View Full Code Here

TOP

Related Classes of com.intellij.openapi.roots.ProjectRootManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.