Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: ed019820777a3795d5948a4cf4bedac2ef0df24c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package org.eclipse.net4j.internal.ui.wizards.steps;

import org.eclipse.net4j.IAcceptor;
import org.eclipse.net4j.IPluginTransportContainer;
import org.eclipse.net4j.ITransportContainer;
import org.eclipse.net4j.internal.ui.AcceptorContentProvider;
import org.eclipse.net4j.ui.wizards.ParallelStep;
import org.eclipse.net4j.ui.wizards.SelectionStep;

/**
 * @author Eike Stepper
 */
public class SelectAcceptorStep extends ParallelStep
{
  public static final String KEY_ACCEPTOR = "Acceptor";

  public SelectAcceptorStep(ITransportContainer container)
  {
    add(new SelectionStep<String>(KEY_ACCEPTOR, IAcceptor.class, container, new AcceptorContentProvider(), null, 1, 1));
  }

  public SelectAcceptorStep()
  {
    this(IPluginTransportContainer.INSTANCE);
  }

  public IAcceptor getAcceptor()
  {
    Object value = getWizard().getSingleContextValue(KEY_ACCEPTOR);
    return value instanceof IAcceptor ? (IAcceptor)value : null;
  }
}

Back to the top