/**
  * Create the dialog, delegate to factory.
  *
  * @param parent The area to create in
  * @return The created area
  */
 @Override
 protected Control createDialogArea(final Composite parent) {
   final Composite container = (Composite) super.createDialogArea(parent);
   final GridLayout layout = new GridLayout();
   layout.numColumns = 1;
   // layout.horizontalAlignment = GridData.FILL;
   parent.setLayout(layout);
   final Composite c = new Composite(container, SWT.None);
   final GridData gd = new GridData();
   gd.grabExcessHorizontalSpace = true;
   gd.grabExcessVerticalSpace = true;
   gd.horizontalAlignment = GridData.CENTER;
   gd.verticalAlignment = GridData.BEGINNING;
   c.setLayoutData(gd);
   if (chooser != null) {
     chooser.createContents(c);
     if (selectedVariables.size() > 0) {
       chooser.setSelectedVariables(selectedVariables);
     }
     if (maxEntries < Short.MAX_VALUE) {
       chooser.setMaximumNumberOfEntries(maxEntries);
     }
   }
   return parent;
 }
 @Override
 protected void okPressed() {
   LOGGER.debug("okPressed");
   if (chooser != null) {
     selectedVariables = chooser.getVariables(); // shallow copy, only references
   }
   setReturnCode(OK);
   close();
 }