RCS file: /cvs/mobility/kjava/j2meproject/src/org/netbeans/modules/kjava/j2meproject/queries/UnitTestForSourceQueryImpl.java,v retrieving revision 1.2 diff -u -w -b -r1.2 UnitTestForSourceQueryImpl.java --- UnitTestForSourceQueryImpl.java 21 Apr 2006 12:55:38 -0000 1.2 +++ UnitTestForSourceQueryImpl.java 4 May 2006 09:54:06 -0000 @@ -21,25 +21,19 @@ public class UnitTestForSourceQueryImpl implements MultipleRootsUnitTestForSourceQueryImplementation { private AntProjectHelper myHelper; - private FileObject sourceRoot; public UnitTestForSourceQueryImpl(AntProjectHelper aph) { this.myHelper=aph; - - String sourceRootPath=myHelper.getStandardPropertyEvaluator().getProperty("src.dir"); - if (sourceRootPath!=null) - this.sourceRoot=this.myHelper.resolveFileObject(sourceRootPath); - else - sourceRoot=null; } public URL[] findUnitTests(FileObject source) { //we have only one source root in J2ME projects, it is same for both sources and tests try { - if (this.sourceRoot==null) - return null; - else - return new URL[] {this.sourceRoot.getURL()}; + String sourceRootPath=myHelper.getStandardPropertyEvaluator().getProperty("src.dir"); //NOI18N + if (sourceRootPath == null) return null; + FileObject sourceRoot=this.myHelper.resolveFileObject(sourceRootPath); + if (sourceRoot == null) return null; + return new URL[] {sourceRoot.getURL()}; } catch (Exception e) { return null; } @@ -47,13 +41,6 @@ public URL[] findSources(FileObject unitTest) { //we have only one source root in J2ME projects, it is same for both sources and tests - try { - if (this.sourceRoot==null) - return null; - else - return new URL[] {this.sourceRoot.getURL()}; - } catch (Exception e) { - return null; - } + return findUnitTests(unitTest); } }