/**
   * DOC sgandon Comment method "createActionColumn".
   *
   * @return
   */
  public TableViewerCreatorColumn<ModuleToInstall, String> createActionColumn() {
    TableViewerCreatorColumn<ModuleToInstall, String> column =
        new TableViewerCreatorColumn<ModuleToInstall, String>(tableViewerCreator);
    column.setTitle(
        Messages.getString("ExternalModulesInstallDialog_AvailableOnTalendForge")); // $NON-NLS-1$
    column.setToolTipHeader(
        Messages.getString("ExternalModulesInstallDialog_AvailableOnTalendForge")); // $NON-NLS-1$
    column.setModifiable(false);
    column.setSortable(true);
    column.setWeight(5);
    // set bean property accessor to allow sort by download type (automatic or manual)
    column.setBeanPropertyAccessors(
        new IBeanPropertyAccessors<ModuleToInstall, String>() {

          @Override
          public String get(ModuleToInstall bean) {
            // use 2 invisible different values to allow sorting and have no visual impact when the
            // button is
            // selected
            return bean.getUrl_download() == null ? "" : " "; // $NON-NLS-1$//$NON-NLS-2$
          }

          @Override
          public void set(ModuleToInstall bean, String value) {
            // read only
          }
        });
    return column;
  }
  /**
   * DOC sgandon Comment method "createMoreInformationColumn".
   *
   * @param composite
   * @return
   */
  public TableViewerCreatorColumn<ModuleToInstall, String> createMoreInformationColumn() {
    TableViewerCreatorColumn<ModuleToInstall, String> column =
        new TableViewerCreatorColumn<ModuleToInstall, String>(tableViewerCreator);
    column.setTitle(Messages.getString("ExternalModulesInstallDialog_ColumnUrl")); // $NON-NLS-1$
    column.setToolTipHeader(
        Messages.getString("ExternalModulesInstallDialog_ColumnUrl")); // $NON-NLS-1$
    column.setModifiable(false);
    column.setSortable(true);
    column.setWeight(7);
    // set bean property accessor to allow sort by url name
    column.setBeanPropertyAccessors(
        new IBeanPropertyAccessors<ModuleToInstall, String>() {

          @Override
          public String get(ModuleToInstall bean) {
            return bean.getUrl_description() != null
                ? bean.getUrl_description()
                : ""; //$NON-NLS-1$
          }

          @Override
          public void set(ModuleToInstall bean, String value) {
            // read only
          }
        });
    return column;
  }
  /** DOC sgandon Comment method "createLicenseColumn". */
  public void createLicenseColumn() {
    TableViewerCreatorColumn<ModuleToInstall, String> column =
        new TableViewerCreatorColumn<ModuleToInstall, String>(tableViewerCreator);
    column.setTitle(
        Messages.getString("ExternalModulesInstallDialog_ColumnLicense")); // $NON-NLS-1$
    column.setToolTipHeader(
        Messages.getString("ExternalModulesInstallDialog_ColumnLicense")); // $NON-NLS-1$
    column.setSortable(true);
    // set bean property accessor to allow sort by license name
    column.setBeanPropertyAccessors(
        new IBeanPropertyAccessors<ModuleToInstall, String>() {

          @Override
          public String get(ModuleToInstall bean) {
            return bean.getLicenseType();
          }

          @Override
          public void set(ModuleToInstall bean, String value) {
            // read only
          }
        });

    column.setModifiable(false);
    column.setWeight(3);
  }
  /** DOC sgandon Comment method "createContextColumn". */
  public void createContextColumn() {
    TableViewerCreatorColumn<ModuleToInstall, String> column =
        new TableViewerCreatorColumn<ModuleToInstall, String>(tableViewerCreator);
    column.setSortable(true);
    column.setTitle(
        Messages.getString("ExternalModulesInstallDialog_ColumnRequiredBy")); // $NON-NLS-1$
    column.setToolTipHeader(
        Messages.getString("ExternalModulesInstallDialog_ColumnRequiredBy")); // $NON-NLS-1$
    column.setBeanPropertyAccessors(
        new IBeanPropertyAccessors<ModuleToInstall, String>() {

          @Override
          public String get(ModuleToInstall bean) {
            return bean.getContext();
          }

          @Override
          public void set(ModuleToInstall bean, String value) {
            // read only column
          }
        });

    column.setModifiable(false);
    column.setWeight(5);
  }
  /** DOC sgandon Comment method "createJarNameColumn". */
  public void createJarNameColumn() {
    TableViewerCreatorColumn<ModuleToInstall, String> column =
        new TableViewerCreatorColumn<ModuleToInstall, String>(tableViewerCreator);
    column.setTitle(
        Messages.getString("ExternalModulesInstallDialog_ColumnJarName")); // $NON-NLS-1$
    column.setToolTipHeader(
        Messages.getString("ExternalModulesInstallDialog_ColumnJarName")); // $NON-NLS-1$
    column.setBeanPropertyAccessors(
        new IBeanPropertyAccessors<ModuleToInstall, String>() {

          @Override
          public String get(ModuleToInstall bean) {
            return bean.getName();
          }

          @Override
          public void set(ModuleToInstall bean, String value) {
            // read only
          }
        });
    column.setSortable(true);
    tableViewerCreator.setDefaultSort(column, SORT.ASC);
    column.setWeight(5);
    column.setModifiable(false);
  }
  /** DOC sgandon Comment method "createREquiredColumn". */
  public void createRequiredColumn() {
    TableViewerCreatorColumn<ModuleToInstall, Boolean> column =
        new TableViewerCreatorColumn<ModuleToInstall, Boolean>(tableViewerCreator);
    column.setTitle(
        Messages.getString("ExternalModulesInstallDialog_ColumnRequired")); // $NON-NLS-1$
    column.setToolTipHeader(
        Messages.getString("ExternalModulesInstallDialog_ColumnRequired")); // $NON-NLS-1$
    column.setDisplayedValue(""); // $NON-NLS-1$
    column.setSortable(true);
    column.setImageProvider(
        new IColumnImageProvider<ModuleToInstall>() {

          @Override
          public Image getImage(ModuleToInstall bean) {
            if (bean.isRequired()) {
              return ImageProvider.getImage(EImage.CHECKED_ICON);
            } else {
              return ImageProvider.getImage(EImage.UNCHECKED_ICON);
            }
          }
        });
    column.setBeanPropertyAccessors(
        new IBeanPropertyAccessors<ModuleToInstall, Boolean>() {

          @Override
          public Boolean get(ModuleToInstall bean) {
            return bean.isRequired();
          }

          @Override
          public void set(ModuleToInstall bean, Boolean value) {
            // read only
          }
        });

    column.setModifiable(false);
    column.setWeight(2);
  }