// Path: src/main/java/com/instaclick/pentaho/plugin/amqp/AMQPPluginMeta.java
// public static class Binding
// {
//     private final String target;
//     private final String routing;
//     private final String target_type;
// 
//     Binding(final String target, final String target_type, final String routing)
//     {
//         this.target      = target;
//         this.routing     = routing;
//         this.target_type = target_type;
//     }
// 
//     public String getTarget()
//     {
//         return target;
//     }
// 
//     public String getRouting()
//     {
//         return routing;
//     }
//     public String getTargetType()
//     {
//         return target_type;
//     }
// }
// 
// Path: src/main/java/com/instaclick/pentaho/plugin/amqp/Messages.java
// public static String getString(String key)
// {
//     return BaseMessages.getString(PKG, key);
// }


import com.instaclick.pentaho.plugin.amqp.AMQPPluginMeta.Binding;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.ShellAdapter;
import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.widgets.Composite;
import org.pentaho.di.core.Props;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.MessageBox;
import org.pentaho.di.ui.core.widget.ColumnInfo;
import org.pentaho.di.ui.core.widget.TableView;
import org.pentaho.di.core.Const;
import org.pentaho.di.trans.TransMeta;
import org.pentaho.di.trans.step.BaseStepMeta;
import org.pentaho.di.trans.step.StepDialogInterface;
import org.pentaho.di.ui.trans.step.BaseStepDialog;
import org.pentaho.di.ui.core.widget.TextVar;
import static com.instaclick.pentaho.plugin.amqp.Messages.getString;

        if (AMQPPluginData.MODE_PRODUCER.equals(comboMode.getText())) {
            enableProducerFields();
        }

        if (AMQPPluginData.MODE_CONSUMER.equals(comboMode.getText())) {
            enableConsumerFields();
        }

        setFieldText(textURI, input.getUri());
        setFieldText(textHost, input.getHost());
        setFieldText(textPort, input.getPort());
        setFieldText(textVhost, input.getVhost());
        setFieldText(textTarget, input.getTarget());
        setFieldText(textRouting, input.getRouting());
        setFieldText(textLimit, input.getLimitString());
        setFieldText(textUsername, input.getUsername());
        setFieldText(textPassword, input.getPassword());
        setFieldText(textBodyField, input.getBodyField());
        setFieldText(textDeliveryTagField, input.getDeliveryTagField());

        setFieldText(textAckStepName, input.getAckStepName());
        setFieldText(textAckStepDeliveryTagField, input.getAckStepDeliveryTagField());
        setFieldText(textRejectStepName, input.getRejectStepName());
        setFieldText(textRejectStepDeliveryTagField, input.getRejectStepDeliveryTagField());

        setFieldText(textPrefetchCount, input.getPrefetchCountString());
        setFieldText(textWaitTimeout, input.getWaitTimeoutString());


        for (int i = 0; i < input.getBindings().size(); i++) {

// Path: src/main/java/com/instaclick/pentaho/plugin/amqp/AMQPPluginMeta.java
// public static class Binding
// {
//     private final String target;
//     private final String routing;
//     private final String target_type;
// 
//     Binding(final String target, final String target_type, final String routing)
//     {
//         this.target      = target;
//         this.routing     = routing;
//         this.target_type = target_type;
//     }
// 
//     public String getTarget()
//     {
//         return target;
//     }
// 
//     public String getRouting()
//     {
//         return routing;
//     }
//     public String getTargetType()
//     {
//         return target_type;
//     }
// }
// 
// Path: src/main/java/com/instaclick/pentaho/plugin/amqp/Messages.java
// public static String getString(String key)
// {
//     return BaseMessages.getString(PKG, key);
// }


// Path: src/main/java/com/instaclick/pentaho/plugin/amqp/AMQPPluginDialog.java
import com.instaclick.pentaho.plugin.amqp.AMQPPluginMeta.Binding;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.ShellAdapter;
import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.widgets.Composite;
import org.pentaho.di.core.Props;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.MessageBox;
import org.pentaho.di.ui.core.widget.ColumnInfo;
import org.pentaho.di.ui.core.widget.TableView;
import org.pentaho.di.core.Const;
import org.pentaho.di.trans.TransMeta;
import org.pentaho.di.trans.step.BaseStepMeta;
import org.pentaho.di.trans.step.StepDialogInterface;
import org.pentaho.di.ui.trans.step.BaseStepDialog;
import org.pentaho.di.ui.core.widget.TextVar;
import static com.instaclick.pentaho.plugin.amqp.Messages.getString;

        if (AMQPPluginData.MODE_PRODUCER.equals(comboMode.getText())) {
            enableProducerFields();
        }

        if (AMQPPluginData.MODE_CONSUMER.equals(comboMode.getText())) {
            enableConsumerFields();
        }

        setFieldText(textURI, input.getUri());
        setFieldText(textHost, input.getHost());
        setFieldText(textPort, input.getPort());
        setFieldText(textVhost, input.getVhost());
        setFieldText(textTarget, input.getTarget());
        setFieldText(textRouting, input.getRouting());
        setFieldText(textLimit, input.getLimitString());
        setFieldText(textUsername, input.getUsername());
        setFieldText(textPassword, input.getPassword());
        setFieldText(textBodyField, input.getBodyField());
        setFieldText(textDeliveryTagField, input.getDeliveryTagField());

        setFieldText(textAckStepName, input.getAckStepName());
        setFieldText(textAckStepDeliveryTagField, input.getAckStepDeliveryTagField());
        setFieldText(textRejectStepName, input.getRejectStepName());
        setFieldText(textRejectStepDeliveryTagField, input.getRejectStepDeliveryTagField());

        setFieldText(textPrefetchCount, input.getPrefetchCountString());
        setFieldText(textWaitTimeout, input.getWaitTimeoutString());


        for (int i = 0; i < input.getBindings().size(); i++) {

            final Binding binding = input.getBindings().get(i);
