Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > media > contrib-release > by-pkgid > 081d536d372c5b499a273e5b6a4ec5a1 > files > 57

jrefactory-2.8.9-4.2mdv2007.0.i586.rpm

License
=======

This software is covered by the GNU public license.  Feel
free to distribute this software to your friends!


Installation for Elixir IDE
===========================

(1)  Add jrefactory.jar into <home>/.ElixirIDE/2.4/ext.

    <home> is ~ for developers using Linux or Unix based
    systems.  For developers using Windows NT, <home> is
    c:/winnt/profiles/<yourname>.  For developers
    using Windows 95/98, <home> is c:/windows.  For developers
    using Windows 2000, <home> is C:\Documents and Settings.

(2)  Elixir's GUI will start.  After it is mostly loaded,
    the system will prompt you to find the src.jar file that
    comes with the java development kit from sun.  You can
    browse to a directory that contains the .java files for
    the JDK that you are working with.

    Select the src.jar file or directory containing the
    source code, and press OK.

    This process is very disk and CPU intensive.  On my
    machine at work (333 MHz Pentium II, 128 Meg of
    RAM, Dell Computer running Windows NT 4.0 Service
    Pack 5), this operation takes about 2.5 minutes.
    The hard disk light will be running continuously
    during this process.

    This step will allow the JDK classes to appear in the
    class diagrams.  It is also required for some of the
    refactorings.

(3)  A dialog box labeled "Loading source files" appears
    in the upper left corner of the screen almost immediately.

    The interior of the "Loading source files" dialog box
    may take a few seconds to paint.  This is because the
    system is doing a lot of work to load the JDK.

    The box will first say "Loading JDK" with a red
    progress bar under it.  Then it will say "Loading <dir>",
    where <dir> is the name of the directory you entered
    in step 1.  The progress bar is now blue.

    When the "Loading source files" dialog box disappears,
    you have a dialog box to select the package to view.

Normal Launch
=============

This is what happens when you launch Refactory for the second
and all further times.

(1)  Upon launching Elixir IDE, the dialog box labeled "Loading
    source files" appears.  First it appears with the label
    "Loading JDK" with a red progress bar.  Then the label
    changes to "Loading <dir>", and the progress bar is blue.

(2)  Once the "Loading source files" dialog box disappears,
    the system is configured to display UML class diagrams
    and preform refactorings.

Reformatting source code
========================

To reformat your code,

(1)  Open the file you want to reformat.

(2)  Select Script from the menu

(3)  Select JRefactory from the drop down menu

(4)  Select Pretty Print.  Elixir will return you to the top of
    the file.  The current file is reformatted.

    If there is a problem with the file, it will report that it
    was unable to parse the file.  Please make sure the file
    compiles, and then run the pretty printer again.

Configuring the Pretty Printer
==============================

The configuration for the pretty printer is contained
in a file called pretty.settings.  This file is located
in <home>/.Refactory.  The directory and the default
file are created automatically.

The easy method to configure the pretty printer is
to select the Configure menu option.  This brings up
a GUI.  When you save a configuration, the source
code in the right pane is updated.  The alternative
is to edit the pretty.settings file directly.

<home> is ~ for developers using Linux or Unix based
systems.  For developers using Windows NT, <home> is
c:/winnt/profiles/<yourname>.  For developers
using Windows 95/98, <home> is c:/windows.

Before each configuration is a brief description of
what effect making the change has on the system.  Feel
free to change any of them and watch the effects.
If you don't like the results, don't save it to the
disk.

The configuration is reloaded each time you select
Pretty Printer from the menu.

Displaying a UML diagram
========================

To display a UML diagram, you:

(1)  Press the new file button

(2)  Select UML class diagram from the list

(3)  Select the package name from the listbox

(4)  Press the OK button.  The class diagram appears.

You may also view a class diagram by opening a file with
the extension .uml.

(1)  Press the open file button

(2)  Browse to the file that ends with the extension .uml.

(3)  Press OK

(4)  The class diagram appears.

You can also add a class diagram to your project.

Performing a Refactoring
========================

The real power of this system is that by changing
the UML class diagram, your source code gets updated.
Here is a generic description of how the refactorings
work:

(1)  Find the class that you would like to change

    For instance, let's say that we have a class
    named "BadName" and we want to rename it to
    be "BetterName"

(2)  Right click on that class

(3)  Select the refactoring to be performed

    If you clicked on the name of the class, then
    you just see two options:  Type Refactorings
    and Metrics.  Mouse over Type Refactorings.

    The pop up window shows Rename Class at the
    top of the menu.  Click on Rename Class.

(4)  A dialog box appears and requests more information.

    In our example, the dialog box prompts you for
    the new name of the class.  Enter the new class
    name and press OK

(5)  The system starts updating your source files.

    Note that if a file that contains source code is
    read only and that file needs to be changed by
    the refactoring, you will be prompted to check it
    out of your version control system.

(6)  The class diagram shifts and wiggles as it reloads
    the files.  You can now browse through your source
    code to see the effects of the change.

Printing
========

If your system has the JDK 1.2 printing features implemented,
then you will be able to print a file.

(1)  Open the file you want to print

(2)  Select Script from the menu

(3)  Select JRefactory from the drop down menu

(4)  Select Print.  The current file will print.

If the current file is a class diagram, then the diagram will
be printed.

If the file ends with the extension .settings or .properties,
it will be printed with syntax highlighting.  Each line will
also be numbered.

If the file's extension ends with ml, then it will also have
syntax highlighting.  Each line will be numbered.

All other types of files only have line numbering.


Comments or Undocumented Feature Reports  :-)
=============================================

If you like the software or if you would like to have the
software improved, feel free to send me an e-mail at
seguin@acm.org.

If there is a bug, then please describe what you were doing
when it occurred.  Also, please send me any stack traces
that appear in the JBuilder shell window.  (When I launch
JBuilder in Windows NT, I get two windows:  A Command Shell
and the JBuilder editor.  The command shell contiains the
exception traces that I need to help debug the problem.)

My next goal is to get some method refactoring going.  The
first one is push up method and push down method.  (See
Refactoring by Martin Fowler.)

Since this is open source, feel free to add more functionality!
I'll be happy to help show you where to add a particular feature.