// 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;

    }

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

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


    private void enableProducerFields()
    {
        textLimit.setVisible(false);
        labelLimit.setVisible(false);
        textPrefetchCount.setVisible(false);
        labelPrefetchCount.setVisible(false);
        textWaitTimeout.setVisible(false);
        labelWaitTimeout.setVisible(false);
        comboExchtype.setVisible(true);
        labelExchtype.setVisible(true);

        labelWaitingConsumer.setVisible(false);
        checkWaitingConsumer.setVisible(false);

        labelRequeue.setVisible(false);
        checkRequeue.setVisible(false);


// 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;

    }

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

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


    private void enableProducerFields()
    {
        textLimit.setVisible(false);
        labelLimit.setVisible(false);
        textPrefetchCount.setVisible(false);
        labelPrefetchCount.setVisible(false);
        textWaitTimeout.setVisible(false);
        labelWaitTimeout.setVisible(false);
        comboExchtype.setVisible(true);
        labelExchtype.setVisible(true);

        labelWaitingConsumer.setVisible(false);
        checkWaitingConsumer.setVisible(false);

        labelRequeue.setVisible(false);
        checkRequeue.setVisible(false);


        labelTarget.setText(getString("AmqpPlugin.Exchange.Label"));
