/*
package com.sibilantsolutions.iptools.test;

import java.io.FileReader;
import java.io.IOException;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Properties;

import javax.net.ServerSocketFactory;

import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.CmdLineParser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.sibilantsolutions.iptools.cli.CommandAggregator;
import com.sibilantsolutions.iptools.cli.CommandHttp;
import com.sibilantsolutions.iptools.cli.CommandIrc;
import com.sibilantsolutions.iptools.cli.CommandRedir;
import com.sibilantsolutions.iptools.cli.CommandSocketTwoPane;
import com.sibilantsolutions.iptools.event.ConnectEvent;
import com.sibilantsolutions.iptools.event.ConnectionListenerI;
import com.sibilantsolutions.iptools.event.SocketListenerI;
import com.sibilantsolutions.iptools.gui.SocketTwoPane;
import com.sibilantsolutions.iptools.layer.app.http.HttpReceiver;
import com.sibilantsolutions.iptools.layer.app.irc.IrcClient;
import com.sibilantsolutions.iptools.redir.Redirector;
import com.sibilantsolutions.iptools.util.Socker;
import com.beust.jcommander.JCommander;

public class IpToolsTester
{
    final static private Logger log = LoggerFactory.getLogger( IpToolsTester.class );

    static private String[] args;

    static public void main( String[] args )
    {
        try
        {
            long startMs = System.currentTimeMillis();

            log.info( "main() started." );

            IpToolsTester.args = args;

            new SocketTwoPane().buildUi();
            //new IpToolsTester().test();
    //        new IpToolsTester().ircTest();
    //        new IpToolsTester().jCommanderTest( args );
    //        new IpToolsTester().args4jTest( args );

            long endMs = System.currentTimeMillis();

            log.info( "main() finished; duration={} ms.", endMs - startMs );
        }
        catch( Exception e )
        {
            log.error( "Trouble:", new RuntimeException( e ) );
        }
    }

    private void args4jTest( String[] args )
    {
        CommandAggregator bean = new CommandAggregator();
        CmdLineParser parser = new CmdLineParser( bean );
        try
        {
            log.info( "Printing usage." );
            parser.printUsage( System.out );
            log.info( "Done printing usage." );
            parser.parseArgument( args );
            log.info( "Printing usage." );
            parser.printSingleLineUsage( System.out );
            log.info( "Done printing usage." );
            log.info( "cmd={}", bean.cmd );
            CommandIrc irc = (CommandIrc)bean.cmd;
            log.info( "file={}", irc.getFilename() );
        }
        catch ( CmdLineException e )
        {
            // TODO Auto-generated catch block
            throw new UnsupportedOperationException( "OGTE TODO!", e );
        }
    }

    private void jCommanderTest( String[] args )
    {
        JCommander jc = new JCommander();

        jc.addCommand( CommandIrc.COMMAND_NAME, CommandIrc.INSTANCE, CommandIrc.ALIASES );
        jc.addCommand( CommandRedir.COMMAND_NAME, CommandRedir.INSTANCE, CommandRedir.ALIASES );
        jc.addCommand( CommandSocketTwoPane.COMMAND_NAME, CommandSocketTwoPane.INSTANCE, CommandSocketTwoPane.ALIASES );
        jc.addCommand( CommandHttp.COMMAND_NAME, CommandHttp.INSTANCE, CommandHttp.ALIASES );

        jc.usage();

        jc.parse( args );

        String parsedCommand = jc.getParsedCommand();

        switch ( parsedCommand )
        {
            case CommandIrc.COMMAND_NAME:
                String filename = CommandIrc.INSTANCE.getFilename();
                log.info( "IRC filename={}.", filename );
                break;

            case CommandRedir.COMMAND_NAME:
                log.info( "Redir." );
                break;

            default:
                throw new RuntimeException( "OGTE TODO" );
        }
    }

    public void ircTest()
    {
        Properties properties = new Properties();
        try
        {
            properties.load( new FileReader( args[0] ) );
        }
        catch ( IOException e )
        {
            // TODO Auto-generated catch block
            throw new UnsupportedOperationException( "OGTE TODO!", e );
        }
        new IrcClient( properties );
    }

    private void test()
    {
        ServerSocketFactory ssf = ServerSocketFactory.getDefault();

        try
        {
            InetAddress loopback = InetAddress.getByName( null );
            final ServerSocket serverSocket = ssf.createServerSocket( 8888, 50, loopback );
            log.info( "Created server socket={}.", serverSocket );
            boolean isRunning = true;
            while ( isRunning )
            {
                log.info( "Waiting to accept connection={}.", serverSocket );
                final Socket socket = serverSocket.accept();
                log.info( "Accepted connection={} from server={}.", socket, serverSocket );
                Runnable r = new Runnable() {

                    @Override
                    public void run()
                    {
                        log.info( "Started onConnect thread={} for socket={}.", Thread.currentThread(), socket );

                        //ConnectionListenerI connListener = httpConnectionListener();
                        ConnectionListenerI connListener = redirConnectionListener();
                        connListener.onConnect( new ConnectEvent( socket, serverSocket ) );

                        log.info( "Finished onConnect thread={} for socket={}.", Thread.currentThread(), socket );
                    }
                };

                    //Start the onConnect thread immediately after accept, so that the server
                    //can accept another connection right away.
                new Thread( r ).start();
            }
        }
        catch ( IOException e )
        {
            throw new RuntimeException( "Trouble with socketry:", e );
        }
    }

    private ConnectionListenerI httpConnectionListener()
    {
        return new ConnectionListenerI() {

            @Override
            public void onConnect( ConnectEvent evt )
            {
                final Socket socket = evt.getSocket();

                SocketListenerI listener = new HttpReceiver();
                Socker.readLoopThread( socket, listener );
            }
        };
    }

    private ConnectionListenerI redirConnectionListener()
    {
        Redirector redirector = new Redirector();
        redirector.setTargetHost( args[0] );
        redirector.setTargetPort( Integer.parseInt( args[1] ) );
        redirector.setTargetSsl( Boolean.parseBoolean( args[2] ) );

        return redirector;
    }

}
*/

@@ -1,7 +1,4 @@
-/*%0A
 pack
@@ -42,35 +42,8 @@
 t;%0A%0A
-import java.io.FileReader;%0A
 impo
@@ -152,37 +152,8 @@
 ket;
-%0Aimport java.util.Properties;
 %0A%0Aim
@@ -328,24 +328,64 @@
 erFactory;%0A%0A
+import com.beust.jcommander.JCommander;%0A
 import com.s
@@ -819,357 +819,79 @@
 ols.
-event.SocketListenerI;%0Aimport com.sibilantsolutions.iptools.gui.SocketTwoPane;%0Aimport com.sibilantsolutions.iptools.layer.app.http.HttpReceiver;%0Aimport com.sibilantsolutions.iptools.layer.app.irc.IrcClient;%0Aimport com.sibilantsolutions.iptools.redir.Redirector;%0Aimport com.sibilantsolutions.iptools.util.Socker;%0Aimport com.beust.jcommander.JCommande
+gui.SocketTwoPane;%0Aimport com.sibilantsolutions.iptools.redir.Redirecto
 r;%0A%0A
@@ -3661,395 +3661,8 @@
  %7D%0A%0A
-    public void ircTest()%0A    %7B%0A        Properties properties = new Properties();%0A        try%0A        %7B%0A            properties.load( new FileReader( args%5B0%5D ) );%0A        %7D%0A        catch ( IOException e )%0A        %7B%0A            // TODO Auto-generated catch block%0A            throw new UnsupportedOperationException( %22OGTE TODO!%22, e );%0A        %7D%0A        new IrcClient( properties );%0A    %7D%0A%0A
     
@@ -5350,415 +5350,8 @@
  %7D%0A%0A
-    private ConnectionListenerI httpConnectionListener()%0A    %7B%0A        return new ConnectionListenerI() %7B%0A%0A            @Override%0A            public void onConnect( ConnectEvent evt )%0A            %7B%0A                final Socket socket = evt.getSocket();%0A%0A                SocketListenerI listener = new HttpReceiver();%0A                Socker.readLoopThread( socket, listener );%0A            %7D%0A        %7D;%0A    %7D%0A%0A
     
@@ -5679,7 +5679,4 @@
 %0A%0A%7D%0A
-*/%0A

Remove references to iplayers code that was filtered out of the repo, and uncomment the tester class.