Main Content

OpenDocs – Plugin for the oXygen XML Editor

openDocs

Hi oXygen users,

do you know these situations? You are working hard with oXygen and because you are working so hard, you have hundreds of files open in oXygen. In any case, you lose your focus… How can you get it back?

Well, you can close all files and reopen only the files being in your focus.

Problem A: If some files in your focus are not in your project, you need to search for them on your drive.

Problem B: Some files in your focus are not saved or are newly generated. In order to close and reopen them, you first need to save them on your drive. This can be much and unintended work, because you don’t want to save them anyway.

That’s why I started to develop my OpenDocs oXygen plugin. The idea of the plugin is that you have a better overview of which files are currently opened in the oXygen XML Editor. By using this plugin, you are also able to close multiple files – but not all – with only one click.

The following example actions can be performed with only a few clicks:

  • Closing all files except for a specific set of files.
  • Closing all open files which have a specific extension (e.g. all .xml files).
  • Reopening up to the last 50 files which were closed before.
  • Closing all files which have unsaved changes – with saving or without saving.
  • Compare two open files.

How to install the OpenDocs plugin?

Requirements

  • oXygen XML Editor >= version 16.1 (Full Edition or Developer)
  • I only tested on Windows 7.

Download the plugin

Current release (v 0.8)

By downloading, you agree to the OpenDocs oXygen plugin EULA.

Installation instructions

You only have to unzip the downloaded ZIP folder and copy the OpenDocs folder into the plugins folder of your oXygen installation directory. Then you have to restart the oXygen.

Now, the OpenDocs plugin should appear on the right side of the oXygen XML Editor window.

So have fun with my little tool. I hope it will help you working with oXygen. If you have any questions, read the following short documentation or contact me.

Documentation

Please read the following documentation, so that you can see how the OpenDocs plugin works.

Start

In order to find the OpenDocs view, select the following menu items in the oXygen menu:

Window → Show view → OpenDocs.

Overview

The following screenshot shows the OpenDocs view:

OpenDocs view

Structure

  • Top menu
    Menu to configure or to perform actions in the file list or in the Working set area.
  • File list
    The file list always shows all files which are currently open in the oXygen XML Editor. It is customizable by the Grouping menu and the Sorting menu (see below).
  • Working set area
    Storing files into Working sets.

 

File list

With the file list you are able to jump with one click to a currently opened file. You can also select some of the opened files to perform actions in them.

List structure

The file list is structured in one or more groups. The groups have an icon and a label.

The files of one group are listed below the group label with some indent. Each file is represented by the system icon of its extension and its name. There are some special markups for the file representation:

  • Bold File markup types
    If the file name is bold, the file is currently focused in oXygen.
  • Asterisk (*)
    The asterisk at the end of the file name means that this file has unsaved modifications.
  • Italic and cyan colored icon and file name
    These files are part of archives (e.g. opened by the Archive Browser).
  • Yellow colored icon and file name
    These files are opened via the HTTP protocol.
  • Grey colored icon and file name
    These files were created by oXygen and have no representation in the drive (or in any other location).

Selection

Selection can be done by a mouse click on the files of the file list. You can also select all files of one group (see Grouping), by clicking on the group name. By pressing the CTRL or SHIFT key, you can extend or specify your selection. You will find information on the additional selection actions in the Selection menu (see below).

File list: right-click menu

The right-click menu of the listed files in the file list provides additional actions to handle the selected files. Some action items are dependent on the type or number of the selected files, while the right-click menu was triggered, and on the context file (the file for whom the right-click menu was performed).

  • Close Right-click menu
    Close all selected files.
  • Save
    Save all selected files with unsaved modifications. If there are no such files, this item is not available.
  • Show in oXygen
    Show all selected files in the oXygen XML Editor.
  • Show in explorer
    Open the Windows Explorser and show all selected files in the folder where the files are stored.
  • Add to Working set / Save as Working set
    This menu item is a representation of the Working set menu (see below).
  • Compare files / Open in XML Diff
    These items are only available if not more than two files are selected. By performing it, the selected files are opened in the oXygen XML Diff Files tool.
  • Run script
    This action item will be enabled if the context file has a bat extension. The script will be executed on the cmd.
  • Open cmd in its directory
    Open the command line for the directory of the context file.

 

Menu

Close

Close menu

With the Close menu, you can close all selected files. By default, oXygen will ask you to save the files if they contain unsaved modifications. In the menu, you can save automatically all files or discard all unsaved modifications.

You can also use the keyboard to close files by using the DEL key. By using the short key SHIFT+DEL, you will save all files automatically by closing. The short key CRTL+DEL will discard all unsaved modifications.

Grouping

grouping_small

You can group your files by the extension (Extension), by the folder name (Folder), by the Working sets (see bellow) or you can select No Grouping (flat list).

Sorting

sorting_small

You can sort the list by file name (Name), by the order it was opened in oXygen (Opened) or by the order the files were selected last (Selected). Each sorting order can be reversed by clicking on the green straight arrow in the menu.

Selection

By using the Select menu, you can select files with specific properties:

  • All files.selection_small
  • All files which have modifications not yet saved.
  • All files which were not yet saved on the drive (“new files”).
  • Reverse the current selection.

Working set

See below.

Show closed files

Last closed itemsIn the Options menu, you can define the number of shown files in the group Last closed items. This group will be displayed at the end of the file list, regardless of the sorting option. The group contains the last closed files since the oXygen was started. If there are no closed files or the number of shown files is set to zero, the group will be hidden.

Working set area

Working set edit menuWith the Working set menu (right-click or top menu) you are able to store files into Working sets. The Working sets will be provided at the bottom of the file list – in the Working set area. You can give the Working set a name (not more than 10 characters), a description and/or an icon.

How to store files in a Working set:

  • Add to a new Working set.Add to Working set
    Select the files → use the Working set menu (right-click or top menu) → select “Add to new Working set” → define a name, a description and/or an icon in the Working set preferences → OK.
  • Add to an existing Working set.
    Select the files → use the Working set menu (right-click or top menu) → select the existing Working set.

The Working set provides some actions regarding the files which are stored in the Working set:

  • Working set menuOpen the Working set files.
    Use the right-click on the Working set → select “Open”.
  • Close the Working set files.
    Use the right-click on the Working set → select “Close”.
  • Close all files except the Working set files.
    Use the right-click on the Working set → select “Close other files”.

Some other actions concerning the Working set files:

  • Open a single file of the Working set.
    Use the right-click on the Working set in the Working set area → select the file you want to open.
  • Close a single file of the Working set.
    Use the right-click on the Working set in the Working set area → press the CTRL key → select the file you want to close.
  • Remove a single file from the Working set.
    Use the right-click on the Working set in the Working set area → press the SHIFT key → select the file you want to remove.
  • Delete the Working set.
    Use the right-click on the Working set → select “Delete”.
  • Edit the Working set preferences (name, description and icon).
    Use the right-click on the Working set → select “Edit”.

 

Comments

  1. Commented on
    Comment by Radu Coravu

    Hi Nico,

    Very nice plugin, I tested it and it looks quite useful, I did not find any issues with it.
    One small problem is that for XML files the icon used in the view is blank. I’m testing with Oxygen 17.1 beta.

    Maybe you could also post on the Oxygen Users List about it.

    We have a list of publicly hosted Oxygen XML plugins and I added yours as well:
    http://blog.oxygenxml.com/2014/11/public-hosted-oxygen-plugin-and.html

    Regards,
    Radu

Compose Comment