From: Mark G. <mg...@us...> - 2004-04-05 21:03:12
|
Update of /cvsroot/gmod/apollo/src/java/apollo/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11810/src/java/apollo/gui Modified Files: AnnotationEditor.java Log Message: Fixed 2 null pointers on saving tiers and cleaned up spewing messages. Still not saving right thing for name adapter and overlapper. Problem was a default feature property was being used to compare if feature property had something different than default. Well the default feature prop had no tier name which caused the 2 null pointers as tiername was checked for "annotation" for overlapper and name adapter. Also the test that was in there wouldnt necasarily work as it was using == and there was no guarantee that there wasnt multiple instances of the default name adapter and overlapper. I made DefaultNameAdapter and SimpleOverlapper (rename DefaultOverlapper?) singletons to guarantee that == and != will work in testing for default name adapter and overlapper. Now just tests against the singleton - dont need default feature property. Also was spewing messages on checking for null name adapter and overlapper - now theres hasNameAdapter and hasOverlapper to query for name adapter and overlapper without spewage. But theres still a bug - its putting out name_method : apollo.gui.schemes.FlyNameAdapter@1b5a5cf overlap_method : apollo.gui.schemes.ORF_Overlap@15c40eb instead of overlap_method : ORF_Overlap name_method : FlyNameAdapter need to fix this next. Index: AnnotationEditor.java =================================================================== RCS file: /cvsroot/gmod/apollo/src/java/apollo/gui/AnnotationEditor.java,v retrieving revision 1.156 retrieving revision 1.157 diff -C2 -d -r1.156 -r1.157 *** AnnotationEditor.java 5 Apr 2004 16:38:36 -0000 1.156 --- AnnotationEditor.java 5 Apr 2004 20:50:29 -0000 1.157 *************** *** 499,503 **** OverlapI checker = (sa.getBioType().equals(sb.getBioType()) ? Config.getOverlapper(sa) : ! new SimpleOverlap()); return checker.areOverlapping (sa, sb); } --- 499,503 ---- OverlapI checker = (sa.getBioType().equals(sb.getBioType()) ? Config.getOverlapper(sa) : ! SimpleOverlap.getSimpleOverlap()); return checker.areOverlapping (sa, sb); } |