/** Can be called during createControl */
  protected Map<String, Serializable> defaultParams() {
    IStructuredSelection selection =
        (IStructuredSelection)
            PlatformUI.getWorkbench()
                .getActiveWorkbenchWindow()
                .getSelectionService()
                .getSelection();
    Map<String, Serializable> toParams = toParams(selection);
    if (!toParams.isEmpty()) {
      return toParams;
    }

    WFSConnectionFactory connectionFactory = new WFSConnectionFactory();
    Map<String, Serializable> params =
        connectionFactory.createConnectionParameters(getState().getWorkflow().getContext());
    if (params != null) return params;

    return Collections.emptyMap();
  }
 /** Retrieve "best" WFS guess of parameters based on provided context */
 protected Map<String, Serializable> toParams(IStructuredSelection context) {
   if (context == null) {
     // lets go with the defaults then
     return Collections.emptyMap();
   }
   for (Iterator itr = context.iterator(); itr.hasNext(); ) {
     Map<String, Serializable> params = wfsConnFactory.createConnectionParameters(itr.next());
     if (!params.isEmpty()) return params;
   }
   return Collections.emptyMap();
 }