Пример #1
0
    private void updateEnableState() {
      if (fDetectGroup == null) return;

      final boolean detect = fDetectGroup.mustDetect();
      fStdRadio.setEnabled(!detect);
      fSrcBinRadio.setEnabled(!detect);

      if (fGroup != null) {
        fGroup.setEnabled(!detect);
      }
    }
Пример #2
0
    public void dialogFieldChanged(DialogField field) {
      if (field == fDefaultValues) {
        final boolean checked = fDefaultValues.isSelected();
        if (null != fConfigurationBlock) this.fConfigurationBlock.setEnabled(!checked);
      }

      fireEvent();
    }
Пример #3
0
 public void widgetDefaultSelected(SelectionEvent e) {
   String prefID = PHPInterpreterPreferencePage.PREF_ID;
   Map data = null;
   PreferencesUtil.createPreferenceDialogOn(getShell(), prefID, new String[] {prefID}, data)
       .open();
   if (!fCustomValues.isSelected()) {
     fConfigurationBlock.performRevert();
   }
 }
Пример #4
0
    public LayoutGroup(Composite composite) {
      final int numColumns = 3;

      fStdRadio = new SelectionButtonDialogField(SWT.RADIO);
      fStdRadio.setLabelText(PHPUIMessages.LayoutGroup_OptionBlock_ProjectSrc); // $NON-NLS-1$
      fStdRadio.setDialogFieldListener(this);

      fSrcBinRadio = new SelectionButtonDialogField(SWT.RADIO);
      fSrcBinRadio.setLabelText(PHPUIMessages.LayoutGroup_OptionBlock_SrcResources); // $NON-NLS-1$
      fSrcBinRadio.setDialogFieldListener(this);

      // getting Preferences default choice
      boolean useSrcBin =
          PreferenceConstants.getPreferenceStore()
              .getBoolean(PreferenceConstants.SRCBIN_FOLDERS_IN_NEWPROJ);

      fSrcBinRadio.setSelection(useSrcBin);
      fStdRadio.setSelection(!useSrcBin);

      // createContent
      fGroup = new Group(composite, SWT.NONE);
      fGroup.setFont(composite.getFont());
      fGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      fGroup.setLayout(initGridLayout(new GridLayout(numColumns, false), true));
      fGroup.setText(PHPUIMessages.LayoutGroup_OptionBlock_Title); // $NON-NLS-1$

      fStdRadio.doFillIntoGrid(fGroup, 3);
      LayoutUtil.setHorizontalGrabbing(fStdRadio.getSelectionButton(null));

      fSrcBinRadio.doFillIntoGrid(fGroup, 2);

      fPreferenceLink = new Link(fGroup, SWT.NONE);
      fPreferenceLink.setText(PHPUIMessages.ToggleLinkingAction_link_description); // $NON-NLS-1$
      fPreferenceLink.setLayoutData(new GridData(SWT.END, SWT.BEGINNING, true, false));
      fPreferenceLink.addSelectionListener(this);
      fPreferenceLink.setEnabled(true);

      updateEnableState();
    }
Пример #5
0
    public VersionGroup(Composite composite) {
      final int numColumns = 3;
      final Group group = new Group(composite, SWT.NONE);
      group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      group.setLayout(initGridLayout(new GridLayout(numColumns, false), true));
      group.setText(PHPUIMessages.VersionGroup_OptionBlock_Title); // $NON-NLS-1$
      fDefaultValues = new SelectionButtonDialogField(SWT.RADIO);
      fDefaultValues.setDialogFieldListener(this);
      fDefaultValues.setLabelText(
          PHPUIMessages.VersionGroup_OptionBlock_fDefaultValues); // $NON-NLS-1$
      fCustomValues = new SelectionButtonDialogField(SWT.RADIO);
      fCustomValues.setDialogFieldListener(this);
      fCustomValues.setLabelText(
          PHPUIMessages.VersionGroup_OptionBlock_fCustomValues); // $NON-NLS-1$

      fDefaultValues.setSelection(true);
      fCustomValues.setSelection(false);

      fDefaultValues.doFillIntoGrid(group, numColumns);
      fCustomValues.doFillIntoGrid(group, 2);

      fConfigurationBlock =
          createConfigurationBlock(
              new IStatusChangeListener() {
                public void statusChanged(IStatus status) {}
              },
              (IProject) null,
              null);
      fConfigurationBlock.createContents(group);
      fConfigurationBlock.setEnabled(false);
      // fPreferenceLink = new Link(fGroup, SWT.NONE);
      // fPreferenceLink.setText(PHPUIMessages.getString("ToggleLinkingAction_link_description"));
      // //fPreferenceLink.setLayoutData(new GridData(GridData.END,
      // GridData.END, false, false));
      // fPreferenceLink.setLayoutData(new GridData(SWT.END,
      // SWT.BEGINNING, true, false));
      // fPreferenceLink.addSelectionListener(this);
      // fPreferenceLink.setEnabled(true);

    }
Пример #6
0
 /**
  * Return <code>true</code> if the user specified to create 'application' and 'public' folders.
  *
  * @return returns <code>true</code> if the user specified to create 'source' and 'bin' folders.
  */
 public boolean isDetailedLayout() {
   return fSrcBinRadio.isSelected();
 }