1 19 package org.netbeans.modules.j2ee.ejbjarproject.queries; 20 21 import org.netbeans.spi.java.queries.SourceLevelQueryImplementation; 22 import org.netbeans.spi.project.support.ant.AntProjectHelper; 23 import org.netbeans.spi.project.support.ant.PropertyEvaluator; 24 import org.openide.filesystems.FileObject; 25 26 30 public class SourceLevelQueryImpl implements SourceLevelQueryImplementation { 31 32 private final AntProjectHelper helper; 33 private final PropertyEvaluator evaluator; 34 35 public SourceLevelQueryImpl(AntProjectHelper helper, PropertyEvaluator evaluator) { 36 this.helper = helper; 37 this.evaluator = evaluator; 38 } 39 40 public String getSourceLevel(FileObject javaFile) { 41 String sl = evaluator.getProperty("javac.source"); 42 if (sl != null && sl.length() > 0) { 43 return sl; 44 } else { 45 return null; 46 } 47 } 48 49 } 50 | Popular Tags |