From: <ox-...@us...> - 2003-06-03 22:22:25
|
Update of /cvsroot/sheets/sheets In directory sc8-pr-cvs1:/tmp/cvs-serv11675 Modified Files: Sheets.sheets todo.txt Log Message: Removed the magical project setting for java fragments. The previous behavior was that all java fragments got their project from the file header. However, it is sometimes necessary to work with code that has fragments from the same package split acros different projects. Now java fragments get their package like any other normal fragment (by inheriting it from the fragment they extend, picking it up from context, or setting it manuall) Index: Sheets.sheets =================================================================== RCS file: /cvsroot/sheets/sheets/Sheets.sheets,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** Sheets.sheets 2 Jun 2003 08:05:04 -0000 1.52 --- Sheets.sheets 3 Jun 2003 22:22:11 -0000 1.53 *************** *** 2124,2128 **** throw new Error("\\"" + comp + "\\" doesn't have an identity."); if (this.objectIdPrefix == null) { ! this.project = (projectIsReadOnly()) ? computeProject() : comp.project; Project.createIfNotFound(this.project); if (this.project == comp.project) { --- 2124,2128 ---- throw new Error("\\"" + comp + "\\" doesn't have an identity."); if (this.objectIdPrefix == null) { ! this.project = comp.project; Project.createIfNotFound(this.project); if (this.project == comp.project) { *************** *** 2153,2157 **** if (this instanceof LightWeightFragment) throw new Error("Can't set ID of lightweight frags."); - project = (projectIsReadOnly()) ? computeProject() : project; Project.createIfNotFound(project); this.project = project; --- 2153,2156 ---- *************** *** 5728,5732 **** nkramer:9399 rgs:7513 - nkramer:28180 nkramer:28402 rgs:6417 --- 5727,5730 ---- *************** *** 13064,13069 **** rgs:7507 rgs:8483 - nkramer:28179 - nkramer:28539 nkramer:27668 nkramer:27669 --- 13062,13065 ---- *************** *** 13219,13226 **** ram:2425 nkramer:28164 - nkramer:28178 nkramer:28171 ram:2114 - nkramer:28538 nkramer:28192 nkramer:28401 --- 13215,13220 ---- *************** *** 27242,27266 **** return project; } - object nkramer:28178 - pkg=org.browsecode.sheets.archive - type=java - section text nkramer:28178 - // Whether or not the "project" attribute is read only. - public boolean SheetsArchivalObject.projectIsReadOnly () { return false; } - object nkramer:28179 - pkg=org.browsecode.javaStuff - type=java - section text nkramer:28179 - // Under sufficiently bogus circumstances, we can't compute any useful project. - // One such situation is if the package has been set, but to a package that we - // don't have the definition for. - public boolean JavaFragment.projectIsReadOnly () { - return computeProject() != null; - } - object nkramer:28180 - pkg=org.browsecode.javaStuff - type=java - section text nkramer:28180 - public boolean JavaFileHeaderFragment.projectIsReadOnly () { return false; } object nkramer:28192 pkg=org.browsecode.sheets.archive --- 27236,27239 ---- *************** *** 28259,28282 **** // Make sure to intern the string before you set this field. private static String Profile.userSpecifiedFavoriteProject; - object nkramer:28538 - pkg=org.browsecode.sheets.archive - type=java - section text nkramer:28538 - // Anyone whose project is computed should implement this method. - // And don't call this method unless the project is computed (aka read only). - public String SheetsArchivalObject.computeProject () { - throw new Error("Default method of computeProject should never be called"); - } - object nkramer:28539 - pkg=org.browsecode.javaStuff - type=java - section text nkramer:28539 - public String JavaFragment.computeProject () { - JavaFileHeaderFragment pkg = JavaPackageSentinel.getPackage(getPackage()); - if (pkg == null) - return null; - else - return pkg.getProjectName(); - } object nkramer:28542 pkg=org.browsecode.sheets.archive --- 28232,28235 ---- *************** *** 28629,28633 **** (Fragment comp, String newProject) { ! if (!comp.projectIsReadOnly() && !(comp instanceof LightWeightFragment) && comp.getProjectName() != newProject) comp.setProject(newProject); --- 28582,28586 ---- (Fragment comp, String newProject) { ! if (!(comp instanceof LightWeightFragment) && comp.getProjectName() != newProject) comp.setProject(newProject); *************** *** 54201,54205 **** result.addElement(new ScalarAttribute("project", this) { - public boolean isWritable () { return !projectIsReadOnly(); } public String getValue () { return getProjectName(); } protected void setValue (String value) { setProject(value); } --- 54154,54157 ---- *************** *** 96538,96543 **** nkramer:27977 rgs:8483 - nkramer:28179 - nkramer:28539 nkramer:27667 nkramer:27668 --- 96490,96493 ---- *************** *** 97156,97163 **** nkramer:28232 nkramer:28164 - nkramer:28178 nkramer:28171 ram:2114 - nkramer:28538 nkramer:28192 nkramer:28401 --- 97106,97111 ---- *************** *** 99882,99886 **** nkramer:9399 rgs:7513 - nkramer:28180 nkramer:28402 rgs:13352 --- 99830,99833 ---- *************** *** 101691,101695 **** nkramer:28438 object ram:2144 ! classpath=C:\\sheets\\lib\\bootstrap-sheets.jar project=Sheets root=src/java --- 101638,101642 ---- nkramer:28438 object ram:2144 ! classpath=/home/schin/sheets/lib/bootstrap-sheets.jar project=Sheets root=src/java Index: todo.txt =================================================================== RCS file: /cvsroot/sheets/sheets/todo.txt,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** todo.txt 2 Jun 2003 08:05:15 -0000 1.21 --- todo.txt 3 Jun 2003 22:22:16 -0000 1.22 *************** *** 2,5 **** --- 2,20 ---- - + more annoying bugs: + java.lang.NullPointerException + at org.browsecode.sheets.TextualViewer.getSaveRect(TextualViewer.java:252) + at org.browsecode.sheets.TextualViewer.contentHeight(TextualViewer.java:121) + at org.browsecode.sheets.Viewer.height(Viewer.java:189) + at org.browsecode.sheets.ListViewer.validate(ListViewer.java:323) + at org.browsecode.sheets.AbstractSheetViewer.validate(AbstractSheetViewer.java:276) + at org.browsecode.sheets.ViewPanel.makeValid(ViewPanel.java:276) + at org.browsecode.sheets.ViewPanel.doAllRedraws(ViewPanel.java:1272) + at org.browsecode.sheets.SimpleCommandMenuItem.actionPerformed(SimpleCommandMenuItem.java:97) + Wizard stuff (possibly duplicate): + * Should not let the user go back form the file import screen. + * Should not let the user close the wizard during file import. + + Todo: * Fix the background image of the project wizard dialog * Show the import errors in a new wizard pane |