// If Xadrian is already running then focus the already running
// Xadrian and pass command line arguments to it. This allows us
// to open more complexes in the already running Xadrian by
// double-clicking the *.x3c files.
final OneInstance oneInstance = OneInstance.getInstance();
oneInstance.addListener(new OneInstanceListener()
{
@Override
public boolean newInstanceCreated(final File workingDir, final String[] args)
{
SwingUtilities.invokeLater(new Runnable()