1 19 20 package org.netbeans.modules.java.project; 21 22 import org.netbeans.api.java.classpath.ClassPath; 23 import org.netbeans.api.project.FileOwnerQuery; 24 import org.netbeans.api.project.Project; 25 import org.netbeans.spi.java.classpath.ClassPathProvider; 26 import org.openide.filesystems.FileObject; 27 28 32 public class ProjectClassPathProvider implements ClassPathProvider { 33 34 35 public ProjectClassPathProvider() {} 36 37 public ClassPath findClassPath(FileObject file, String type) { 38 Project p = FileOwnerQuery.getOwner(file); 39 if (p != null) { 40 ClassPathProvider cpp = p.getLookup().lookup(ClassPathProvider.class); 41 if (cpp != null) { 42 return cpp.findClassPath(file, type); 43 } else { 44 return null; 45 } 46 } else { 47 return null; 48 } 49 } 50 51 } 52 | Popular Tags |