@Override
  public void createControl(Composite parent) {
    creatingControl = true;
    // Create page
    final Composite mainPanel = new Composite(parent, SWT.NONE);

    mainPanel.setLayout(new GridLayout(1, false));
    mainPanel.setLayoutData(
        new GridData()); // GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
    mainPanel.setSize(mainPanel.computeSize(SWT.DEFAULT, SWT.DEFAULT));

    setControl(mainPanel);

    // Create Bottom Composite
    Composite upperPanel =
        WidgetFactory.createPanel(mainPanel, SWT.NONE, GridData.FILL_HORIZONTAL, 2, 2);
    upperPanel.setLayout(new GridLayout(2, false));

    setMessage(INITIAL_MESSAGE);

    Label selectedFileLabel = new Label(upperPanel, SWT.NONE);
    selectedFileLabel.setText(getString("selectedFile")); // $NON-NLS-1$

    selectedFileText = new Text(upperPanel, SWT.BORDER); // , SWT.BORDER | SWT.SINGLE);
    selectedFileText.setBackground(
        Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));
    selectedFileText.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE));
    selectedFileText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    selectedFileText.setEditable(false);

    createFilePreviewOptionsGroup(mainPanel);

    createColumnOptionsRadioGroup(mainPanel);

    createFileContentsGroup(mainPanel);

    creatingControl = false;

    setPageComplete(false);
  }
    /*
     * create the panel
     * @param parent the parent composite
     */
    private void createPanel(Composite parent) {
      Composite panel =
          WidgetFactory.createGroup(
              parent,
              UTIL.getString("ExtraPropertiesPanel_groupTitle"),
              SWT.FILL,
              2,
              1); //$NON-NLS-1$
      // GridDataFactory.swtDefaults().grab(true, true).applyTo(panel);
      GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
      gd.horizontalSpan = 2;
      panel.setLayoutData(gd);

      propertiesViewer =
          new TableViewer(panel, (SWT.V_SCROLL | SWT.H_SCROLL | SWT.FULL_SELECTION | SWT.BORDER));
      ColumnViewerToolTipSupport.enableFor(propertiesViewer);
      propertiesViewer.setContentProvider(
          new IStructuredContentProvider() {
            /**
             * {@inheritDoc}
             *
             * @see org.eclipse.jface.viewers.IContentProvider#dispose()
             */
            @Override
            public void dispose() {
              // nothing to do
            }

            /**
             * {@inheritDoc}
             *
             * @see
             *     org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
             */
            @Override
            public Object[] getElements(Object inputElement) {
              Properties props = extraProperties;

              if (props.isEmpty()) {
                return new Object[0];
              }

              List<SimpleProperty> properties = new ArrayList<SimpleProperty>();

              for (Object key : props.keySet()) {
                String keyStr = (String) key;
                properties.add(new SimpleProperty(keyStr, (String) props.get(keyStr)));
              }
              return properties.toArray(new SimpleProperty[0]);
            }

            /**
             * {@inheritDoc}
             *
             * @see
             *     org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
             *     java.lang.Object, java.lang.Object)
             */
            @Override
            public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
              // nothing to do
            }
          });

      // sort the table rows by display name
      propertiesViewer.setComparator(
          new ViewerComparator() {
            /**
             * {@inheritDoc}
             *
             * @see
             *     org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface.viewers.Viewer,
             *     java.lang.Object, java.lang.Object)
             */
            @Override
            public int compare(Viewer viewer, Object e1, Object e2) {
              SimpleProperty prop1 = (SimpleProperty) e1;
              SimpleProperty prop2 = (SimpleProperty) e2;

              return super.compare(viewer, prop1.getName(), prop2.getName());
            }
          });

      Table table = propertiesViewer.getTable();
      table.setHeaderVisible(true);
      table.setLinesVisible(true);
      table.setLayout(new TableLayout());
      table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
      ((GridData) table.getLayoutData()).horizontalSpan = 2;
      ((GridData) table.getLayoutData()).heightHint = table.getItemHeight() * 6;

      // create columns
      TableViewerColumn column = new TableViewerColumn(propertiesViewer, SWT.LEFT);
      column
          .getColumn()
          .setText(
              UTIL.getString("ExtraPropertiesPanel_name")
                  + "                   "); //$NON-NLS-1$ //$NON-NLS-2$
      column.setLabelProvider(new PropertyLabelProvider(0));
      // column.setEditingSupport(new PropertyNameEditingSupport(propertiesViewer, 0));
      column.getColumn().pack();

      column = new TableViewerColumn(propertiesViewer, SWT.LEFT);
      column.getColumn().setText(UTIL.getString("ExtraPropertiesPanel_value")); // $NON-NLS-1$
      column.setLabelProvider(new PropertyLabelProvider(1));
      column.setEditingSupport(new PropertyNameEditingSupport(propertiesViewer, 1));
      column.getColumn().pack();

      propertiesViewer.addSelectionChangedListener(
          new ISelectionChangedListener() {
            /**
             * {@inheritDoc}
             *
             * @see
             *     org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
             */
            @Override
            public void selectionChanged(SelectionChangedEvent event) {
              handlePropertySelected();
            }
          });

      //
      // add toolbar below the table
      //

      Composite toolbarPanel =
          WidgetFactory.createPanel(panel, SWT.NONE, GridData.VERTICAL_ALIGN_BEGINNING, 1, 2);

      this.addPropertyButton = WidgetFactory.createButton(toolbarPanel, GridData.FILL);
      this.addPropertyButton.setImage(
          DatatoolsUiPlugin.getDefault().getImage(Images.ADD_PROPERTY_ICON));
      this.addPropertyButton.setToolTipText(
          UTIL.getString("HeaderPropertiesPanel_addNewPropertyButton_tooltip")); // $NON-NLS-1$
      this.addPropertyButton.addSelectionListener(
          new SelectionListener() {

            @Override
            public void widgetSelected(SelectionEvent e) {
              handleAddProperty();
            }

            @Override
            public void widgetDefaultSelected(SelectionEvent e) {}
          });

      this.removePropertyButton = WidgetFactory.createButton(toolbarPanel, GridData.FILL);
      this.removePropertyButton.setImage(
          DatatoolsUiPlugin.getDefault().getImage(Images.REMOVE_PROPERTY_ICON));
      this.removePropertyButton.setToolTipText(
          UTIL.getString("HeaderPropertiesPanel_removePropertyButton_tooltip")); // $NON-NLS-1$
      this.removePropertyButton.addSelectionListener(
          new SelectionListener() {

            @Override
            public void widgetSelected(SelectionEvent e) {
              handleRemoveProperty();
            }

            @Override
            public void widgetDefaultSelected(SelectionEvent e) {}
          });
      this.removePropertyButton.setEnabled(false);

      propertiesViewer.setInput(this);
    }
  @SuppressWarnings("unused")
  @Override
  protected Control createDialogArea(Composite parent) {
    creatingContents = true;
    if (isEdit) {
      setTitle(EDIT_TITLE);
    } else {
      setTitle(CREATE_TITLE);
    }

    Composite dialogComposite = (Composite) super.createDialogArea(parent);

    Composite composite = WidgetFactory.createPanel(dialogComposite);
    // ------------------------------
    // Set layout for the Composite
    // ------------------------------
    GridLayout gridLayout = new GridLayout();
    composite.setLayout(gridLayout);
    gridLayout.numColumns = 2;
    GridData gridData = new GridData(GridData.FILL_BOTH);
    gridData.grabExcessHorizontalSpace = true;
    gridData.widthHint = 500;
    composite.setLayoutData(gridData);

    Label label = new Label(composite, SWT.NONE | SWT.RIGHT);
    label.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.NAME));
    label.setLayoutData(new GridData());

    final Text indexNameText = new Text(composite, SWT.BORDER | SWT.SINGLE);
    indexNameText.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE));
    indexNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    indexNameText.addModifyListener(
        new ModifyListener() {
          @Override
          public void modifyText(final ModifyEvent event) {
            String value = indexNameText.getText();
            if (value == null) {
              value = EMPTY_STRING;
            }
            editedIndex.setName(value);
            validate();
          }
        });

    label = new Label(composite, SWT.NONE | SWT.RIGHT);
    label.setText(Messages.nameInSourceLabel);
    label.setLayoutData(new GridData());

    final Text indexNISText = new Text(composite, SWT.BORDER | SWT.SINGLE);
    indexNISText.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE));
    indexNISText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    indexNISText.addModifyListener(
        new ModifyListener() {
          @Override
          public void modifyText(final ModifyEvent event) {
            String value = indexNISText.getText();
            if (value == null) {
              value = EMPTY_STRING;
            }
            editedIndex.setNameInSource(value);
            validate();
          }
        });

    // Group to present properties widgets
    PROPERTIES_GROUP:
    {
      this.autoUpdateCB = new Button(composite, SWT.CHECK | SWT.RIGHT);
      this.autoUpdateCB.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
      this.autoUpdateCB.setText(Messages.autoUpdateLabel);
      this.autoUpdateCB.addSelectionListener(
          new SelectionAdapter() {
            /**
             * {@inheritDoc}
             *
             * @see
             *     org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
             */
            @Override
            public void widgetSelected(SelectionEvent e) {
              editedIndex.setAutoUpdate(autoUpdateCB.getSelection());
              validate();
            }
          });
      new Label(composite, SWT.NONE);

      this.nullableCB = new Button(composite, SWT.CHECK | SWT.RIGHT);
      this.nullableCB.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
      this.nullableCB.setText(Messages.nullableLabel);
      this.nullableCB.addSelectionListener(
          new SelectionAdapter() {
            /**
             * {@inheritDoc}
             *
             * @see
             *     org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
             */
            @Override
            public void widgetSelected(SelectionEvent e) {
              editedIndex.setNullable(nullableCB.getSelection());
              validate();
            }
          });
      new Label(composite, SWT.NONE);

      this.uniqueCB = new Button(composite, SWT.CHECK | SWT.RIGHT);
      this.uniqueCB.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
      this.uniqueCB.setText(Messages.uniqueLabel);
      this.uniqueCB.addSelectionListener(
          new SelectionAdapter() {
            /**
             * {@inheritDoc}
             *
             * @see
             *     org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
             */
            @Override
            public void widgetSelected(SelectionEvent e) {
              editedIndex.setUnique(uniqueCB.getSelection());
              validate();
            }
          });
      new Label(composite, SWT.NONE);

      label = new Label(composite, SWT.NONE | SWT.RIGHT);
      label.setText(Messages.filterConditionLabel);
      label.setLayoutData(new GridData());

      filterConditionText = new Text(composite, SWT.BORDER | SWT.SINGLE);
      filterConditionText.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE));
      filterConditionText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      filterConditionText.addModifyListener(
          new ModifyListener() {
            @Override
            public void modifyText(final ModifyEvent event) {
              String value = filterConditionText.getText();
              if (value == null) {
                value = EMPTY_STRING;
              }
              editedIndex.setFilterCondition(value);
              validate();
            }
          });
    }

    Group theColumnsGroup =
        WidgetFactory.createGroup(
            dialogComposite, Messages.selectColumnReferencesForIndex, SWT.NONE, 1, 1);
    theColumnsGroup.setLayout(new GridLayout(1, false));
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.heightHint = 120;
    gd.widthHint = 500;
    theColumnsGroup.setLayoutData(gd);

    Table tableWidget =
        new Table(
            theColumnsGroup, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.CHECK);
    tableWidget.setHeaderVisible(false);
    tableWidget.setLinesVisible(true);
    tableWidget.setLayout(new TableLayout());
    tableWidget.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

    theColumnDataViewer = new TableViewer(tableWidget);
    gd = new GridData(GridData.FILL_BOTH);
    gd.heightHint = 160;
    gd.horizontalSpan = 2;
    theColumnDataViewer.getControl().setLayoutData(gd);
    theColumnDataViewer.setContentProvider(
        new ITreeContentProvider() {

          @Override
          public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
            // TODO Auto-generated method stub
          }

          @Override
          public void dispose() {
            // TODO Auto-generated method stub
          }

          @Override
          public boolean hasChildren(Object element) {
            return !theTable.getColumns().isEmpty();
          }

          @Override
          public Object getParent(Object element) {
            return null;
          }

          @Override
          public Object[] getElements(Object inputElement) {
            if (inputElement instanceof RelationalTable) {
              return theTable.getColumns().toArray(new Object[0]);
            }
            return new Object[0];
          }

          @Override
          public Object[] getChildren(Object parentElement) {
            // TODO Auto-generated method stub
            return new Object[0];
          }
        });

    this.theColumnDataViewer
        .getTable()
        .addSelectionListener(
            new SelectionListener() {

              @Override
              public void widgetSelected(SelectionEvent e) {
                editedIndex.getColumns().clear();
                for (TableItem item : theColumnDataViewer.getTable().getItems()) {

                  if (item.getChecked()) {
                    editedIndex.addColumn((RelationalColumn) item.getData());
                  }
                }
                validate();
              }

              @Override
              public void widgetDefaultSelected(SelectionEvent e) {}
            });

    theColumnDataViewer.setLabelProvider(new ColumnDataLabelProvider(0));

    theColumnDataViewer.setInput(this.theTable);

    for (RelationalColumn col : this.editedIndex.getColumns()) {
      for (TableItem item : theColumnDataViewer.getTable().getItems()) {
        if (item.getData() == col) {
          item.setChecked(true);
        }
      }
    }

    DESCRIPTION_GROUP:
    {
      final Group descGroup =
          WidgetFactory.createGroup(
              dialogComposite,
              UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.DESCRIPTION),
              GridData.FILL_BOTH,
              3);
      descriptionTextEditor =
          new StyledTextEditor(
              descGroup, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.WRAP | SWT.BORDER);
      final GridData descGridData = new GridData(GridData.FILL_BOTH);
      descGridData.horizontalSpan = 1;
      descGridData.heightHint = 120;
      //            descGridData.minimumHeight = 30;
      descGridData.grabExcessVerticalSpace = true;
      descriptionTextEditor.setLayoutData(descGridData);
      descriptionTextEditor.setText(""); // $NON-NLS-1$
      descriptionTextEditor
          .getTextWidget()
          .addModifyListener(
              new ModifyListener() {

                @Override
                public void modifyText(ModifyEvent e) {
                  editedIndex.setDescription(descriptionTextEditor.getText());
                }
              });
    }

    setMessage(Messages.newIndexMessage);
    if (editedIndex.getName() != null) {
      indexNameText.setText(editedIndex.getName());
    }
    if (editedIndex.getNameInSource() != null) {
      indexNISText.setText(editedIndex.getNameInSource());
    }
    this.autoUpdateCB.setSelection(editedIndex.isAutoUpdate());
    this.nullableCB.setSelection(editedIndex.isNullable());
    this.uniqueCB.setSelection(editedIndex.isUnique());
    if (editedIndex.getFilterCondition() != null) {
      filterConditionText.setText(editedIndex.getFilterCondition());
    }
    if (editedIndex.getDescription() != null) {
      descriptionTextEditor.setText(editedIndex.getDescription());
    }

    creatingContents = false;

    return composite;
  }
  @Override
  protected void createCustomContents(Composite parent) {
    GridData gd;

    Group group =
        WidgetFactory.createSimpleGroup(
            parent, UTIL.getString("Common.Properties.Label")); // $NON-NLS-1$;

    scrolled = new Composite(group, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 2;
    scrolled.setLayout(gridLayout);

    urlLabel = new Label(scrolled, SWT.NONE);
    urlLabel.setText(UTIL.getString("Common.URL.Label")); // $NON-NLS-1$
    urlLabel.setToolTipText(UTIL.getString("Common.URL.ToolTip")); // $NON-NLS-1$
    gd = new GridData();
    gd.verticalAlignment = GridData.CENTER;
    urlLabel.setLayoutData(gd);

    urlText = new Text(scrolled, SWT.SINGLE | SWT.BORDER);
    urlText.setToolTipText(UTIL.getString("Common.URL.ToolTip")); // $NON-NLS-1$
    gd = new GridData();
    gd.horizontalAlignment = GridData.FILL;
    gd.verticalAlignment = GridData.BEGINNING;
    gd.grabExcessHorizontalSpace = true;
    gd.horizontalSpan = 1;
    urlText.setLayoutData(gd);

    securityLabel = new Label(scrolled, SWT.NONE);
    securityLabel.setText(UTIL.getString("Common.Security.Type.Label")); // $NON-NLS-1$
    securityLabel.setToolTipText(UTIL.getString("Common.Security.Type.ToolTip")); // $NON-NLS-1$
    gd = new GridData();
    gd.verticalAlignment = GridData.CENTER;
    securityLabel.setLayoutData(gd);

    securityText = new Text(scrolled, SWT.SINGLE | SWT.BORDER);
    securityText.setToolTipText(UTIL.getString("Common.Security.Type.ToolTip")); // $NON-NLS-1$
    gd = new GridData();
    gd.horizontalAlignment = GridData.FILL;
    gd.verticalAlignment = GridData.BEGINNING;
    gd.grabExcessHorizontalSpace = true;
    gd.horizontalSpan = 1;
    securityText.setLayoutData(gd);

    usernameLabel = new Label(scrolled, SWT.NONE);
    usernameLabel.setText(UTIL.getString("Common.Username.Label")); // $NON-NLS-1$
    usernameLabel.setToolTipText(UTIL.getString("Common.Username.ToolTip")); // $NON-NLS-1$
    gd = new GridData();
    gd.verticalAlignment = GridData.CENTER;
    usernameLabel.setLayoutData(gd);

    usernameText = new Text(scrolled, SWT.SINGLE | SWT.BORDER);
    usernameText.setToolTipText(UTIL.getString("Common.Username.ToolTip")); // $NON-NLS-1$
    gd = new GridData();
    gd.horizontalAlignment = GridData.FILL;
    gd.verticalAlignment = GridData.BEGINNING;
    gd.grabExcessHorizontalSpace = true;
    gd.horizontalSpan = 1;
    usernameText.setLayoutData(gd);

    passwordLabel = new Label(scrolled, SWT.NONE);
    passwordLabel.setText(UTIL.getString("Common.Password.Label")); // $NON-NLS-1$
    passwordLabel.setToolTipText(UTIL.getString("Common.Password.ToolTip")); // $NON-NLS-1$
    gd = new GridData();
    gd.verticalAlignment = GridData.CENTER;
    passwordLabel.setLayoutData(gd);

    passwordText = new Text(scrolled, SWT.SINGLE | SWT.BORDER | SWT.PASSWORD);
    passwordText.setToolTipText(UTIL.getString("Common.Password.ToolTip")); // $NON-NLS-1$
    gd = new GridData();
    gd.horizontalAlignment = GridData.FILL;
    gd.verticalAlignment = GridData.BEGINNING;
    gd.grabExcessHorizontalSpace = true;
    gd.horizontalSpan = 1;
    passwordText.setLayoutData(gd);
    urlPreviewLabel = new Label(scrolled, SWT.NONE);
    urlPreviewLabel.setText(
        UTIL.getString("WSProfileDetailsWizardPage.urlPreviewLabel")); // $NON-NLS-1$
    gd = new GridData();
    urlPreviewLabel.setLayoutData(gd);

    urlPreviewText =
        new Text(scrolled, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.READ_ONLY | SWT.V_SCROLL);
    gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.grabExcessHorizontalSpace = true;
    gd.heightHint = 40;
    gd.horizontalSpan = 3;
    urlPreviewText.setLayoutData(gd);
    urlPreviewText.setBackground(
        Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));

    initControls();

    TabFolder tabFolder = new TabFolder(scrolled, SWT.TOP | SWT.BORDER);
    tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1));

    Composite parameterPanel = WidgetFactory.createPanel(tabFolder);
    this.parametersTab = new TabItem(tabFolder, SWT.FILL);
    this.parametersTab.setControl(parameterPanel);
    this.parametersTab.setText(UTIL.getString("ParametersPanel_groupTitle")); // $NON-NLS-1$
    this.parameterPanel = new ParameterPanel(this, parameterPanel, parameterMap, 6);
    this.urlPreviewText.setText(updateUrlPreview().toString());

    Composite headerPropertiesPanel = WidgetFactory.createPanel(tabFolder);
    this.headerPropertiesTab = new TabItem(tabFolder, SWT.FILL);
    this.headerPropertiesTab.setControl(headerPropertiesPanel);
    this.headerPropertiesTab.setText(
        UTIL.getString("HeaderPropertiesPanel_groupTitle")); // $NON-NLS-1$
    new HeaderPropertiesPanel(headerPropertiesPanel, this.extraProperties, 6);

    addlisteners();
  }
  /** Create the tableViewer Panel */
  @SuppressWarnings("unused")
  private void createTableViewerPanel(Composite theParent) {
    Composite tablePanel = new Composite(theParent, SWT.NONE);

    // Set the layout
    GridLayout gridLayout = new GridLayout();
    tablePanel.setLayout(gridLayout);

    GridData gridData = new GridData(GridData.FILL_BOTH);
    tablePanel.setLayoutData(gridData);

    // Add header panel

    HEADER_PANEL:
    {
      Composite headerPanel = WidgetFactory.createPanel(tablePanel);
      // ------------------------------
      // Set layout for the Composite
      // ------------------------------
      headerPanel.setLayout(new GridLayout());
      ((GridLayout) headerPanel.getLayout()).numColumns = 3;
      headerPanel.setLayoutData(new GridData(GridData.FILL_BOTH));
      ((GridData) headerPanel.getLayoutData()).minimumHeight = 80;
      // ((GridData)headerPanel.getLayoutData()).grabExcessHorizontalSpace = true;

      // Add general info/instructions text box
      {
        helpText = new Text(headerPanel, SWT.WRAP | SWT.READ_ONLY);
        helpText.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));
        helpText.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE));
        helpText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        ((GridData) helpText.getLayoutData()).horizontalSpan = 3;
        ((GridData) helpText.getLayoutData()).heightHint = 40;
        ((GridData) helpText.getLayoutData()).widthHint = 360;

        helpText.setText(Messages.datatypeReconciler_helpText);
      }

      // Add button bar containing:
      // [CHANGE ALL COLUMN DATATYPES] - or - [CONVERT ALL SQL SYMBOLS]
      this.convertAllSqlSymbolsButton =
          WidgetFactory.createButton(
              headerPanel, Messages.datatypeReconciler_convertAllSqlSymbolsLabel);
      this.convertAllSqlSymbolsButton.setToolTipText(
          Messages.datatypeReconciler_convertAllSqlSymbolsTooltip);
      this.convertAllSqlSymbolsButton.setImage(
          UiPlugin.getDefault().getImage(PluginConstants.Images.ARROW_LEFT_ICON));

      this.convertAllSqlSymbolsButton.addSelectionListener(
          new SelectionAdapter() {
            @Override
            public void widgetSelected(final SelectionEvent event) {
              changeAllColumnDatatypesButtonPressed();
            }
          });

      WidgetFactory.createLabel(headerPanel, "   - or -   "); // $NON-NLS-1$

      this.changeAllColumnDatatypesButton =
          WidgetFactory.createButton(
              headerPanel, Messages.datatypeReconciler_convertAllColumnDatatypesLabel);
      this.changeAllColumnDatatypesButton.setToolTipText(
          Messages.datatypeReconciler_convertAllColumnDatatypesTooltip);
      this.changeAllColumnDatatypesButton.setImage(
          UiPlugin.getDefault().getImage(PluginConstants.Images.ARROW_RIGHT_ICON));
      this.changeAllColumnDatatypesButton.setEnabled(false);
      this.changeAllColumnDatatypesButton.addSelectionListener(
          new SelectionAdapter() {
            @Override
            public void widgetSelected(final SelectionEvent event) {
              changeAllColumnDatatypesPressed();
            }
          });
    }

    BINDING_TABLE:
    {
      table = new Table(tablePanel, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
      table.setHeaderVisible(true);
      table.setLinesVisible(true);
      table.setLayout(new TableLayout());
      GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
      gd.heightHint = 200;
      table.setLayoutData(gd);

      this.bindingTableViewer = new TableViewer(table);
      this.bindingTableViewer.getControl().setLayoutData(gd);

      this.bindingContentProvider = new BindingContentProvider();

      // create columns

      // | status icon | Source SQL Symbol | <-- | Matched Datatype | ->  | Target Column

      // COLUMN 0 :  STATUS ICON Button
      TableViewerColumn column = new TableViewerColumn(this.bindingTableViewer, SWT.LEFT);
      column.setLabelProvider(new TheBindingColumnLabelProvider(0));
      column.getColumn().setText(getSpaces(8));
      column.getColumn().pack();

      // COLUMN 1 : SOURCE SQL SYMBOL
      column = new TableViewerColumn(this.bindingTableViewer, SWT.LEFT);
      column.getColumn().setText(Messages.datatypeReconciler_sourceSqlSymbolLabel + getSpaces(100));
      column.setLabelProvider(new TheBindingColumnLabelProvider(1));
      column.getColumn().pack();

      // COLUMN 2 :  LEFT ARROW Button
      column = new TableViewerColumn(this.bindingTableViewer, SWT.LEFT);
      column.getColumn().setText(getSpaces(8));
      column.setLabelProvider(new TheBindingColumnLabelProvider(2));
      column.setEditingSupport(new ConvertSymbolEditingSupport(this.bindingTableViewer));
      column.getColumn().pack();
      column.getColumn().setToolTipText(Messages.datatypeReconciler_convertSourceDatatypeTooltip);

      // COLUMN 3 : Matched datatype
      column = new TableViewerColumn(this.bindingTableViewer, SWT.LEFT);
      column.getColumn().setText(Messages.datatypeReconciler_matchedTypeLabel + getSpaces(60));
      column.setLabelProvider(new TheBindingColumnLabelProvider(3));
      column.setEditingSupport(new ChangeProposedDatatypeEditingSupport(this.bindingTableViewer));
      column.getColumn().pack();
      column.getColumn().setToolTipText(Messages.datatypeReconciler_matchedDatatypeTooltip);

      // COLUMN 4 : RIGHT ARROW Button
      column = new TableViewerColumn(this.bindingTableViewer, SWT.LEFT);
      column.getColumn().setText(getSpaces(8));
      column.setLabelProvider(new TheBindingColumnLabelProvider(4));
      column.setEditingSupport(new ChangeDatatypeEditingSupport(this.bindingTableViewer));
      column.getColumn().pack();
      column.getColumn().setToolTipText(Messages.datatypeReconciler_changeTargetDatatypeTooltip);

      // COLUMN 5 :  Target Column Definition
      column = new TableViewerColumn(this.bindingTableViewer, SWT.LEFT);
      column.getColumn().setText(Messages.datatypeReconciler_targetColumnLabel + getSpaces(25));
      column.setLabelProvider(new TheBindingColumnLabelProvider(5));
      column.getColumn().pack();

      bindingTableViewer.setUseHashlookup(true);
      bindingTableViewer.setContentProvider(this.bindingContentProvider);
      bindingTableViewer.setInput(this.bindingListInput);

      updateRowColors();
    }

    // Panel to display selection details
    SELECTION_STATUS_PANEL:
    {
      Composite selectionPanel =
          WidgetFactory.createGroup(
              tablePanel, Messages.datatypeReconciler_selectionPanelInfoLabel);
      // ------------------------------
      // Set layout for the Composite
      // ------------------------------
      selectionPanel.setLayout(new GridLayout());
      ((GridLayout) selectionPanel.getLayout()).numColumns = 2;
      selectionPanel.setLayoutData(new GridData(GridData.FILL_BOTH));
      ((GridData) selectionPanel.getLayoutData()).minimumHeight = 80;

      //			Label selectedSymbolLabel = new Label(selectionPanel, SWT.NONE);
      //			selectedSymbolLabel.setText("Selected Symbol: ");

      symbolConversionLabel = new Label(selectionPanel, SWT.NONE);
      symbolConversionLabel.setText(PluginConstants.EMPTY_STRING);
      symbolConversionLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      symbolConversionLabel.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE));

      Label messageLabel = new Label(selectionPanel, SWT.NONE);
      //			messageLabel.setText("Status: ");

      symbolWarningLabel = new Label(selectionPanel, SWT.NONE);
      symbolWarningLabel.setText(PluginConstants.EMPTY_STRING);
      symbolWarningLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      symbolWarningLabel.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE));
    }
  }