Package org.netbeans.api.java.classpath

Examples of org.netbeans.api.java.classpath.ClassPath.entries()


                /**
                 * we are not sure the initial order of gsf classpath and java classpath,
                 * we here just call scalaPlatform.getStandardLibraries() to initial SCALAC_CLASS_PATH
                 */
                ClassPath scalaStdCp = scalaPlatform.getStandardLibraries();
                for (Entry entry : scalaStdCp.entries()) {
                    resources.add(ClassPathSupport.createResource(entry.getURL()));
                }
            }

            if (type == 0) {
View Full Code Here


                /**
                 * we are not sure the initial order of gsf classpath and java classpath,
                 * we here just call scalaPlatform.getStandardLibraries() to initial SCALAC_CLASS_PATH
                 */
                ClassPath scalaStdLibsCp = scalaPlatform.getStandardLibraries();
                for (ClassPath.Entry entry : scalaStdLibsCp.entries()) {
                    resources.add(ClassPathSupport.createResource(entry.getURL()));
                }
            }

            if (type == 0) {
View Full Code Here

        final List<PathResourceImplementation> result = new ArrayList<PathResourceImplementation>();
        if (jp != null) {
            //TODO: May also listen on CP, but from Platform it should be fixed.           
            final ClassPath cp = jp.getBootstrapLibraries();
            assert cp != null : jp;
            for (ClassPath.Entry entry : cp.entries()) {
                result.add(ClassPathSupport.createResource(entry.getURL()));
            }
        }
       
        ScalaPlatform sp = findActiveScalaPlatform();
View Full Code Here

       
        ScalaPlatform sp = findActiveScalaPlatform();
        if (sp != null) {
            final ClassPath cp = sp.getBootstrapLibraries();
            assert cp != null : cp;
            for (ClassPath.Entry entry : cp.entries()) {
                result.add(ClassPathSupport.createResource(entry.getURL()));
            }
        }
       
        synchronized (this) {
View Full Code Here

        if (installFolders.size()>0) {
            File scalaHome = FileUtil.toFile ((FileObject)installFolders.iterator().next());
            props.setProperty(homePropName, scalaHome.getAbsolutePath());
            ClassPath bootCP = platform.getBootstrapLibraries();
            StringBuffer sbootcp = new StringBuffer();
            for (ClassPath.Entry entry : bootCP.entries()) {
                URL url = entry.getURL();
                if ("jar".equals(url.getProtocol())) {              //NOI18N
                    url = FileUtil.getArchiveFile(url);
                }
                File root = new File (URI.create(url.toExternalForm()));
View Full Code Here

             * @todo how to deal with project's custom java platform ?
             */
            JavaPlatform javaPlatform = JavaPlatformManager.getDefault().getDefaultPlatform();
            if (javaPlatform != null) {
                ClassPath javaBootstrap = javaPlatform.getBootstrapLibraries();
                List<ClassPath.Entry> entries = javaBootstrap.entries();
                URL[] urls = new URL[entries.size() + 1];
                for (int i = 0; i < entries.size(); i++) {
                    urls[i] = entries.get(i).getURL();
                }
                if (!cp.entries().isEmpty()) {
View Full Code Here

                    //Add compile classpath
                    Set<ClassPath> paths = regs.getPaths (ClassPath.COMPILE);
                    for (Iterator<ClassPath> it = paths.iterator(); it.hasNext();) {
                        ClassPath cp =  it.next();
                        try {
                            for (ClassPath.Entry entry : cp.entries()) {
                                roots.add (entry.getURL());
                            }                   
                        } catch (RecursionException e) {/*Recover from recursion*/}
                    }
                    //Add entries from Exec CP which has sources on Sources CP and are not on the Compile CP
View Full Code Here

                    Set<ClassPath> sources = regs.getPaths(ClassPath.SOURCE);
                    Set<URL> sroots = new HashSet<URL> ();
                    for (Iterator<ClassPath> it = sources.iterator(); it.hasNext();) {
                        ClassPath cp = it.next();
                        try {
                            for (Iterator<ClassPath.Entry> eit = cp.entries().iterator(); eit.hasNext();) {
                                ClassPath.Entry entry = eit.next();
                                sroots.add (entry.getURL());
                            }                   
                        } catch (RecursionException e) {/*Recover from recursion*/}
                    }               
View Full Code Here

                    }               
                    Set<ClassPath> exec = regs.getPaths(ClassPath.EXECUTE);
                    for (Iterator<ClassPath> it = exec.iterator(); it.hasNext();) {
                        ClassPath cp = it.next ();
                        try {
                            for (Iterator<ClassPath.Entry> eit = cp.entries().iterator(); eit.hasNext();) {
                                ClassPath.Entry entry = eit.next ();
                                FileObject[] fos = SourceForBinaryQuery.findSourceRoots(entry.getURL()).getRoots();
                                for (int i=0; i< fos.length; i++) {
                                    try {
                                        if (sroots.contains(fos[i].getURL())) {
View Full Code Here

            this.wiz = settings;
            ScalaPlatform platform = this.iterator.getPlatform();
            String srcPath = null;
            String jdocPath = null;
            ClassPath src = platform.getSourceFolders();
            if (src.entries().size()>0) {
                URL folderRoot = src.entries().get(0).getURL();
                if ("jar".equals(folderRoot.getProtocol())) {   //NOI18N
                    folderRoot = FileUtil.getArchiveFile (folderRoot);
                }
                srcPath = new File(URI.create(folderRoot.toExternalForm())).getAbsolutePath();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.