Package com.intellij.openapi.roots

Examples of com.intellij.openapi.roots.ModuleRootManager


                    suppressionFile = configFileRelativePath;
                }
            }

            if (module != null) {
                final ModuleRootManager rootManager = ModuleRootManager.getInstance(module);

                // check module content roots
                if (suppressionFile == null && rootManager.getContentEntries().length > 0) {
                    for (final ContentEntry contentEntry : rootManager.getContentEntries()) {
                        final File contentEntryPath = new File(contentEntry.getFile().getPath(), fileName);
                        if (contentEntryPath.exists()) {
                            suppressionFile = contentEntryPath;
                            break;
                        }
View Full Code Here


        final Module module = ModuleUtil.findModuleForFile(elementFile, plugin.getProject());
        if (module == null) {
            return false;
        }

        final ModuleRootManager moduleRootManager = ModuleRootManager.getInstance(module);
        return moduleRootManager != null && moduleRootManager.getFileIndex().isInTestSourceContent(elementFile);
    }
View Full Code Here

            final boolean checkTestClasses = checkStylePlugin.getConfiguration().isScanningTestClasses();
            if (!checkTestClasses && module != null) {
                final VirtualFile elementFile = psiFile.getContainingFile().getVirtualFile();
                if (elementFile != null) {
                    final ModuleRootManager moduleRootManager = ModuleRootManager.getInstance(module);
                    if (moduleRootManager != null && moduleRootManager.getFileIndex().isInTestSourceContent(elementFile)) {
                        if (LOG.isDebugEnabled()) {
                            LOG.debug("Skipping test class " + psiFile.getName());
                        }
                        return null;
                    }
View Full Code Here

        if (null == project) return;
        ModuleManager manager = ModuleManager.getInstance(project);
        Module[] modules = manager.getModules();
        for (Module module : modules) {
            log.info("Checking Module: " + module.getName());
            ModuleRootManager rootManager = ModuleRootManager.getInstance(module);
            OrderEntry[] entries = rootManager.getOrderEntries();
            for (OrderEntry entry : entries) {
                if (entry instanceof LibraryOrderEntry) {
                    final LibraryOrderEntry libraryEntry = (LibraryOrderEntry)entry;
                    final Library library = libraryEntry.getLibrary();
//                    log.debug("\tEntry: " + libraryEntry.getPresentableName());
View Full Code Here

TOP

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

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.