                         WingEditor 1.6 Users' Guide

                           by WingSoft Corporation
                           (Last Updated: 1/18/99)

  1.  Introduction to WingEditor

     WingEditor is a simple Java Development Environment, implemented
     completely in Java. It is more than an Editor, it provides a Java
     oriented editor environment, error-browser-capable compiler
     environment, a GUI debugger environment. It also provides utilities
     such as indentation formatting and interfaces to WingDis decompiler.

  2. System Requirements

     WingEditor 1.6 only works with JavaSoft's JDK 1.1 + Swing 1.1 or JDK
     1.2.
     Before using WingEditor, JDK1.1 + Swing 1.1 or JDK1.2 should be
     installed.

     If you have installed JDK1.1 + Swing 1.1, you should modify the
     classpath to include both JDK 1.1 classes.zip and Swing packages
     (swingall.jar).

     If you have JDK1.2 installed, you should modify the classpath to
     include the tools package since JDK1.2 JVM does not automatically put
     tools.jar on the classpath. WingEditor requires tools.jar on the
     classpath to work appropriately.

     Visit http://www.javasoft.com for details about how to download the JDK
     1.1, Swing 1.1 or JDK 1.2 from JavaSoft. If your systems are not
     supported by Javasoft, please download a compatible version from other
     vendors.

     WingEditor 1.6 has been tested on Solaris and Windows 32 systems,
     although it should work on other platforms with  compatible JDK
     supported, we haven't done any testing. Also, for Solaris systems, it
     might requires some patches to make JDK 1.2 work right, please refer
     the JavaSoft website for details.

  3. WingEditor Command Line

     The following command will invoke the WingEditor,

           java wingsoft.Javaeditor [Files]

     You can specify multiple files by either putting multiple file names or
     use *, ? and [, ] in a file name. WingEditor will bring up a window
     with the first file loaded, you can go to the File Menu and select Next
     for editing the next file.

     If Files are omitted, WingEditor will open the project being visited
     last time, or a new project window if WingEditor is used for the very
     first time.

  4. WingEditor's Editor Environment

     Editor Window consists of Menu Bar, Button Bar, Text Window, and a
     Status/Message Bar.

        o 4.1. Menu Bar

          Menu Bar consists of File, Project, Edit, Build, View, Util, Goto,
          Window and Help menu.

          File Menu consists of the following menu items,

              . New - create a new file

              . Open - open an existing file

              . Load - load a file into the current window

              . Reload - reload the current file

              . Save - save to the current file

              . Save as - save to a specific file

              . Next - edit next file if multiple files are specified

              . Close - close this window

              . Close All Files - close all editor windows, Project windows
          will not be closed.

              . Close All & Exit - close all windows. All changes will be
          saved.

              . Discard All & Exit - close all windows. Any changes will be
          discarded.

          File Menu also tracks the history of your editing, the latest four
          of your edited files are listed following the normal File menu
          items.

        o Edit Menu consists of the following menu items,

              . Cut - cut the selected area and copy to the clip board

              . Paste - paste the clip board

              . Copy - copy the selected area to the clip board

              . DeleteLine - delete the current line

              . Redo - redo the last undoed editing

              . Undo - undo the last delete or cut or insertion

              . Find - search a string in the current file

              . Replace - replace a string in the current file

              . Repeat - repeat the last find or replace

              . Insert file - insert a file at the location where the cursor
          appears

          Project Menu consists of the following menu items,

              . New Project - create a new project

              . Edit Project - edit existing projects

          Project Menu also tracks the history of your projects, the latest
          four of your visited projects are listed following the normal
          Project menu items.

          Build Menu consists of the following items,

              . Compile Current File - compile the file under editing

              . Setting - set-up parameters for compiling current file.

          View Menu consists of the following menu items,

              . Redraw - redraw the text window

              . Language - specify languages for the current file

              . Font Style - select text font style

              . Font Size - specify the text font size

              . Color - specify colors for Background, Keywords, Comments,
          Primitive Types, and Constants.

              . Save Default Window Size - save the current window size as
          the default window size, all edit windows opened after this will
          use the        new size.

              . Tab Size - set Tab size

          Util Menu consists of the following menu items,

              . Indentation Formatting - do indentation formatting on the
          texts in the current buffer, this works only for Java source code
          file only.

              . Search String in Files - search string in specified files

              . Search String in Project - search string in a specified
          project

              The following decompiler related menu items are only enabled
          when an appropriate version of WingDis is installed and the
          classpath is set correctly.

              . Decompiler Set-up - set up the parameters used in
          decompiling

              . Decompile a class - decompile a class from the classpath

              . Decompile a local class file - decompile a specified class
          file

              . Decompile a remote class file - decompile a remote class
          with a URL address

              . Decompile an applet - decompile the class in an applet with
          a URL address

          Goto Menu - tracks methods and saved cursor positions, and
          consists of the following menu items,

              . Display Method List - turn on the Method List. The text
          window will be split into two panels, the left side is the list of
          the methods in the file, the right side is the existing text
          window.

              . Update Method List - re-track the methods list of the
          current file.

              . Sort Method List - sort the method list.

              Goto Menu also tracks the saved cursor positions through using
          Push button on the button bar.

          Window Menu lists the existing opening windows

          Help Menu consists of the following menu items,

              . Contents - contents of the help information.

              . About - WingEditor version information.

        o 4.2. Buttons Bar

          Buttons bar provides short-cut to some mostly-frequently-used
          functions.

              Open - open a file

              Save - save to the current file

              Find - search a string in the file

              Repeat - repeat the last find or replace operation

              Replace - replace a string

              Cut - cut the selected area and copy to the clip board

              Paste - paste the clip board

              Copy - copy the selected area to the clip board

              Push - save the current cursor position, which will appear on
          the Goto Menu.

              Pop - move the cursor to the last saved (pushed) position.

              .? - help information for the current window.

        o 4.3. Text Window

          This section is where the actions happen. It consists of a text
          panel with scroll bar. WingEditor allows you to use some control
          keys as short-cut to control the editing. The control keys are
          listed in the Control Keys List section.

        o 4.4. Status/Message Bar

              - Editing Status

          This section tracks the location of the cursor, and the file
          access status which indicates whether the buffer has changed but
          not saved yet, and whether the file is writable or readonly.

              - Message Bar

          This is the message channel where the WingEditor will inform you
          about operations status.

  5. All about Project

     If you just want to use WingEditor for editing, you can ignore section
     5-7.

     Project in WingEditor means a java application or applet, with a main
     class. Project profile provides information about source files list,
     main class, runtime parameters, and source paths to compiler and
     debugger.

     The GUI debugger in WingEditor 1.5 supports both applet and application
     as main classes.

        o 5.1 Create a Project

          To create a project, just go to Project menu on Editor Window, or
          Project Window, and select New Project, WingEditor will open a new
          Project Window.

          You can enter all the information related to a project on the
          Project Window, when finish editing, click Save button to save the
          information to a project file. A project file name should be ended
          with ".prj".

        o 5.2 Project Window

          Project Window consists a Menu Bar, Button Bar, Parameters Panel,
          and File List Panel.

          5.2.1 Menu Bar

          Menu Bar on Project Window is almost the same as the one on Editor
          Window. All text window related menu items are removed from the
          Project Window.

          On Util Menu, Editor Language is added to allow users add their
          own languages to the system.

          5.2.2. Button Bar

              . Open - for open an existing file

              . Save - save the current project

              . Compile - compile incrementally

              . Compile All - compile fully

              . Debug - launch a debugger session for the current project

              . Execute - execute the current project directly

              . Show Environments - turn on the environment panel

              . Show Sources - turn on source file list panel

          5.2.3. Environment Panel

          Environment Panel contains a form for various environment
          parameters in a project,

              . Application/Applet

              . Main Class

              . Runtime Parameters or URL for applets

              . Sources Path

              . Compiler Command

              . Class Path

              . Compiling Option

          5.2.3. Source File List Panel

          Source File List Panel contains a List which displays the source
          files, and an input area for adding/remove files from the list.
          Users can also select one or multiple files from the list to open
          (Open File(s) button).

          Users can add multiple files to the source files list by using
          '*', '?', '[', or ']'. For example,

               /user/*/*.java

               /user/*/?xy.java

               /user/[abc]?.java

        o 5.3 Use of Project Information

          The information in a project file is going to be used by
          WingEditor's compiler and debugger, and utility such as Search a
          string in Project.

          The following information will be used by the compiler,

              - Source File List

              - Compiler Command

              - Compiling Options

              - Class Paths

          The following information will be used by the debugger or
          executing the program directly,

              - Main Class

              - Runtime Parameters or URL for applets

              - Sources Paths

              - Class Paths

          The compiler uses Source File List to do incrementally or fully
          compilation.

          The debugger uses Main Class and Runtime Parameters (or URL for
          applets) to start the debugger for the Java program, and use
          Sources Path to provides sources information during debugging.
          Usually, users should provide both JDK's source path (the src.zip
          has to be unzipped), and the program's source path.

        o 5.4 Project File Format

          You can save a project file anywhere you want. A project file
          follows a fixed format in WingEditor. Notice that the project file
          created in 1.5 is slightly different from the one created by
          WingEditor 1.4, but WingEditor 1.5 can read WingEditor 1.4's
          project file without problem.

          The WingEditor 1.5.3 Project File Format is as follows,

              First line: Application/Applet

              Second line: Main Class

              Third line: Run-time options

              Fourth line: Source paths

              Fifth line: Compiler Command

              Sixth line: Class paths

              Seventh line: Compiling Options

              Eighth and beyond: Source Files List

  6. WingEditor's Compiler Environment

     Current Compiler environment only works with JavaSoft's JDK 1.1 or
     higher version. You have to have the JDK 1.1 or higher version
     installed, and JDK's classes.zip must be on the classpath.

        o 6.1 Compile a Single File

          You need to do the setting first for compiling a single file. The
          setting on Editor Window/Build Menu is a global setting, i.e., it
          will affect on all the editor windows.

          After setting is done, just goto Build Menu, and select Compile
          Single File for compiling.

        o 6.2 Compile a Project

          To compile a project, you need to create a project, and fill in
          all the information in a project.

          After a project is created, just use Compile and Compile All
          buttons on Project Window to compile a project incrementally or
          fully.

        o 6.3 Error Browser

          If there are compiling errors, WingEditor will bring up an error
          browser window. You can click on the line with both file name and
          line number appear to view the file and the location.

  7. WingEditor's Debugger Environment

     To use debugger,

         - Create a project

         - Compile the project with -g option

     Simply click on Debug button on Project Window, a Source Browser window
     and a debugger window will be opened. WingEditor will automatically
     execute the program and stop at the Main class's main method for
     application, and init method for applet. For Win95 users, you might
     experience slow response of the debugger at the beginning if the system
     is not connected to a network.

        o 7.1 Source Browser Window

          Source Browser Window is similar to the Editor Window, except that
          the button bar is replaced by debugger oriented one. The button
          bar holds the following buttons,

              . Restart - restart the program

              . StepIn - execute next line, if the line contains method
          calls, step into the first method call

              . Next - execute next line, ignore method calls

              . Cont - continue execution of the program

              . RuntoHere - continue execution of the program and stop at
          the line where the cursor appears.

              . BreakAt - set the line where the cursor appears as a break
          point

              . Trace - set the line where the cursor appears as a trace
          point. The break point window will be on, and users can enter the
          variable name to be traced there.

              . Clear - remove the break point at the line where the cursor
          appears. Source Browser's text window will hold sources context at
          the current break point, with the current line colored.

        o 7.2 Debugger Window

          Debugger Window consists of a Menu Bar, a Button Bar, a Debugger
          Message Panel, a Data History Panel, and a Current Stack Panel.

          7.2.1 Menu Bar

          Debugger Window's Menu Bar also contains File, Windows, and Help
          Menu which are similar to the ones in Editor Window.

          - Execute Menu

              . Restart is the same as button Restart.

              . Suspend Current Thread - suspend the execution of the
          current thread.

              . Suspend Thread(s) - suspend execution of specified
          thread(s). Users will enter the thread ID(s).

              . Resume Current Thread - resume the execution of the current
          thread.

              . Resume Thread(s) - resume execution of specified thread(s).
          Users will enter the thread ID(s).

              . Load Class - load a class

              . Run Class - Run a class. The class has to have a main
          method.

              . Exit Debug - quit the debugger. This will close both
          debugger window and the source browser window.

              - Exception Menu

              . Catch Exception - catch a specified exception

              . Ignore Exception - ignore a specified exception

              - Data Menu

              . List Classes - list the classes loaded

              . List Methods - list methods in a specified class.

              . List Fields - list fields in a specified class

              . List Methods in Current Class - list the methods in the
          current class.

              . List Fields in Current Class - list the fields in the
          current class.

          - Thread Menu

              . Set Current Thread - set the current thread.

              . List Threads - list the running threads

              . Set Current Threadgroup - set the current thread group

              . List Threadgroups - list the running thread groups

              . Kill a Threadgroup - kill a thread group

          7.2.2 Button Bar

              - Break Point - turn on Break Point Window

              - User Console - turn on User Console Window

              - Data Window - turn on Data Window

              - StepIn, Next, and Cont buttons are the same as on Browser
          Window.

          7.2.3 Debugger Message Panel

          Debugger message panel displays message from remote debugger.

          7.2.4 Data History Panel

          Data History Panel provides a place for users to print or dump
          fields or variables information, and users can save these
          information to a file. Five buttons on the panel allows users to
          control the print actions,

              - Print - print a filed or variable specified in the
          Expression field.

              - Dump - dump an object specified in the Expression field.

              - Statics - print static fields in the current class.

              - Locals - print local variables in the current stack Frame.

              - Save - to save the data history to a file.

          The Expression History allows users to track previously printed
          fields or variables' names.

          7.2.5 Current Stack Panel

          Current Stack Panel displays the current stack frame at the
          current break point. Users can click on one of them to track the
          corresponding frame, and print the information on that frame, and
          browse the source code in that frame.

        o 7.3. Break Point Window

          Click on BreakPoint button on debugger window, the Break Point
          Window will be shown.

          The Break Point Window consists of a Break Point List Panel, and a
          Break Point Details Panel.

          Break Point List Panel displays all the current break points. Four
          buttons are used in removing break points, save break points to
          files, and load break points from files.

          Break Point Details Panel display a break point's detail. When a
          break pint is selected on Break Point List panel, the details will
          be displayed here, and users can modify the existing break point,
          add a break point to the list.

          Clear button is used to reset the fields in the break point
          details. Hide button is for hiding the Break Point Window.

        o 7.4 User Console

          User Console holds the output from the program's standard output.
          Users can turn on the User Console by clicking on the User Console
          button on Debugger Window.

          User can save the User Console to a file by clicking Save button,
          and specify a file to save.

        o 7.5 Data Window

          By clicking on DataWindow button on Debugger Window, the Data
          Window will be shown. The Data Window, by default, keeps tracking
          the information in the current class (or "this").

          Users can explore a field in the current class by double-clicking
          on the field, or select one and clicking Explore button.

          Users can also enter an object name in the Var ID field, to
          explore that object.

  8. How to Recover Files After System Crashes

     Well, accidents do happen all the time. During your editing, WingEditor
     keeps saving your unsaved editing to a temporary file. If system
     crashes during your editing, you can recover your editing from the
     temporary file.

     Go to the work directory where WingEditor is installed, and files name
     with your original file name plus ".tmp." plus a sequence of digits
     should be the files you are looking for. Check the file's time mark,
     you will be able to find the right one.

     As a simple example, the following name appears to be a temporary file
     for javaeditor.java,

      javaeditor.java.tmp.854341732610,

  9. Control Keys List used on Editor Window

     Here is a list of control keys used on Editor Window,

          <Home>, <ctrl>A                       beginning of the line
          <ctrl><Home>, <ctrl>U              beginning of the file
          <End>, <ctrl>E                           end of the line
          <ctrl><End>, <ctrl>L                  end of the file
          <PageUp>, <ctrl>P                     up a screen
          <ctrl><PageUp>, <ctrl>T            beginning of the screen
          <PageDown>, <ctrl>N                down a screen
          <ctrl><PageDown>, <ctrl>B       end of the screen
          <UpArrow>                                up a line
          <DownArrow>                            down a line
          <LeftArrow>                                left a character
          <RightArrow>                              right a character
          <shift><UpArrow>                      drag up
          <shift><DownArrow>                  drag down
          <shift><LeftArrow>                     drag left
          <shift><RightArrow>                   drag right
          <ctrl><UpArrow>                       scroll up a line
          <ctrl><DownArrow>                   scroll down a line
          <ctrl><LeftArrow>                      backward a word
          <ctrl><RightArrow>                    forward a word
          <F2>                                           copy
          <F3>                                           repeat last find or
     replace
          <F4>                                           paste
          <F5>                                           cut
          <ctrl>C                                        copy
          <ctrl>D                                        delete the current
     line
          <ctrl>F                                         find
          <ctrl>R                                        replace
          <ctrl>V                                        paste
          <ctrl>W                                       delete the current
     word
          <ctrl>X                                        cut
          <ctrl>Y                                        redo
          <ctrl>Z                                        undo
          <Del>                                          delete a character,


 10. WingEditor's environment setting

     10.1. .WingEditor

     WingEditor saves environment information in a special file named
     .WingEditor which is located at the work directory where the WingEditor
     is installed.

     We don't encourage users to change the file manually, since its format
     can change from version to version. The file contains the following
     information,

         - Default fonts

         - Default colors

         - Default build options (Project, compiling options, class paths)

         - Default window size

         - Default tab size

     When WingEditor is invoked, it will look for this file for setting up
     the default environment.

     10.2. .WingEditor.files and .WingEditor.projects

     These two files are located in the same directory as .WingEditor.

     These two files are used in track the history of your editing.
