Ejemplo n.º 1
0
  public void createControl(Composite parent) {
    initializeDialogUnits(parent);
    final Composite composite = new Composite(parent, SWT.NULL);
    composite.setFont(parent.getFont());
    composite.setLayout(initGridLayout(new GridLayout(1, false), false));
    composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
    // create UI elements
    fNameGroup = new NameGroup(composite, fInitialName, getShell());
    fPHPLocationGroup = new LocationGroup(composite, fNameGroup, getShell());

    CompositeData data = new CompositeData();
    data.setParetnt(composite);
    data.setSettings(getDialogSettings());
    data.setObserver(fPHPLocationGroup);
    fragment =
        (WizardFragment)
            Platform.getAdapterManager()
                .loadAdapter(data, PHPProjectWizardFirstPage.class.getName());

    fVersionGroup = new VersionGroup(composite);
    fLayoutGroup = new LayoutGroup(composite);
    fJavaScriptSupportGroup = new JavaScriptSupportGroup(composite, this);

    fDetectGroup = new DetectGroup(composite, fPHPLocationGroup, fNameGroup);

    // establish connections
    fNameGroup.addObserver(fPHPLocationGroup);
    fDetectGroup.addObserver(fLayoutGroup);

    fPHPLocationGroup.addObserver(fDetectGroup);
    // initialize all elements
    fNameGroup.notifyObservers();
    // create and connect validator
    fPdtValidator = new Validator();

    fNameGroup.addObserver(fPdtValidator);
    fPHPLocationGroup.addObserver(fPdtValidator);

    setControl(composite);
    Dialog.applyDialogFont(composite);

    // set the focus to the project name
    fNameGroup.postSetFocus();

    setHelpContext(composite);
  }
Ejemplo n.º 2
0
 public boolean isInLocalServer() {
   return fPHPLocationGroup.isInLocalServer();
 }
Ejemplo n.º 3
0
 public boolean isInWorkspace() {
   return fPHPLocationGroup.isInWorkspace();
 }
Ejemplo n.º 4
0
 public IEnvironment getEnvironment() {
   return fPHPLocationGroup.getEnvironment();
 }
Ejemplo n.º 5
0
 public URI getLocationURI() {
   IEnvironment environment = getEnvironment();
   return environment.getURI(fPHPLocationGroup.getLocation());
 }
Ejemplo n.º 6
0
 public boolean isExistingLocation() {
   return fPHPLocationGroup.isExistingLocation();
 }