You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(7) |
Aug
(1) |
Sep
|
Oct
(3) |
Nov
(39) |
Dec
(16) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(8) |
Feb
|
Mar
(1) |
Apr
(19) |
May
(23) |
Jun
(36) |
Jul
(4) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <ox-...@us...> - 2002-11-13 18:54:13
|
Update of /cvsroot/sheets/sheets In directory usw-pr-cvs1:/tmp/cvs-serv8531 Modified Files: Sheets.sheets Log Message: Added some minor features, and lots of small bugfixes: Features: * Syntax highlighting for java byte code completion (format is synced up with java summary views) * Splash screen now shows up before main window, and closes the main window comes up or 6 seconds (whichever takes longer) * Import window now comes up before main interface Bugfixes: * Fixed intermittent layout problems on opening sheets (could result in some nasty exceptions upon context completion). * Fixed an intermittent bug where the main sheets editing view would stop resizing with the enclosing frame. Index: Sheets.sheets =================================================================== RCS file: /cvsroot/sheets/sheets/Sheets.sheets,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Sheets.sheets 31 Oct 2002 20:15:20 -0000 1.16 --- Sheets.sheets 13 Nov 2002 18:53:38 -0000 1.17 *************** *** 2262,2269 **** File newFile = new File(filename + "-temp"); Console.status("Saving dump file " + filename + "..."); ! PrintWriter outputStream ! = new PrintWriter(new BufferedWriter(new FileWriter(newFile))); ! AsciiFragmentWriter writer ! = new AsciiFragmentWriter(getName(), outputStream); if (createProjectLogs) { --- 2262,2267 ---- File newFile = new File(filename + "-temp"); [...1897 lines suppressed...] *************** *** 107347,107350 **** --- 107647,107663 ---- schin:677 schin:678 + object schin:1018 + filename=>classes + title=StyleMarker + type=sheet + section text schin:1018 + StyleMarker + section components schin:1018 + schin:1008 + schin:1009 + schin:1010 + schin:1011 + schin:1012 + schin:1013 object sjc:6 filename=>classes |
From: <ox-...@us...> - 2002-11-13 18:53:56
|
Update of /cvsroot/sheets/sheets/summaries In directory usw-pr-cvs1:/tmp/cvs-serv8531/summaries Removed Files: Java-1.4-Headers.sheets JavaOrg-1.4-Headers.sheets JavaX-1.4-Headers.sheets Log Message: Added some minor features, and lots of small bugfixes: Features: * Syntax highlighting for java byte code completion (format is synced up with java summary views) * Splash screen now shows up before main window, and closes the main window comes up or 6 seconds (whichever takes longer) * Import window now comes up before main interface Bugfixes: * Fixed intermittent layout problems on opening sheets (could result in some nasty exceptions upon context completion). * Fixed an intermittent bug where the main sheets editing view would stop resizing with the enclosing frame. --- Java-1.4-Headers.sheets DELETED --- --- JavaOrg-1.4-Headers.sheets DELETED --- --- JavaX-1.4-Headers.sheets DELETED --- |
From: <ox-...@us...> - 2002-10-31 20:28:59
|
Update of /cvsroot/sheets/sheets/jars In directory usw-pr-cvs1:/tmp/cvs-serv28698/jars Added Files: bcel.jar Log Message: oops! missed a jar. --- NEW FILE: bcel.jar --- (This appears to be a binary file; contents omitted.) |
From: <ox-...@us...> - 2002-10-31 20:16:04
|
Update of /cvsroot/sheets/sheets In directory usw-pr-cvs1:/tmp/cvs-serv21365 Modified Files: Sheets.sheets build.xml sheets.mf Log Message: ByteCode Completion Support Finished!!! Now you don't need summaries for things on the classpath anymore (such as the java libraries). Completion will continue to work, and middle-click will take you to the javadoc in a web browser (assuming that you have the right entry in your .sheetsrc). New hyperlink rollover highlighting!!! Now you know exactly what you can middle-click on. Simply move the mouse cursor around, and what ever is currently underneath it will be highlighted if it can be shown in context. Also works for external links to javadoc. Much needed bugfixes: Fixed that annoying bug where some large sheets would not open correctly, leaving a garbled ToC. Also fixed an update problem on showing fragments in context (no need to click in order to update). Index: Sheets.sheets =================================================================== RCS file: /cvsroot/sheets/sheets/Sheets.sheets,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Sheets.sheets 10 Aug 2002 01:12:59 -0000 1.15 --- Sheets.sheets 31 Oct 2002 20:15:20 -0000 1.16 *************** *** 271,285 **** section text apowers:0 private JButton KeyBindingsDialog.help; - object demo:0 - pkg=org.browsecode.javaStuff - type=java - section text demo:0 - public AbstractJavaClass JavaTokens.exprClass - (int index, JavaContext context) { - TypeProxy result = exprType(index, context); - if (result != null && result instanceof AbstractJavaClass) [...13704 lines suppressed...] + schin:661 + schin:662 + schin:663 + schin:664 + schin:665 + schin:666 + schin:667 + schin:668 + schin:669 + schin:670 + schin:671 + schin:672 + schin:673 + schin:674 + schin:675 + schin:676 + schin:677 + schin:678 object sjc:6 filename=>classes Index: build.xml =================================================================== RCS file: /cvsroot/sheets/sheets/build.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** build.xml 5 Jul 2002 23:33:22 -0000 1.9 --- build.xml 31 Oct 2002 20:15:23 -0000 1.10 *************** *** 13,17 **** <property name="database" value="Sheets.sdb"/> <property name="test-database" value="Test.sdb"/> ! <property name="imports" value="Sheets.sheets summaries/Java-1.4-Headers.sheets summaries/JavaX-1.4-Headers.sheets summaries/JavaOrg-1.4-Headers.sheets"/> <target name="init"> --- 13,17 ---- <property name="database" value="Sheets.sdb"/> <property name="test-database" value="Test.sdb"/> ! <property name="imports" value="Sheets.sheets"/> <target name="init"> *************** *** 83,89 **** <!-- Extra Stuff for testing that should be commented out on check-in <arg value="../Sheets.sheets"/> - <arg value="../summaries/Java-1.4-Headers.sheets"/> - <arg value="../summaries/JavaX-1.4-Headers.sheets"/> - <arg value="../summaries/JavaOrg-1.4-Headers.sheets"/> <arg value="-exit"/> --> --- 83,86 ---- Index: sheets.mf =================================================================== RCS file: /cvsroot/sheets/sheets/sheets.mf,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sheets.mf 10 Jun 2002 18:15:56 -0000 1.2 --- sheets.mf 31 Oct 2002 20:15:23 -0000 1.3 *************** *** 2,4 **** Main-Class: org.browsecode.sheets.Sheets Created-By: 1.2 (Sun Microsystems Inc.) ! Class-Path: ox.jar pat.jar kunststoff.jar jlfgr-1_0.jar antlr.jar --- 2,4 ---- Main-Class: org.browsecode.sheets.Sheets Created-By: 1.2 (Sun Microsystems Inc.) ! Class-Path: ox.jar pat.jar kunststoff.jar jlfgr-1_0.jar antlr.jar bcel.jar |
From: <ox-...@us...> - 2002-10-31 20:15:40
|
Update of /cvsroot/sheets/sheets/jars In directory usw-pr-cvs1:/tmp/cvs-serv21365/jars Modified Files: bootstrap-sheets.jar Log Message: ByteCode Completion Support Finished!!! Now you don't need summaries for things on the classpath anymore (such as the java libraries). Completion will continue to work, and middle-click will take you to the javadoc in a web browser (assuming that you have the right entry in your .sheetsrc). New hyperlink rollover highlighting!!! Now you know exactly what you can middle-click on. Simply move the mouse cursor around, and what ever is currently underneath it will be highlighted if it can be shown in context. Also works for external links to javadoc. Much needed bugfixes: Fixed that annoying bug where some large sheets would not open correctly, leaving a garbled ToC. Also fixed an update problem on showing fragments in context (no need to click in order to update). Index: bootstrap-sheets.jar =================================================================== RCS file: /cvsroot/sheets/sheets/jars/bootstrap-sheets.jar,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 Binary files /tmp/cvsgBM2Aa and /tmp/cvsm62Wmq differ |
From: <ox-...@us...> - 2002-08-10 01:13:05
|
Update of /cvsroot/sheets/sheets In directory usw-pr-cvs1:/tmp/cvs-serv8310 Modified Files: Sheets.sheets Log Message: Partially completed the current_directory export feature, and a more dirty/clean file check. Also fixed some random bugs. Index: Sheets.sheets =================================================================== RCS file: /cvsroot/sheets/sheets/Sheets.sheets,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Sheets.sheets 23 Jul 2002 02:05:21 -0000 1.14 --- Sheets.sheets 10 Aug 2002 01:12:59 -0000 1.15 *************** *** 5094,5100 **** comp.packageName = pkg; if (comp instanceof JavaClassFragment && comp.trueName.length == 1) { beforeClass = false; extraFrags++; ! classes.addElement(comp); } else if (comp instanceof JavaFileHeaderFragment) { String newPkg = comp.trueNameString(); --- 5094,5128 ---- comp.packageName = pkg; if (comp instanceof JavaClassFragment && comp.trueName.length == 1) { + JavaClassFragment classComp = (JavaClassFragment)comp; beforeClass = false; extraFrags++; ! classes.addElement(classComp); ! // Fix export location of classes that are exported to fixed locations ! if (exportOptions == ImportTask.EXPORT_CURRENT_LOCATION) { ! String path = classComp.reverseMap(file.getAbsolutePath()); ! if (path == null) { ! Console.batchedDisplay("Cannot export " + file + " to its current location due to the existing filename or directory structure. This file will be exported relative to the project directory."); ! } else { ! // make path relative to project if possible ! try { ! path = new File(path).getCanonicalPath(); ! String root = Project.findProject(project).getRootFrag().getRoot(); ! root = new File(root).getCanonicalPath(); ! if (path.startsWith(root)) ! path = path.substring(root.length(), path.length()); ! } catch (IOException e) { ! // leave path unmodified ! } ! classComp.setExportLocation(path); ! } ! } ! // Don't bother exporting imported classes if the location is the same ! try { ! if (classComp.getExportLocation(Project.findProject(project)).getCanonicalFile().equals(file.getCanonicalFile())) { ! classComp.classDirty = false; ! } ! } catch (IOException e) { ! // guess the class is dirty... ! } } else if (comp instanceof JavaFileHeaderFragment) { String newPkg = comp.trueNameString(); *************** *** 5493,5496 **** --- 5521,5528 ---- wlott:2628 rgs:7510 + schin:526 + schin:529 + schin:528 + schin:527 nkramer:698 rgs:13254 *************** *** 5564,5580 **** return; ! StringBuffer fileName = new StringBuffer(); ! if (!getProject().getRootFrag().getRoot().equals("")) { ! fileName.append(getProject().getRootFrag().getRoot()); ! fileName.append(File.separatorChar); ! } ! if (!packageName.equals(ANONYMOUS_PACKAGE)) { ! fileName.append(StringSplitter.join(StringSplitter.split(packageName, '.'), File.separatorChar)); ! fileName.append(File.separatorChar); ! } ! fileName.append(trueNameString()); ! fileName.append(".java"); ! ! ExportedFile file = new ExportedFile(this, new File(fileName.toString())); boolean packageWritten = false; --- 5596,5600 ---- return; ! ExportedFile file = new ExportedFile(this, getExportLocation(getProject())); boolean packageWritten = false; *************** *** 7711,7715 **** oldWindow.update(); } else if (window != oldWindow) { ! Console.error("Multi-window move not implemented"); } else if (window.getSelection() != null) { doFragmentMove(window, loc, doCopy); --- 7731,7737 ---- oldWindow.update(); } else if (window != oldWindow) { ! // This message comes up way too frequently and has been getting annoying ! // The entire drag-and-drop support needs to be revisited anyway... ! // Console.error("Multi-window move not implemented"); } else if (window.getSelection() != null) { doFragmentMove(window, loc, doCopy); *************** *** 56772,56776 **** } } ! comp.setClassDirty(); if (comp.trueName.length == 1) ExportMgr.registerExportable(comp); } --- 56794,56800 ---- } } ! // This is getting called too often. However, are there cases where we really ! // want to force the class to be dirty? ! // comp.setClassDirty(); if (comp.trueName.length == 1) ExportMgr.registerExportable(comp); } *************** *** 59059,59063 **** // True if the class or its members has changed since it was last saved. // (This is an export dirty bit, not a database dirty bit) ! private boolean JavaClassFragment.classDirty = true; object rgs:8173 pkg=org.browsecode.javaStuff --- 59083,59087 ---- // True if the class or its members has changed since it was last saved. // (This is an export dirty bit, not a database dirty bit) ! boolean JavaClassFragment.classDirty = true; object rgs:8173 pkg=org.browsecode.javaStuff *************** *** 71016,71019 **** --- 71040,71051 ---- public String defaultView () { return "full"; } }); + result.addElement(new ScalarAttribute("export-location", this) { + public String getValue() { + return exportLocation; + } + public void setValue(String value) { + exportLocation = value; + } + }); return result; } *************** *** 71169,71172 **** --- 71201,71206 ---- inheritListAttribute(old, "exports"); inheritListAttribute(old, "file-headers"); + if (old instanceof JavaClassFragment) + exportLocation = ((JavaClassFragment)old).exportLocation; } } *************** *** 75637,75640 **** --- 75671,75675 ---- if ((flags & 2) != 0) lastExportID = in.readReference(); + exportLocation = in.readUTF(); } object rgs2:128 *************** *** 75653,75656 **** --- 75688,75692 ---- if (!lastExportID.isNull()) out.writeReference(lastExportID); + out.writeUTF(exportLocation); } object rgs2:131 *************** *** 79465,79477 **** section text schin:399 public String FileImportCard.ImportItem.toString() { ! String filePath = file.getAbsolutePath(); ! if (rootImportItem != null) { ! String rootPath = rootImportItem.file.getAbsolutePath(); ! if (this == rootImportItem || filePath.equals(rootPath)) ! return "[Project Root] " + rootPath; ! if (filePath.startsWith(rootPath)) ! return filePath.substring(rootPath.length() + 1, filePath.length()); } - return filePath; } object schin:400 --- 79501,79518 ---- section text schin:399 public String FileImportCard.ImportItem.toString() { ! try { ! String filePath = file.getCanonicalPath(); ! if (rootImportItem != null) { ! String rootPath = rootImportItem.file.getCanonicalPath(); ! if (this == rootImportItem || filePath.equals(rootPath)) ! return "[Project Root] " + rootPath; ! if (filePath.startsWith(rootPath)) ! return filePath.substring(rootPath.length() + 1, filePath.length()); ! } ! return filePath; ! } catch (IOException e) { ! // possible exception from getCanonicalPath... default to getAbsolutePath ! return file.getAbsolutePath(); } } object schin:400 *************** *** 79618,79622 **** for (int i = 0; i < comps.length; i++) SentinelMgr.brandNewFragment(comps[i], project); ! Sheet sheet = new Sheet(State.getObjectDatabase(), file.getName(), "Fragments imported from " + file, exportOptions != NO_EXPORT ? ">classes" : null, comps); SentinelMgr.brandNewFragment(sheet, project); sheet.getContents().makeInteresting(); --- 79659,79663 ---- for (int i = 0; i < comps.length; i++) SentinelMgr.brandNewFragment(comps[i], project); ! Sheet sheet = new Sheet(State.getObjectDatabase(), file.getName(), "Fragments imported from " + file, exportOptions == NO_EXPORT ? null : ">classes", comps); SentinelMgr.brandNewFragment(sheet, project); sheet.getContents().makeInteresting(); *************** *** 80867,80870 **** --- 80908,80974 ---- } } + object schin:526 + pkg=org.browsecode.javaStuff + type=java + section text schin:526 + private String JavaClassFragment.exportLocation = ""; + object schin:527 + pkg=org.browsecode.javaStuff + type=java + section text schin:527 + // This routine can be used to programatically set the export location attribute + // When using this routine be careful to update the GUI display of the attribute + public void JavaClassFragment.setExportLocation (String exportLocation) + { + this.exportLocation = exportLocation; + } + object schin:528 + pkg=org.browsecode.javaStuff + type=java + section text schin:528 + // The location this exportable object will be exported to + // when the export routine is called + // We explicitly pass in the project so this method can be called before this object + // is added to a project. + public File JavaClassFragment.getExportLocation (Project project) + { + StringBuffer fileName = new StringBuffer(); + File basePath = new File(exportLocation); + if (basePath.isAbsolute()) { + fileName.append(exportLocation); + fileName.append(File.separatorChar); + } else if (!project.getRootFrag().getRoot().equals("")) { + basePath = new File(project.getRootFrag().getRoot(), exportLocation); + fileName.append(basePath.getPath()); + fileName.append(File.separatorChar); + } + + if (!packageName.equals(ANONYMOUS_PACKAGE)) { + fileName.append(StringSplitter.join(StringSplitter.split(packageName, '.'), File.separatorChar)); + fileName.append(File.separatorChar); + } + fileName.append(trueNameString()); + fileName.append(".java"); + return new File(fileName.toString()); + } + object schin:529 + pkg=org.browsecode.javaStuff + type=java + section text schin:529 + // This routine attempts to take a path string referring to this Java class, and + // strip off the package directories and file name. If there is not a match, this + // routine will return null; + public String JavaClassFragment.reverseMap(String path) { + StringBuffer fileName = new StringBuffer(); + if (!packageName.equals(ANONYMOUS_PACKAGE)) { + fileName.append(StringSplitter.join(StringSplitter.split(packageName, '.'), File.separatorChar)); + fileName.append(File.separatorChar); + } + fileName.append(trueNameString()); + if (path.endsWith(fileName.toString())) + return path.substring(path.length() - fileName.length()); + else + return null; + } object sjc:1 pkg=org.browsecode.sheets.dicer *************** *** 89247,89250 **** --- 89351,89355 ---- void JavaClassFragment.setClassDirty () { if (trueName.length > 1) { + // handle inner classes JavaClassFragment cls = JavaSentinel.getClass(ownersName(), this, false); if (cls != null) cls.setClassDirty(); *************** *** 98403,98406 **** --- 98508,98515 ---- wlott:2628 rgs:7510 + schin:526 + schin:529 + schin:528 + schin:527 nkramer:698 rgs:13254 |
From: <ox-...@us...> - 2002-07-26 23:27:49
|
Update of /cvsroot/sheets/sheets In directory usw-pr-cvs1:/tmp/cvs-serv25800 Modified Files: ant Log Message: minor fix to unix script Index: ant =================================================================== RCS file: /cvsroot/sheets/sheets/ant,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ant 5 Jul 2002 23:33:22 -0000 1.3 --- ant 26 Jul 2002 23:27:45 -0000 1.4 *************** *** 1,2 **** #! /bin/sh ! java -Xmx128m -classpath $JAVA_HOME/lib/tools.jar:jars/ant.jar org.apache.tools.ant.Main -emacs "$@" --- 1,2 ---- #! /bin/sh ! java -Xmx128m -classpath $JAVA_HOME/lib/tools.jar:jars/antlrall.jar org.apache.tools.ant.Main -emacs "$@" |
From: <min...@us...> - 2002-07-23 02:05:27
|
Update of /cvsroot/sheets/sheets In directory usw-pr-cvs1:/tmp/cvs-serv21444 Modified Files: Sheets.sheets Log Message: Many minor changes: - changed +/- to arrows (basic, but slightly improved) - Fixed status line repaint delay -- it paints when it is updated instead of waiting for spare cycles - Font colors: This is debatable. I changed a few font colors to be slightly less obnoxious -- bright red comments are now dark gray, blending into the code better. This needs to be made consistent with the rest of sheets -- comments in the left class listing panel are still red :( - Other minor things that I've forgotten Index: Sheets.sheets =================================================================== RCS file: /cvsroot/sheets/sheets/Sheets.sheets,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Sheets.sheets 15 Jul 2002 20:44:16 -0000 1.13 --- Sheets.sheets 23 Jul 2002 02:05:21 -0000 1.14 *************** *** 256,259 **** --- 256,269 ---- // subclasses responsible for calling allocateArchivalReference } + object Administrator:3 + pkg=org.browsecode.sheets + type=java + section text Administrator:3 + public static final Color Profile.saveButtonColor = Color.lightGray;//new Color(10, 250, 90); + object Administrator:4 + pkg=org.browsecode.sheets + type=java + section text Administrator:4 + public static final Color Profile.cancelButtonColor = Color.lightGray;//new Color(250, 10, 90); object apowers:0 pkg=org.browsecode.sheets *************** *** 1026,1031 **** public GridConstrainer (Container container) { this.container = container; ! container.setLayout(new GridBagLayout()); ! layout = (GridBagLayout)container.getLayout(); } object nkramer:66 --- 1036,1044 ---- public GridConstrainer (Container container) { this.container = container; ! layout = new GridBagLayout(); ! if (container instanceof JFrame) { ! ((JFrame)container).getContentPane().setLayout(layout); ! } else ! container.setLayout(layout); } object nkramer:66 *************** *** 4703,4708 **** // for IO errors. private synchronized Fragment[] JavaFragmentParser.parseIntoFragments () ! throws IOException ! { // I think the synchronized keyword is at this point purely historical, // but I don't really want to find out the hard way. --- 4716,4720 ---- // for IO errors. private synchronized Fragment[] JavaFragmentParser.parseIntoFragments () ! throws IOException { // I think the synchronized keyword is at this point purely historical, // but I don't really want to find out the hard way. *************** *** 7827,7833 **** if (exportCleanSheets) ! Console.status("Exporting everything."); else ! Console.status("Exporting dirty stuff."); if (!interactive) { // just do it immediately --- 7839,7845 ---- if (exportCleanSheets) ! Console.status("Exporting everything..."); else ! Console.status("Exporting dirty stuff..."); if (!interactive) { // just do it immediately *************** *** 8600,8603 **** --- 8612,8617 ---- sjc:562 sjc:563 + Administrator:3 + Administrator:4 nkramer:6587 nkramer:6562 *************** *** 9143,9147 **** Console.log("Executing " + cmd + " -- output follows:"); ! Console.status("Executing " + cmd); // this hack causes a problem with ChangeCommands (since the return occurs before the command is complete)... need to find a better way to accomplish this (have the execute launch a separate thread, probably) --- 9157,9161 ---- Console.log("Executing " + cmd + " -- output follows:"); ! Console.status("Executing '" + cmd+"'..."); // this hack causes a problem with ChangeCommands (since the return occurs before the command is complete)... need to find a better way to accomplish this (have the execute launch a separate thread, probably) *************** *** 17167,17171 **** type=java section text nkramer:6553 ! public static final Color Profile.commentColor = Color.red; object nkramer:6554 pkg=org.browsecode.sheets --- 17181,17185 ---- type=java section text nkramer:6553 ! public static final Color Profile.commentColor = new Color(90, 70, 90); //used to be Color.red, but it was a bit obnoxious, low-contrast, and caught too much attention. This could be a dark gray, which sorta fades into the background (which is good, comments aren't supposed to more important than code). A slight purple tinge seems to be okay, but this is debatable. object nkramer:6554 pkg=org.browsecode.sheets *************** *** 26869,26873 **** JFileChooser dialog = new JFileChooser(); dialog.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); ! dialog.setDialogTitle("Select File or Direcotry to Import"); int returnVal = dialog.showOpenDialog(getParent()); // does not return until the dialog is closed if (returnVal == JFileChooser.APPROVE_OPTION) { --- 26883,26887 ---- JFileChooser dialog = new JFileChooser(); dialog.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); ! dialog.setDialogTitle("Select File or Directory to Import"); int returnVal = dialog.showOpenDialog(getParent()); // does not return until the dialog is closed if (returnVal == JFileChooser.APPROVE_OPTION) { *************** *** 64405,64408 **** --- 64419,64426 ---- pane.text.setForeground(Profile.black); pane.text.setText(line); + //pane.text.doLayout(); + //pane.text.repaint(); + pane.text.paint(pane.text.getGraphics()); + //System.out.println("new: "+line); } } *************** *** 71260,71264 **** try { ! Console.status("Importing " + file.toString()); return expert.importFile(file, project, makeExported ? ImportTask.EXPORT_RELATIVE : ImportTask.NO_EXPORT, sharedCreations); } --- 71278,71282 ---- try { ! Console.status("Importing \\"" + file.toString()+"\\"..."); return expert.importFile(file, project, makeExported ? ImportTask.EXPORT_RELATIVE : ImportTask.NO_EXPORT, sharedCreations); } *************** *** 80759,80768 **** section text schin:522 public void TextualViewer.paintTreeWidget (Graphics g, int line, int tabWidth, boolean collapse) { ! int height = lineHeight(); int startX = tabWidth - 5; int startY = lineBase(line, 0) + descent(); ! g.drawLine(startX, startY - height / 2, startX + 4, startY - height / 2); if (collapse) g.drawLine(startX + 2, startY - ((height / 2) + 2), ! startX + 2, startY - ((height / 2) - 2)); } object schin:523 --- 80777,80814 ---- section text schin:522 public void TextualViewer.paintTreeWidget (Graphics g, int line, int tabWidth, boolean collapse) { ! int lineHeight = lineHeight(); int startX = tabWidth - 5; int startY = lineBase(line, 0) + descent(); ! g.setColor(Color.darkGray); ! ! /*int minY = startY-height+height/3; ! int middleY = startY-height/2; ! int maxY = startY-height/3;*/ ! int height = lineHeight-2*lineHeight/3; ! int minY = startY-lineHeight+lineHeight/3; ! int middleY = minY+height/2; ! int maxY = minY+height; ! ! int minX=tabWidth-height; ! int middleX = tabWidth-height/2; ! int maxX = tabWidth; ! /*int minX=tabWidth-6; ! int middleX = tabWidth-3; ! int maxX = tabWidth;*/ ! ! if (collapse) { ! // Arrow to the right ! g.drawLine(minX, minY, maxX, middleY); ! g.drawLine(minX, maxY, maxX, middleY); ! g.drawLine(minX, maxY, minX, minY); ! } else { ! // Down arrow ! g.drawLine(minX, minY, middleX, maxY); ! g.drawLine(maxX, minY, middleX, maxY); ! g.drawLine(minX, minY, maxX, minY); ! } ! /*g.drawLine(startX, startY - height / 2, startX + 4, startY - height / 2); if (collapse) g.drawLine(startX + 2, startY - ((height / 2) + 2), ! startX + 2, startY - ((height / 2) - 2));*/ } object schin:523 *************** *** 91721,91726 **** if (isBeingEdited()) { // Draw the commit and abort buttons. ! paintButton(g, "Save", 0, Color.green); ! paintButton(g, "Cancel", BUTTON_WIDTH + BUTTON_GAP, Color.red); } } --- 91767,91772 ---- if (isBeingEdited()) { // Draw the commit and abort buttons. ! paintButton(g, "Save", 0, Profile.saveButtonColor); ! paintButton(g, "Cancel", BUTTON_WIDTH + BUTTON_GAP, Profile.cancelButtonColor); } } *************** *** 94201,94204 **** --- 94247,94252 ---- sjc:562 sjc:563 + Administrator:3 + Administrator:4 nkramer:6559 nkramer:6587 |
From: <ox-...@us...> - 2002-07-15 20:44:23
|
Update of /cvsroot/sheets/sheets/jars In directory usw-pr-cvs1:/tmp/cvs-serv31154/jars Modified Files: bootstrap-sheets.jar Log Message: Minor change to code folding, and removal of a virus in bootstrap-sheets.jar. Index: bootstrap-sheets.jar =================================================================== RCS file: /cvsroot/sheets/sheets/jars/bootstrap-sheets.jar,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvsbn7mkG and /tmp/cvsepETdm differ |
From: <ox-...@us...> - 2002-07-15 20:44:22
|
Update of /cvsroot/sheets/sheets In directory usw-pr-cvs1:/tmp/cvs-serv31154 Modified Files: Sheets.sheets Log Message: Minor change to code folding, and removal of a virus in bootstrap-sheets.jar. Index: Sheets.sheets =================================================================== RCS file: /cvsroot/sheets/sheets/Sheets.sheets,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Sheets.sheets 9 Jul 2002 19:03:47 -0000 1.12 --- Sheets.sheets 15 Jul 2002 20:44:16 -0000 1.13 *************** *** 80710,80713 **** --- 80710,80722 ---- // collapses the lines referred to by index public void RichTextViewer.collapseLines(int start, int end) { + LineSelection range = null; + if (formattedLines != null) { + // Get the current selection, if we can. + ViewPanel pane = getViewPanel(); + ViewerSelection selection = pane == null ? null : pane.getSelection(); + if (selection != null && this == selection.getViewer()) { + range = selectionRange(selection); + } + } for (int i=start; i<=end; i++) { dispLineVisibility[i] = false; *************** *** 80718,80721 **** --- 80727,80755 ---- if (formattedLines != null) { invalidFormatting(start, end + 1); + checkFormatting(); + // Adjust the cursor and selection so that it is outside the collapsed region + if (range != null) { + while (formattedLines[range.end.line] == null) { + // the end cursor is in the region, so push it to the bottom + range.end.line--; + range.end.position = Integer.MAX_VALUE; + while (formattedLines[range.start.line] == null) { + // both cursors are in the region, so push them both to the top + range.start.line--; + range.start.position = Integer.MAX_VALUE; + } + } + while (formattedLines[range.start.line] == null) { + // only the start cursor is in the region, so push it to the bottom + range.start.line++; + range.start.position = 0; + } + } + // Modify the selection to represent the proper region after expansion + if (range != null) { + // First set a point cursor, then extend it. + setCursor(range.start.position, range.start.line, false); + setCursor(range.end.position, range.end.line, true); + } } } *************** *** 80761,80764 **** --- 80795,80807 ---- // collapses the lines referred to by index public void RichTextViewer.expandLines(int start) { + LineSelection range = null; + if (formattedLines != null) { + // Get the current selection, if we can. + ViewPanel pane = getViewPanel(); + ViewerSelection selection = pane == null ? null : pane.getSelection(); + if (selection != null && this == selection.getViewer()) { + range = selectionRange(selection); + } + } int end = start; for (; end<=dispLines.length; end++) { *************** *** 80769,80772 **** --- 80812,80822 ---- if (formattedLines != null) { invalidFormatting(start, end); + checkFormatting(); + // Modify the selection to represent the proper region after expansion + if (range != null) { + // First set a point cursor, then extend it. + setCursor(range.start.position, range.start.line, false); + setCursor(range.end.position, range.end.line, true); + } } } |
From: <ox-...@us...> - 2002-07-09 19:03:56
|
Update of /cvsroot/sheets/sheets/jars In directory usw-pr-cvs1:/tmp/cvs-serv16299/jars Modified Files: bootstrap-sheets.jar Log Message: Added a quick-and-dirty first implementation of code folding. It adds little plus and minus signs to the code which you can use to hide chunks of the code. Useful for editing very large methods. (However, there is still quite a bit of work left to do before this is complete) Also fixed the javac pattern to pick up the new ANT output. For some reason ANT started emitting the absolute path name, which caused sheets to not display error results. Anyway, it is fixed now. Index: bootstrap-sheets.jar =================================================================== RCS file: /cvsroot/sheets/sheets/jars/bootstrap-sheets.jar,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvsedV2rE and /tmp/cvsqIi7Em differ |
From: <ox-...@us...> - 2002-07-09 19:03:56
|
Update of /cvsroot/sheets/sheets In directory usw-pr-cvs1:/tmp/cvs-serv16299 Modified Files: .sheetsrc Sheets.sheets Log Message: Added a quick-and-dirty first implementation of code folding. It adds little plus and minus signs to the code which you can use to hide chunks of the code. Useful for editing very large methods. (However, there is still quite a bit of work left to do before this is complete) Also fixed the javac pattern to pick up the new ANT output. For some reason ANT started emitting the absolute path name, which caused sheets to not display error results. Anyway, it is fixed now. Index: .sheetsrc =================================================================== RCS file: /cvsroot/sheets/sheets/.sheetsrc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** .sheetsrc 18 Jun 2002 21:27:58 -0000 1.2 --- .sheetsrc 9 Jul 2002 19:03:47 -0000 1.3 *************** *** 3,13 **** ########################################## - # This matches JVC's error format - #set error-pattern "([A-Za-z]?:?[-a-zA-Z0-9_\$./\\\\]+)\\(([0-9]+),[0-9]+\\) :(.*)" - # This matches JAVAC's error format - #set error-pattern "([-a-zA-Z_\$./\\\\]+):([0-9]+): (.*)" - # This matches JIKE's error format - set error-pattern "([A-Za-z]?:?[-a-zA-Z0-9_\$./\\\\]+):([0-9]+):[0-9]+:[0-9]+:[0-9]+: (.*)" - set compile-command "ant.bat compile" set recompile-command "ant.bat clean" --- 3,6 ---- Index: Sheets.sheets =================================================================== RCS file: /cvsroot/sheets/sheets/Sheets.sheets,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Sheets.sheets 9 Jul 2002 00:51:07 -0000 1.11 --- Sheets.sheets 9 Jul 2002 19:03:47 -0000 1.12 *************** *** 1272,1276 **** rgs:247 schin:498 - schin:497 rgs:5941 nkramer:133 --- 1272,1275 ---- *************** *** 1343,1346 **** --- 1342,1346 ---- rgs:13395 rgs:13397 + schin:522 object nkramer:123 pkg=org.browsecode.sheets *************** *** 5870,5873 **** --- 5870,5874 ---- rgs2:139 rgs2:153 + schin:523 rgs:6148 rgs:577 *************** *** 9036,9041 **** // Return value is null if no errors are found. private static Sheet CompileDialog.parseErrors(String outString) { ! // Out current regexp library seems to get confused when given big inputs ! // so we'll cut it's food into tiny bite-sized chunks. String[] lines = StringSplitter.splitLines(outString); if (lines.length > 0 && errorSheet == null) { --- 9037,9042 ---- // Return value is null if no errors are found. private static Sheet CompileDialog.parseErrors(String outString) { ! // Out former regexp library seemed to get confused when given big inputs ! // so we cut it's food into tiny bite-sized chunks -- this should be revisited. String[] lines = StringSplitter.splitLines(outString); if (lines.length > 0 && errorSheet == null) { *************** *** 9050,9054 **** for (int j = 0; j < Profile.errorPatterns.size(); j++) { Pattern pat = (Pattern)Profile.errorPatterns.elementAt(j); ! Matcher matcher = pat.matcher(lines[i]); if (matcher.matches()) { String file = matcher.group(1); --- 9051,9055 ---- for (int j = 0; j < Profile.errorPatterns.size(); j++) { Pattern pat = (Pattern)Profile.errorPatterns.elementAt(j); ! Matcher matcher = pat.matcher(line); if (matcher.matches()) { String file = matcher.group(1); *************** *** 10614,10618 **** errorPatterns.addElement(Pattern.compile("([A-Za-z]?:?[-a-zA-Z0-9.$_/\\\\\\\\]+)\\\\(([0-9]+),[0-9]+\\\\) :(.*)")); // JAVAC error format ! errorPatterns.addElement(Pattern.compile("([-a-zA-Z0-9.$_/\\\\\\\\]+):([0-9]+): (.*)")); // JIKE's error format errorPatterns.addElement(Pattern.compile("([A-Za-z]?:?[-a-zA-Z0-9_$./\\\\\\\\]+):([0-9]+):[0-9]+:[0-9]+:[0-9]+: (.*)")); --- 10615,10619 ---- errorPatterns.addElement(Pattern.compile("([A-Za-z]?:?[-a-zA-Z0-9.$_/\\\\\\\\]+)\\\\(([0-9]+),[0-9]+\\\\) :(.*)")); // JAVAC error format ! errorPatterns.addElement(Pattern.compile("([A-Za-z]?:?[-a-zA-Z0-9.$_/\\\\\\\\]+):([0-9]+): (.*)")); // JIKE's error format errorPatterns.addElement(Pattern.compile("([A-Za-z]?:?[-a-zA-Z0-9_$./\\\\\\\\]+):([0-9]+):[0-9]+:[0-9]+:[0-9]+: (.*)")); *************** *** 54693,54698 **** type=java section text rgs:6148 ! public void JavaViewer.middleClick ! (ViewerSelection sel, int selectionKind, int absY) { LinePosition range = selectionCursor(sel); --- 54694,54698 ---- type=java section text rgs:6148 ! public void JavaViewer.middleClick (ViewerSelection sel, int selectionKind, int absY) { LinePosition range = selectionCursor(sel); *************** *** 71601,71606 **** // They did. So we need to adjust each of them accordingly. for (int line = at + count; line < dispLines.length; line++) ! if (formattedLines[line] != null) formattedLines[line].adjustY(delta); if (oldHeight != -1) { // And we also need to adjust the total height and invalidate the --- 71601,71607 ---- // They did. So we need to adjust each of them accordingly. for (int line = at + count; line < dispLines.length; line++) ! if (formattedLines[line] != null) { formattedLines[line].adjustY(delta); + } if (oldHeight != -1) { // And we also need to adjust the total height and invalidate the *************** *** 80467,80476 **** return -1; } - object schin:497 - pkg=org.browsecode.sheets - type=java - section text schin:497 - // True if the corresponding display line is visible, false if it is hidden - public boolean[] TextualViewer.dispLineVisibility; object schin:498 pkg=org.browsecode.sheets --- 80468,80471 ---- *************** *** 80479,80489 **** public void TextualViewer.setDispLines(String[] dispLines) { this.dispLines = dispLines; - if (dispLines == null) - dispLineVisibility = null; - else { - dispLineVisibility = new boolean[dispLines.length]; - for (int i=0; i<dispLines.length; i++) - dispLineVisibility[i] = true; - } } object schin:500 --- 80474,80477 ---- *************** *** 80694,80697 **** --- 80682,80774 ---- return paintGraphics.getFontMetrics(); } + object schin:519 + pkg=org.browsecode.sheets + type=java + section text schin:519 + // True if the corresponding display line is visible, false if it is hidden + public boolean[] RichTextViewer.dispLineVisibility; + object schin:520 + pkg=org.browsecode.sheets + type=java + section text schin:520 + // Makes sure that dispLineVisibility is properly updated when dispLines is set + public void RichTextViewer.setDispLines(String[] dispLines) { + super.setDispLines(dispLines); + if (dispLines == null) + dispLineVisibility = null; + else { + dispLineVisibility = new boolean[dispLines.length]; + for (int i=0; i<dispLines.length; i++) { + dispLineVisibility[i] = true; + } + } + } + object schin:521 + pkg=org.browsecode.sheets + type=java + section text schin:521 + // collapses the lines referred to by index + public void RichTextViewer.collapseLines(int start, int end) { + for (int i=start; i<=end; i++) { + dispLineVisibility[i] = false; + if (formattedLines != null) { + formattedLines[i] = null; + } + } + if (formattedLines != null) { + invalidFormatting(start, end + 1); + } + } + object schin:522 + pkg=org.browsecode.sheets + type=java + section text schin:522 + public void TextualViewer.paintTreeWidget (Graphics g, int line, int tabWidth, boolean collapse) { + int height = lineHeight(); + int startX = tabWidth - 5; + int startY = lineBase(line, 0) + descent(); + g.drawLine(startX, startY - height / 2, startX + 4, startY - height / 2); + if (collapse) g.drawLine(startX + 2, startY - ((height / 2) + 2), + startX + 2, startY - ((height / 2) - 2)); + } + object schin:523 + pkg=org.browsecode.javaStuff + type=java + section text schin:523 + public void JavaViewer.leftClick (ViewerSelection loc, int selectionKind, int absX, int absY) + { + int line = mapXY(loc.getStartPoint().x, loc.getStartPoint().y).line; + int openBrace = dispLines[line].indexOf('{'); + int closeBrace = dispLines[line].indexOf('}'); + int tabPosition = StringSplitter.skipChars(dispLines[line], ' ') * getViewPainter().getMetrics().charWidth(' '); + if (line + 1 < dispLines.length && openBrace != -1 && closeBrace == -1 && loc.getStartPoint().x < tabPosition) { + if (!dispLineVisibility[line + 1]) + expandLines(line + 1); + else { + int beginIndex = getTokenMgr().tokenIndex(line, openBrace + 1); + int endIndex = getTokenMgr().balanceLBrace(beginIndex + 1); + Token token = getTokenMgr().tokenAt(endIndex); + collapseLines(line + 1, token.beginLine); + } + } else { + super.leftClick(loc, selectionKind, absX, absY); + } + } + object schin:524 + pkg=org.browsecode.sheets + type=java + section text schin:524 + // collapses the lines referred to by index + public void RichTextViewer.expandLines(int start) { + int end = start; + for (; end<=dispLines.length; end++) { + if (dispLineVisibility[end] == true) + break; + dispLineVisibility[end] = true; + } + if (formattedLines != null) { + invalidFormatting(start, end); + } + } object sjc:1 pkg=org.browsecode.sheets.dicer *************** *** 90275,90278 **** --- 90352,90359 ---- rgs:13360 rgs:13446 + schin:519 + schin:520 + schin:521 + schin:524 object wlott:3017 pkg=org.browsecode.sheets *************** *** 90511,90515 **** if (formattedLines == null) { ! if (textHeight != -1) Console.internalError("bad textHeight"); formattedLines = new FormattedLine[dispLines.length]; reformatLines(0, dispLines.length); --- 90592,90596 ---- if (formattedLines == null) { ! if (textHeight != -1) Console.internalError("bad textHeight"); formattedLines = new FormattedLine[dispLines.length]; reformatLines(0, dispLines.length); *************** *** 90559,90563 **** break; ScreenLine screenLine = formattedLine.screenLines; ! while (screenLine.baseline + screenLine.descent <= top) screenLine = screenLine.next; while (screenLine != null --- 90640,90644 ---- break; ScreenLine screenLine = formattedLine.screenLines; ! while (screenLine != null && screenLine.baseline + screenLine.descent <= top) screenLine = screenLine.next; while (screenLine != null *************** *** 91392,91396 **** // past the beginning or end of the selected line. protected LinePosition RichTextViewer.mapXY ! (int x, int y, boolean adjustX) { if (formattedLines == null) --- 91473,91477 ---- // past the beginning or end of the selected line. protected LinePosition RichTextViewer.mapXY ! (int x, int y) { if (formattedLines == null) *************** *** 92367,92371 **** break; ScreenLine screenLine = formattedLine.screenLines; ! while (screenLine.baseline + screenLine.descent <= top) screenLine = screenLine.next; while (screenLine != null --- 92448,92452 ---- break; ScreenLine screenLine = formattedLine.screenLines; ! while (screenLine != null && screenLine.baseline + screenLine.descent <= top) screenLine = screenLine.next; while (screenLine != null *************** *** 92431,92434 **** --- 92512,92531 ---- paintArrow(g, i, Color.blue); } + boolean firstBrace = true; + for (int i = 0; i < dispLines.length; i++) { + if (dispLineVisibility[i] == false) + continue; + int openBrace = dispLines[i].indexOf('{'); + int closeBrace = dispLines[i].indexOf('}'); + if (openBrace != -1 && closeBrace == -1) { + if (firstBrace) { + firstBrace = false; + continue; + } + int tabWidth = StringSplitter.skipChars(dispLines[i], ' ') * g.getFontMetrics().charWidth(' '); + boolean nextLineHidden = i + 1 < dispLines.length && !dispLineVisibility[i + 1]; + paintTreeWidget(g, i, tabWidth, nextLineHidden); + } + } } object wlott:3374 *************** *** 95621,95629 **** rgs:153 rgs:247 - schin:497 schin:498 rgs:5941 nkramer:133 wlott:3213 nkramer:27628 nkramer:134 --- 95718,95726 ---- rgs:153 rgs:247 schin:498 rgs:5941 nkramer:133 wlott:3213 + schin:522 nkramer:27628 nkramer:134 *************** *** 101816,101819 **** --- 101913,101917 ---- rgs2:153 rgs:13390 + schin:523 rgs:6148 rgs:577 *************** *** 105261,105264 **** --- 105359,105366 ---- wlott:3217 wlott:3017 + schin:519 + schin:520 + schin:521 + schin:524 wlott:3090 schin:495 |
From: <ox-...@us...> - 2002-07-09 00:51:13
|
Update of /cvsroot/sheets/sheets In directory usw-pr-cvs1:/tmp/cvs-serv19588 Modified Files: Sheets.sheets Log Message: Added preliminary support for code folding (nothing user visible yet). This is also a test of the syncmail cvs reporting... Index: Sheets.sheets =================================================================== RCS file: /cvsroot/sheets/sheets/Sheets.sheets,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Sheets.sheets 5 Jul 2002 23:33:21 -0000 1.10 --- Sheets.sheets 9 Jul 2002 00:51:07 -0000 1.11 *************** *** 1271,1274 **** --- 1271,1276 ---- rgs:153 rgs:247 + schin:498 + schin:497 rgs:5941 nkramer:133 *************** *** 1600,1604 **** { super(fragment); ! dispLines = lines; } object nkramer:144 --- 1602,1606 ---- { super(fragment); ! setDispLines(lines); } object nkramer:144 *************** *** 62110,62114 **** public void AbstractSheetViewer.invalidate (String attribute) { super.invalidate(attribute); ! dispLines = ((Sheet)getActualFragment()).toLines(Fragment.FULL); } object rgs:10247 --- 62112,62116 ---- public void AbstractSheetViewer.invalidate (String attribute) { super.invalidate(attribute); ! setDispLines(((Sheet)getActualFragment()).toLines(Fragment.FULL)); } object rgs:10247 *************** *** 62118,62122 **** public void TOCSheetViewer.invalidate (String attribute) { super.invalidate(attribute); ! dispLines = ((Sheet)getActualFragment()).toLines(Fragment.SHORT_NAME); } object rgs:10264 --- 62120,62124 ---- public void TOCSheetViewer.invalidate (String attribute) { super.invalidate(attribute); ! setDispLines(((Sheet)getActualFragment()).toLines(Fragment.SHORT_NAME)); } object rgs:10264 *************** *** 68554,68558 **** section text rgs:12571 public void AttributeViewer.stopEditing (boolean restore) { ! if (buffer != null && restore) dispLines = buffer.oldLines; super.stopEditing(restore); } --- 68556,68560 ---- section text rgs:12571 public void AttributeViewer.stopEditing (boolean restore) { ! if (buffer != null && restore) setDispLines(buffer.oldLines); super.stopEditing(restore); } *************** *** 71580,71590 **** // Setup the line formatter. ! LineFormatter formatter ! = new LineFormatter(this, at == 0 ? 0 : formattedLines[at-1].bottom); // Format the lines. ! for (int line = at; line < at + count; line++) ! formattedLines[line] ! = formatter.formatLine(dispLines[line], styleMap.stylesAt(line, 0)); // Are there any pre-formatted lines after the lines we just formatted? if (at + count < dispLines.length) { // Yes, see if they moved at all. --- 71582,71598 ---- // Setup the line formatter. ! int previousLine = at - 1; ! while (previousLine >= 0 && formattedLines[previousLine] == null) ! previousLine--; // find the previous line that is visible ! LineFormatter formatter = new LineFormatter(this, previousLine == -1 ? 0 : formattedLines[previousLine].bottom); // Format the lines. ! for (int line = at; line < at + count; line++) { ! if (!dispLineVisibility[line]) ! continue; ! formattedLines[line] = formatter.formatLine(dispLines[line], styleMap.stylesAt(line, 0)); ! } // Are there any pre-formatted lines after the lines we just formatted? + while (at + count < dispLines.length && formattedLines[at+count] == null) + count++; // skip over hidden lines if (at + count < dispLines.length) { // Yes, see if they moved at all. *************** *** 71593,71597 **** // They did. So we need to adjust each of them accordingly. for (int line = at + count; line < dispLines.length; line++) ! formattedLines[line].adjustY(delta); if (oldHeight != -1) { // And we also need to adjust the total height and invalidate the --- 71601,71606 ---- // They did. So we need to adjust each of them accordingly. for (int line = at + count; line < dispLines.length; line++) ! if (formattedLines[line] != null) ! formattedLines[line].adjustY(delta); if (oldHeight != -1) { // And we also need to adjust the total height and invalidate the *************** *** 80431,80434 **** --- 80440,80490 ---- searchText = text; } + object schin:495 + pkg=org.browsecode.sheets + type=java + section text schin:495 + private FormattedLine[] RichTextViewer.getVisibleFormattedLines() + { + int visible = 0; + for (int i=0; i<formattedLines.length; i++) + if (formattedLines[i] != null) + visible++; + FormattedLine[] visibleLines = new FormattedLine[visible]; + for (int i=0, j=0; i<formattedLines.length; i++) + if (formattedLines[i] != null) + visibleLines[j++] = formattedLines[i]; + return visibleLines; + } + object schin:496 + pkg=org.browsecode.sheets + type=java + section text schin:496 + private int RichTextViewer.getFormattedLineIndex(FormattedLine line) + { + for (int i=0; i<formattedLines.length; i++) + if (formattedLines[i] == line) + return i; + return -1; + } + object schin:497 + pkg=org.browsecode.sheets + type=java + section text schin:497 + // True if the corresponding display line is visible, false if it is hidden + public boolean[] TextualViewer.dispLineVisibility; + object schin:498 + pkg=org.browsecode.sheets + type=java + section text schin:498 + public void TextualViewer.setDispLines(String[] dispLines) { + this.dispLines = dispLines; + if (dispLines == null) + dispLineVisibility = null; + else { + dispLineVisibility = new boolean[dispLines.length]; + for (int i=0; i<dispLines.length; i++) + dispLineVisibility[i] = true; + } + } object schin:500 pkg=org.browsecode.antlr *************** *** 89274,89278 **** public TOCSheetViewer (Sheet sheet, boolean topLevel) { super(sheet, "toc", VectorUtils.make("toc"), !topLevel); ! dispLines = ((Sheet)getActualFragment()).toLines(Fragment.SHORT_NAME); if (topLevel) showWith("sheet contents"); this.topLevel = topLevel; --- 89330,89334 ---- public TOCSheetViewer (Sheet sheet, boolean topLevel) { super(sheet, "toc", VectorUtils.make("toc"), !topLevel); ! setDispLines(((Sheet)getActualFragment()).toLines(Fragment.SHORT_NAME)); if (topLevel) showWith("sheet contents"); this.topLevel = topLevel; *************** *** 90155,90159 **** (String[] newLines, int at, int replace, int with, boolean restyleToEnd) { ! dispLines = newLines; if (replace != with) invalidate(); --- 90211,90215 ---- (String[] newLines, int at, int replace, int with, boolean restyleToEnd) { ! setDispLines(newLines); if (replace != with) invalidate(); *************** *** 90176,90179 **** --- 90232,90237 ---- wlott:3017 wlott:3090 + schin:495 + schin:496 wlott:3556 rgs:13359 *************** *** 90282,90286 **** } // Record the new dispLines. ! dispLines = newLines; // Make sure the style map exists and has the right number of lines. if (styleMap != null) { --- 90340,90344 ---- } // Record the new dispLines. ! setDispLines(newLines); // Make sure the style map exists and has the right number of lines. if (styleMap != null) { *************** *** 90496,90499 **** --- 90554,90559 ---- line++) { FormattedLine formattedLine = formattedLines[line]; + if (formattedLine == null) + continue; if (formattedLine.top >= bottom) break; *************** *** 91247,91251 **** --- 91307,91315 ---- return 0; LineItem item = findLineItem(line, posn); + if (item == null) + return 0; FormattedLine fline = formattedLines[line]; + if (fline == null) + return 0; return item.x + item.width(this, fline.chars, fline.bytes, posn - item.posn + 1); *************** *** 91261,91265 **** --- 91325,91333 ---- return 0; LineItem item = findLineItem(line, posn); + if (item == null) + return 0; FormattedLine fline = formattedLines[line]; + if (fline == null) + return 0; return item.x + item.width(this, fline.chars, fline.bytes, posn - item.posn); } *************** *** 91276,91279 **** --- 91344,91349 ---- return 0; ScreenLine sline = findScreenLine(line, posn); + if (sline == null) + return 0; return sline.baseline - sline.ascent; } *************** *** 91290,91293 **** --- 91360,91365 ---- return 0; ScreenLine sline = findScreenLine(line, posn); + if (sline == null) + return 0; return sline.baseline + sline.descent; } *************** *** 91303,91306 **** --- 91375,91380 ---- if (formattedLines == null) return null; FormattedLine fline = formattedLines[line]; + if (fline == null) + return null; ScreenLine sline = fline.screenLines; while (posn >= sline.length && sline.next != null) { *************** *** 91328,91331 **** --- 91402,91407 ---- line = formattedLines.length - 1; FormattedLine fline = formattedLines[line]; + if (fline == null) + return new LinePosition(0, 0); ScreenLine sline = fline.screenLines; while (y >= sline.baseline + sline.descent && sline.next != null) *************** *** 91424,91428 **** if (formattedLines == null) return 0; ! return findScreenLine(line, posn).baseline; } object wlott:3186 --- 91500,91507 ---- if (formattedLines == null) return 0; ! ScreenLine screenLine = findScreenLine(line, posn); ! if (screenLine == null) ! return 0; ! return screenLine.baseline; } object wlott:3186 *************** *** 91447,91456 **** private int RichTextViewer.findLine (int y) { if (formattedLines == null) return 0; int min = 0; ! int max = formattedLines.length; while (min < max) { int mid = (min + max) / 2; ! FormattedLine fline = formattedLines[mid]; if (y < fline.top) max = mid; --- 91526,91541 ---- private int RichTextViewer.findLine (int y) { + if (y < 0) + return -1; + else if (y >= textHeight) + return formattedLines.length; + if (formattedLines == null) return 0; + FormattedLine[] visibleLines = getVisibleFormattedLines(); int min = 0; ! int max = visibleLines.length; while (min < max) { int mid = (min + max) / 2; ! FormattedLine fline = visibleLines[mid]; if (y < fline.top) max = mid; *************** *** 91458,91469 **** min = mid + 1; else ! return mid; } ! if (y < 0) ! return -1; ! else if (y >= textHeight) ! return formattedLines.length; ! else ! throw new Error(y + " is in 0.." + textHeight + " but isn't in a line?"); } object wlott:3195 --- 91543,91550 ---- min = mid + 1; else ! return getFormattedLineIndex(fline); } ! ! throw new Error(y + " is in 0.." + textHeight + " but isn't in a line?"); } object wlott:3195 *************** *** 91923,91926 **** --- 92004,92009 ---- private LineItem RichTextViewer.findLineItem (ScreenLine sline, int posn) { + if (sline == null) + return null; LineItem item = sline.firstItem; while (posn >= item.posn + item.length && item.next != null) *************** *** 91997,92000 **** --- 92080,92085 ---- // The full logical lines between the start and end lines. for (int line = sel.start.line + 1; line < sel.end.line; line++) { + if (formattedLines[line] == null) + continue; // skip hidden lines for (ScreenLine sline = formattedLines[line].screenLines; sline != null; *************** *** 92009,92015 **** } // The screen lines in the end logical line before the end screen line. ! for (ScreenLine sline = formattedLines[sel.end.line].screenLines; ! sline != endLine; ! sline = sline.next) { int posn = sline.firstItem.posn; int x1 = charStart(sel.end.line, posn); --- 92094,92098 ---- } // The screen lines in the end logical line before the end screen line. ! for (ScreenLine sline = formattedLines[sel.end.line].screenLines; sline != endLine; sline = sline.next) { int posn = sline.firstItem.posn; int x1 = charStart(sel.end.line, posn); *************** *** 92279,92282 **** --- 92362,92367 ---- line++) { FormattedLine formattedLine = formattedLines[line]; + if (formattedLine == null) + continue; if (formattedLine.top >= bottom) break; *************** *** 95536,95539 **** --- 95621,95626 ---- rgs:153 rgs:247 + schin:497 + schin:498 rgs:5941 nkramer:133 *************** *** 100091,100095 **** nkramer:30979 nkramer:30596 ! schin:495 lightWeight:separator ram:2493 --- 100178,100182 ---- nkramer:30979 nkramer:30596 ! schin:513 lightWeight:separator ram:2493 *************** *** 104251,104275 **** schin:155 schin:156 - object schin:495 - filename=>menu - title=ANTLR package - type=sheet - section text schin:495 - ANTLR package - section components schin:495 - schin:499 - schin:498 - object schin:498 - filename=>classes - title=ANTLR Fragments - type=sheet - section text schin:498 - ANTLR Fragments - section components schin:498 - schin:500 - lightWeight:separator - schin:514 - schin:515 - schin:516 object schin:499 filename=>classes --- 104338,104341 ---- *************** *** 104293,104296 **** --- 104359,104383 ---- schin:511 schin:512 + object schin:513 + filename=>menu + title=ANTLR package + type=sheet + section text schin:513 + ANTLR package + section components schin:513 + schin:499 + schin:518 + object schin:518 + filename=>classes + title=ANTLR Fragments + type=sheet + section text schin:518 + ANTLR Fragments + section components schin:518 + schin:500 + lightWeight:separator + schin:514 + schin:515 + schin:516 object sjc:6 filename=>classes *************** *** 105175,105178 **** --- 105262,105267 ---- wlott:3017 wlott:3090 + schin:495 + schin:496 rgs:13446 wlott:3556 |