The plugin interface consists of a tool bar, containing some command buttons, a menu containing the currently available projects (accessible through the button labeled with the current active node), and the project's views.
To open a ProjectViewer window, you'll need to choose the "Open Project Viewer" action from the plugin's menu. Optionally, you can go to the Global Options dialog in jEdit, and dock the window in your favorite position (in the "Docking" tab). Note that activating a project or group using the plugin menu will not open a ProjectViewer window if one is not already opened.
Project Viewer allows you to organize your projects into groups. You can create as many groups as you with in an hierarchical manner, by using the "Add group here" command in the tree's context menu, or choosing the "New group here" entry from under the desired group in the projects menu.
As with projects, it is possible to have groups as the root of the tree shown in the dockable window. For this, just choose a group from the projects menu to make it active. Some plugin functionality is not available when in this mode.
You can also move projects and groups to other locations in your group hierarchy by using the "Move to..." command in the tree's context menu and choosing the desired destination from the displayed menu.
As you create more and more projects, you will want to be able to switch between them without using the mouse. ProjectViewer offers many keyboard-friendly ways of switching projects.
If you want to use standard Swing shortcuts and arrow keys to navigate through the Project tree, you should also bind ProjectViewer actions Select Parent Group and Open Group or Project to keyboard shortcuts (alt-up and alt-down suggested). While you are there, don't forget to bind a shortcut for ProjectViewer itself.
Each project and group gets its own "direct switch" action. You can bind these actions to keyboard shortcuts by selecting the ProjectViewer: Project Actions action set from the Global options -> ShortCuts panel -> Edit shortcuts: combobox.
The FastOpen plugin offers more convenient and/or mouse-free ways of switching between files and projects, and is an extension to ProjectViewer.
There are four possible views of the files on a project: the "Folders" view, which shows the files as if in a file manager, organised in directories. The "Files" view, which shows all the project's files in a flat list. The "Working Files", which shows the files currently opened in jEdit. And the "Compact View", which compresses subdirectories into top-level nodes, showing a structure similar to the java package naming.
The files in the different views are colored according to the patterns and colors you have choosen for the filesystem-browser. Furthermore currently open files are highlighted by underlining their names.
You can interact with the project tree in several ways:
Double clicking on a file will cause it to be opened in a jEdit buffer. If the file is already open, then ProjectViewer follows the FileSystemBrowser configuration option to decide whether to close it or not.
Middle-clicking on a file does the same as double-clicking, except it will always close open files.
The right mouse button shows a context menu with options related to the current selection on the tree, allowing you to remove files or directories from a project, deleting them from the disk, or rename them, among many other options.
Dragging a file from the trees and dropping it on jEdit's text area will cause the file to be opened.
Differently from earlier releases, the plugin does not follow the filesystem layout to organize files anymore, except for certain cases; notably, when doing the initial import from the project root or when adding a file that has been saved from an open buffer and is not currently part of the project.
In the import dialog (available by choosing "Import files" from the right-click menu), you can choose any files to be imported to the selected node (the one where you clicked to get the context menu). The same filters available when doing the initial import for the project are available in the file chooser.
You may choose any files and directories to import, even files and directories that are not "children" of the selected node in the file system layout. This allows you to organize your files in any way you want. You may even enter the name of a non-existant file in the file chooser: it will be treated as a directory, and even though the directory does not exist on disk, you'll have the same functionality for it as you have for other directories in your project.
The file import dialog is a standard Java file dialog with a few added options to controle the behavior of the import process. These options are:
Traverse directories: if a directory is chosen to be imported, this option will cause all files and directories under the chosen directories to also be imported, as long as they fit the chosen filter.
Flatten file paths: when traversing directories, you may choose to import all the files into a single node, insted of generating a directory tree.
Import into new node: this will create a new node under which you are importing files, and all newly added files and directories will be placed under this new node.
Filter settings: when traversing directories, you may choose from some existing file filters to choose the files to be imported, or create your custom file filter on the fly by providing globs for files to be included and directories to be ignored. For more information about the glob syntax, see "Import Options" under the "Customization" chapter.
The tool bar provides a fast way to access some of the functionality of the Project Viewer plugin. The available commands are:
Add/Edit project: shows the project properties dialog, where you can enter information about a new project. If the "All Projects" view is used, and no node (or the root) is selected, the "Create Project" dialog apperas, instead of the current project's properties.
Expand the file list: opens all nodes in the currently selected tree.
Contract the file list: closes all nodes in the current tree.
Add file to project root: shows a dialog where you can choose single files to add to the current project. Differently from the "Add files" in the context menu, this option will work as in the old Project Viewer versions, only importing files below the project root, and keeping the file system layout for files and directories.
The context menu provides context-sensitive options based on the current tree selection. The following commands can be found in the context menu (some of them have already been explained above):
Add files: pops a file chooser from where you can choose any files or directories to import. These will be imported into the selected node, disregarding the file system layout. If importing directories, you'll be prompted if you want to do it recursively using one of the available filters.
Add files from VFS: lets you select files from a jEdit VFS (Virtual File System), such as FTP. If you choose local files, ProjectViewer will add standard files instead of VFS files. The functionality of VFS files in ProjectViewer is rather limited when compared to standard files.
Re-import files: this command will remove all files and directories below the project root, and re-read the file structure from disk according to the selected filter (which can be chosen from the dialog that pops up). It will also analyze directories not under the project root: it will re-import existing directories and remove stale files from "virtual" directories.
Remove from project: this will remove the selected node from the project to which it belongs. It is also possible to remove multiple nodes at once.
Delete from disk: this is only shown for files to which you have write permission. Choosing it will cause the files to be deleted from disk and removed from the project.
Rename: this will prompt you for a new name for the selected node. If you check the "Don't change name on disk" option, only the node name on the tree will be changed; the file on disk will keep its current name.
Archive project: this will prompt you for a file name. A JAR archive will be created containing all files below the project root.
Preview in browser: this will open the file in the configured web browser. If a project URL is set, files below the project root will be redirected to the given URL; in other cases, the "file://" protocol will be used. The part of the file path corresponding to the project root will be removed when opening the file relatively to the project URL.
Open with: this will open the selected file in a configured application associated with its extension (configured in the Project Viewer's plugin options). If no application is configured for the selected file, selecting this option will prompt you to choose an application.
Some commands are also available as jEdit actions so that shortcuts can be assigned to them. You can check all the possible commands available as actions by going to the "Shortcuts" panel in the jEdit options dialog, and selecting the ProjectViewer plugin.
When executing a command using a shortcut, you may notice that sometimes no action is performed and an error message appears in the status bar. This means that the action is not available for the current selection in the tree. To check which actions are available for the selected node(s), check the context menu by clicking the node with the right mouse button.
Project Viewer can be extended by other plugins; they can add properties to a project and define new actions for nodes in the tree. Consult each plugins documentation for information about possible commands available for the Project Viewer plugin.
For developers go to chapter Developer Documentation to get some starting help fo how to cooperate with the Project Viewer plugin.