Ejemplo n.º 1
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();
   }
 }
Ejemplo n.º 2
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);

    }