
                 WingEditor 1.5.1 Users' Guide 
                 
                       by WingSoft Company
                     (Last Updated: 10/30/97)                       

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.5 only works with JavaSoft's JDK 1.1 or higher version.
  Before using WingEditor, JDK1.1 or higher version should be  
  installed, and classpaths should be updated to include JDK's 
  java packages.
  
  Visit http://www.javasoft.com for details about how to download
  the JDK 1.1 from JavaSoft. If your systems are
  not supported by Javasoft, please download a portable JDK1.1
  version from other vendors.
  
  WingEditor 1.5 has been tested on Solaris and Windows 32 systems,
  although it should work on other platforms with JDK 1.1
  supported, we haven't done any testing.
  
3. Installation of WingEditor

  - Create a directory named wingeditor15 (you can use other name).
  
  - Download the zip file into the directory, or if you purchased
    the WingEditor, follow the installation guide from email.
    
  - Unzip the zip file and save the zip file into the directory
  	(wingeditor15).
  
  - Put the directory (wingeditor15) on your classpaths
 
  - For NetRexx support, please refer netrexx.support.txt.
 
  Now, you are ready to use WingEditor.                                                            
  
4. 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 last project you
  visited, or a new project window if WingEditor is used the very
  first time.
  
5. WingEditor's Editor Environment

  Editor Window consists of Menu Bar, Button Bar, Text Window,
  and a Status/Message Bar.
  
  5.1. Menu Bar            
    
    Menu Bar consists of File, Project, Edit, Build, View, 
    Util, Goto, Window and Help menu.
    
    File Menu - 
                
         . 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.                

    Edit Menu - 
          . 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
          . 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 -
 	  . Compile Current File - compile the file under editing
      . Setting - setup parameters for compiling current file.

    View Menu - 
      . 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 -
       . Indentation Formatting - do indentation formatting on
         the texts in the current buffer
       . Search String in Files - search string in specified files
       . Search String in Project - search string in a specified 
         project

    Goto Menu - tracks methods and saved cursor positions.
       . 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 -
       . List the existing opened windows         
          
    Help Menu -
       . Contents - contents of the help information. 
       . About - WingEditor version information.
          
  5.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.
    
  5.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.
 
  5.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.

6. All about Project
        
   If you just want to use WingEditor for editing, you
   can ignore section 6-8.
   
   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.

   6.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".
  
   6.2 Project Window
   
     Project Window consists a Menu Bar, Button Bar, Parameters
     Panel, and File List Panel.
     
     6.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.
       
     6.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

     6.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
     
     6.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

    6.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.

    6.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 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
       Secenth line:  Compiling Options
       Eighth and beyond: Source Files List

7. 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 classpaths.
        
  7.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.
    
  7.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.
  
  7.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.
         
8. 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.
  
  8.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.
    
  8.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.
    
    8.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 threadgroup
      . List Threadgroups - list the running threadgroups 
      . Kill a Threadgroup - kill a threadgroup

    8.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, adn Cont buttons are the same as on Browser Window.
   
    8.2.3 Debugger Message Panel
    
    Debugger message panel displays message from remote debugger.
    
    8.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.

	8.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.

  8.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.
    
  8.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.
    
  8.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.
     
9. 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 WingEditor's work directory,
   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,
 
10. 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,
 
 
11. WingEditor's environment setting

   11.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.
   
   11.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.
