Xrefactory for jEdit

Xrefactory is a refactoring development environment for Java. Its functions can be accessed via the 'Plugins->Xrefactory' submenu of the main menu bar. Optionally the most frequent functions can be bind on shortcuts. Xrefactory can be customized via standard jEdit customization dialog.

Quick start

To quicly start working with Xrefactory just invoke any of its function. You will be asked for creation of a project. Then Xrefactory will create its database for the project and is ready for use.

Projects

Xrefactory is project based, you will need to create and maintain description of your projects. Particularity of Xrefactory projects is possibility of autodetection. Xrefactory detects the 'active project' from the currently edited file name. Each project contains list of 'autodetection directories' specifying when the project should be triggered 'active'. Only one project at the time can be active. In consequence 'autodetection directories' have to be distinct for all projects. Information about selected 'active project' is displayed after each browsing action in the botton information line of the editor.

NOTE: Project autodetection directories are (in general) not the same as directories containing project files. Project files can contains common libraries used in many projects, while project detection directory should be the directory which is project specific, i.e. directory containing project specific files not shared with other projects.

Tags

The main object Xrefactory works with are 'Tags'. Each project has its Tags stored in files specified by user. Tags contain informations about your project sources. In particular informations about all symbols, their linking properties, definition place(s) and all usages. Tags can be split into any number of files. The number of tag files is specified by user. Larger number makes browsing faster, but makes creation and update of Tags slower. The maintenance of tags is in major part automatic. However it may happens that tags will become inconsistent. Then it is recommended to re-create tags manually.

Xref task

Xrefactory functions cooperate with an external 'xref' task, if you feel that the task has run into an inconsistent state, you can invoke the 'Kill xref task' function.

Completion Dialog

Each line of the dialog contains following informations: the identifier to insert, the inheritance level and the class where proposed symbol is defined, and the full definition of the symbol. Symbol can be selected using standard motion keys. Following special keys are available:
<return>- close dialog and insert completion.
<space>- inspect definition (or javadoc) of the symbol.
<escape>- close dialog.
<alt><escape>- return to invocation place and close dialog.
When completing a type name, fully qualified names of classes from jar archives are proposed. When selecting such name, an additional dialog appears proposing you to add new import clause.

Browser Dialog

Xrefactory browser is based on browser stack. New browsed symbols are pushed on the top stack. Symbols cab be poped by user. When stack grows and takes too much memory the oldiest symbol is removed automatically. Each stack element is in fact collection of all symbols having the same name, together with all their references.

Browser dialog contains two major information panes. Information displayed in information panes can be filtered by selecting filter from combo boxes placed above.

Left Info Pane

The left information pane contains symbol names, profile informations and classes where those symbols are defined. Window is organized as tree, where after each symbol follows inheritance subtree relevant for this symbol. Tree contains classes defining the symbol and (sub) classes where symbol is syntacticaly referred. After class name follows number of references.

Mouse key bindings:
<mouse-left-button>- select only one class references and inspect definition reference (or javadoc).
<mouse-right-button>- toggle select/unselect.
<SHIFT><mouse-left-button>- toggle select/unselect.
<CTRL><mouse-left-button>- inspect class (or its javadoc).

Available filters:
Equal name- all symbols of given name are displayed. Class tree is not restricted.
Equal profile- the browsed symbol is dislayed. Class tree is not restricted.
Relevant- the browsed symbol is dislayed. Class tree does not display classes not related to class of browsed symbol.

Right Info Pane

The right information pane contains list of references. Each reference is listed together with corresponding line of source code. The list is selectable and selected reference is automatically opened in editor.

Meaning of filters for classes:
Level 3: Only definitions and declarations are shown.
Level 2: as level 3 plus usages in the EXTENDS and IMPLEMENTS clauses
Level 1: as level 2 plus all usages in the top level scope (in global vars and method definitions). This can be used to see all the methods working with a particular type.
Level 0: all references are shown.

Meaning of filters for variables:
Level 3: only definition and declarations are shown.
Level 2: as level 3 plus l-value usages.
Level 1: (unused in Java langauge).
Level 0: all references.