******************************************************************************** * Dick Chase's Java Editor Readme * * Version: 2.03 - August 11, 1996 * * Copyright: Copyright © 1996, Richard L. Chase - All Rights Reserved. * * Java(tm) is a trademark of Sun Microsystems. * * Delphi(tm) is a trademark of Borland International. * * Netscape(tm) is a trademark of Netscape Communications Corporation. * * Other trademarks are the trademarks of those owning the trademark, except * * for those rare cases where the trademark is owned by those who don't * * own the trademark, in which case the trademark is owned by someone else * * entirely, unless they happen to be the same, in which case the trademark * * is owned by both of them. * ******************************************************************************** NOTE: this is a 32 bit application and will work *only* with Windows 95 and Windows NT General Description: ==================== A simple MDI text editor for editing Java source code. Compile your java source and load html files from within the editor. Editing Files: Works just like notepad, except you can have several files open at once. Compiling Java: Clicking on the 'Compile Java' button compiles the source in the active window. A panel in text window opens to display the compiler results. Double-Clicking on an error line highlights the corresponding line in your code. Running HTML: Clicking on the 'Load Web Browser' button loads the contents of the open window into your web browser. Changes from v2.02: ================== Bug fixes: ---------- Bug: A Windows Application Error would occur when trying to save a new file without a project being open. The file would still be saved, however, despite the error. Analysis: I goofed (tried to add the file to the active project when none existed). Fix: I recognized my limitations as a human being and worked within those constraints (don't try to add the document to a project if none exists). Enhancements: ------------- Editor window & Font colors: You can now change the colors of the editor window and the text font. Known Problems: --------------- It's been reported that a windows error is generated if you start JavaEdit when you have no printer installed in Windows 95. I have no idea why this happens (it probably has something to do with the creation of the Delphi printer dialog component), but it doesn't seem to have any serious consequences. Thus, I don't see a need to investigate this furthur. If you are having this problem, and it's preventing you from using JavaEdit, let me know & I will attempt to fix it. Also, see the NT 3.X problem noted in 2.01 below. Changes from v2.01: ================== Bug fixes: ---------- Bug: In general, a lot of things didn't work with NT 3.5X. Analysis: See "Known Problems" for 2.01 below. Fix: I replaced the RichEdit control with a plain edit control and added new search/replace & printing code. This should fix the problems reported with NT. Of course, I could be wrong, as I don't have NT available to me for testing. If you are using NT and find any problems, please let me know, as I do want this to work well with NT. Bug: Printing doesn't work. Analysis: Someone forgot to actually enter the code to print a document. Fix: Someone entered the code to print a document and actually tried to print something to be sure it worked. Bug If you tried to use replace all to replace a string with a new string that contained the string being replaced, you'd be caught in an infinite loop. Analysis: I never though of that one. The code simply kept looking for all instances of the search string and replacing them with the new string. If the new string contained the search string, the search string would always be found. Fix: I now stop the loop after one circuit through the document. WARNING: "Replace All" *always starts at the beginning of the document*. Thus, if you do a Search/Replace with a replace string that contains the search string one or more times and then choose to "Replace All", the search strings within the replaced strings will be replaced again. Enhancements: ------------- Auto Indent: If you press return, the cursor is brought to the same position on the next line as the first character on the current line. Known Problems: --------------- There will still be a problem with handling projects on NT versions earlier than 4.0. I use a Win95 style control to display and manage projects, and can't really replace it without either a huge coding effort or a dramatic change in the way projects are visually handled. To be honest, I don't see having the time to do this for a few months. Changes from v2.0: ================== Bug fixes: ---------- Bug: Dropping a file from windows on the project manager adds the file to the project, but dropping files on Javaedit's executable or icon, or dropping a file in javaedit's main window does not open the dropped file(s). Analysis: The code was there, but I put it in the wrong place. Fix: I put the code in the right place and performed the novel task of actually testing it . Enhancements: ------------- None. Modifications: -------------- None. Known Problems: --------------- It doesn't work well with NT 3.5X because of the use of the new windows RichTextEdit control. It should work fine with NT 4.0 which has the new control. I'm going to try to fix this by using the generic edit control, but I use the native Search and replace methods of RichTextEdit, so it may take me a little while to duplicate the functionality with my own code. Changes from v1.0: ================== Bug fixes: ---------- Bug: Not all or no compiler errors were being reported. Analysis: The output from the compiler was being directed into an in-memory stream. For some reason, especially on fast machines, only the first few lines, if any, were received. Fix: Directing the output to a file stream solves this problem. I have no idea if it was a Delphi or a Windows problem. Bug: Browser would not launch from editor. Analysis: Something is incorrect or missing in the CURRENT_USER section of the Win95 registry. Fix: You can now also enter the location of your browser manually in the application settings dialog (File|Configure Editor, External Applications Tab). NOTE: You can also use the Java appletviewer instead of a browser by entering the complete path to appletviewer.exe. Enhancements: ------------- Projects: Files can now be grouped into projects. An explorer-like project manager provides iconic or list views of project files and compiler settings for the project. You can add files with drag and drop, and compile Java files or load html files in you browser directly from the project manager. Compile without saving: you can compile Java source code or load html text in a browser without saving it first. Jump to errors: Double-Clicking on a compiler error highlights the correspondin line in your code. Run Java: you can now run java applications directly from the editor. "Run|Run Java" opens a dialog where you can enter a command line to pass to the Java interpreter. Running the Java appletviewer: Ok, this really isn't an enhancement, but is made possible because of a bug fix. Because you can now manually set your browser, entering the path to appletviewer.exe in the browser setting will load an html file in the Java appletviewer. Tab Settings: Pressing the tab key now insert spaces instead of the ascii tab character. The number of settings is configurable (File|Configure Editor). The default is 4 spaces. Modifications: -------------- Because of the new project orientation, Applications settings have been split between tha application and projects. Project Settings (Compiler options & Project Files): Select View|Project Manager Application Settings (Font, program locations): Select File|Configure Editor Known Problems: --------------- By default, if Netscape is your browser, the editor uses DDE to load html files in the browser. This way, only one instance of Netscape is loaded in relation to the editor so that each time you "Load in Browser", Netscape simply replaces the document in that window. There appears to be a bug in either my code, Delphi's DDE control or Netscape, however: if you "Load in Browser" when Netscape is not already started, Netscape starts, but the document fails to load. With the next "Load in Browser", a new Netscape window is created and the document loads in that window. Subsequent "Load in Browser" actions replace the document in that window. Work-arounds to this problem are: 1) Start Netscape before any "Load in Browser" actions. 2) When loading an html document in Netscape during a JavaEdit session when Netscape is not already open, do it twice and then close the first Netscape window. 3) An option in the application settings is "Use DDE with Netscape". Uncheck this and "Load in Browser" will load your document by command line parameter instead of DDE. Of course, this means that each "Load in Browser" action will result in a new Netscape window. I can see why this could actually be considered a good thing, so we'll just call this a feature rather than a work-around . Guarantee/Warranty: =================== There are no guarantees or warranties in life, and there are none for this application either. BY USING DICK CHASE'S JAVA EDITOR YOU AGREE THAT YOU ARE DOING SO ENTIRELY AT YOUR OWN RISK. License: ======== This is being distributed as freeware. This means you don't owe the author anything for rights to use this application. This doesn't mean you own the application, though. The author retains all rights to the application, you just have the right to use it. You also have the right to freely distribute this application, as long as you do not charge anything for it and this Readme.txt file is included. If you do like the application, the author would appreciate it if you let him know with a simple e-mail message. Heck, he'd even like to know if you don't like the application. Of course, if you really want to send the author money (or donate to a charity or send a postcard from an exotic locale), the author will most likely accept it :) Installation: ------------- Copy javaedit.exe to some directory and run it. To compile Java sources, you need to tell the application where the Java compiler is on your machine: Select File|Configure Editor. Select the 'Java Compiler' page. Enter the path to the Java compiler (javac.exe). To load html files into your browser, the application needs to know the location of your browser. If you have Netscape 2.0 installed, the application should find it automatically via info in your Win95 registry. If it doesn't, you can manually enter the path to your browser: Select Edit|Settings. Select the 'Java Compiler' page. Enter the path to the Java compiler (javac.exe). Future Plans: ------------- Word's too cumbersome for editing simple text and it's a royal pain to edit several sources with word pad. Then you have to open a Dos Window to compile. So this editor solves a current need for me. I hope you find it useful too. Unless there's a strong demand, I'm probably not going to develop any new versions of JavaEdit. Work is getting busy and complete visual IDEs are due out very shortly. ***I WILL fix any bugs that are reported*** (or at least try ). So far I have only tested this version myself, so I'm sure there may be some things that won't work on some people's machine's/configurations. I will also consider recommendations for enhancements, but I make no promises (note: syntax highlighting has been a common request. I started working on it, but to do it well will take much more time than is available to me (the code's easy, but mapping out java syntax for parsing, especially in such an extensible language, is simply beyond the scope of a spare-time project). JavaEdit was built with Delphi 2.0. If you want to enhance it, at the risk of great embarassment, I am willing to provide the source code. There are a few caveats to this offer, however: 1) I retain all rights to and ownership of any code provided by me. 2) The code comes with no warranties of any kind. 3) Any software created with any or all of the JavaEdit source code provided by me may NOT be sold for any renumeration of any kind without my express written permission. (Hey, I don't want any money for my application, but if you make money with help from my work, I'd like a cut). 4) I'm notified and provided the opportunity to get a free copy of whatever software is created with the code. Contacting Me (Dick Chase): e-mail: Internet - dchase@tiac.net (Read almost daily) CIS - 72420,2703 (Read at least weekly) Regular Mail: 24 Rennie Drive Blackstone, MA 01504 **END README**